Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5ad5be89
Commit
5ad5be89
authored
Mar 30, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: Build with msvcrt.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5f44c461
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
30 deletions
+18
-30
Makefile.in
dlls/dnsapi/Makefile.in
+2
-0
name.c
dlls/dnsapi/name.c
+7
-20
record.c
dlls/dnsapi/record.c
+9
-10
No files found.
dlls/dnsapi/Makefile.in
View file @
5ad5be89
...
@@ -3,6 +3,8 @@ IMPORTLIB = dnsapi
...
@@ -3,6 +3,8 @@ IMPORTLIB = dnsapi
IMPORTS
=
netapi32
IMPORTS
=
netapi32
EXTRALIBS
=
$(RESOLV_LIBS)
EXTRALIBS
=
$(RESOLV_LIBS)
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
C_SRCS
=
\
libresolv.c
\
libresolv.c
\
main.c
\
main.c
\
...
...
dlls/dnsapi/name.c
View file @
5ad5be89
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "windns.h"
#include "windns.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "dnsapi.h"
#include "dnsapi.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dnsapi
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dnsapi
);
...
@@ -67,23 +66,13 @@ BOOL WINAPI DnsNameCompare_W( PCWSTR name1, PCWSTR name2 )
...
@@ -67,23 +66,13 @@ BOOL WINAPI DnsNameCompare_W( PCWSTR name1, PCWSTR name2 )
if
(
!
name1
&&
!
name2
)
return
TRUE
;
if
(
!
name1
&&
!
name2
)
return
TRUE
;
if
(
!
name1
||
!
name2
)
return
FALSE
;
if
(
!
name1
||
!
name2
)
return
FALSE
;
p
=
name1
+
lstrlenW
(
name1
)
-
1
;
p
=
name1
+
lstrlenW
(
name1
);
q
=
name2
+
lstrlenW
(
name2
)
-
1
;
q
=
name2
+
lstrlenW
(
name2
);
while
(
*
p
==
'.'
&&
p
>=
name1
)
p
--
;
while
(
p
>
name1
&&
p
[
-
1
]
==
'.'
)
p
--
;
while
(
*
q
==
'.'
&&
q
>=
name2
)
q
--
;
while
(
q
>
name2
&&
q
[
-
1
]
==
'.'
)
q
--
;
if
(
p
-
name1
!=
q
-
name2
)
return
FALSE
;
return
CompareStringOrdinal
(
name1
,
p
-
name1
,
name2
,
q
-
name2
,
TRUE
)
==
CSTR_EQUAL
;
while
(
name1
<=
p
)
{
if
(
toupperW
(
*
name1
)
!=
toupperW
(
*
name2
))
return
FALSE
;
name1
++
;
name2
++
;
}
return
TRUE
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -141,9 +130,7 @@ DNS_STATUS WINAPI DnsValidateName_W( PCWSTR name, DNS_NAME_FORMAT format )
...
@@ -141,9 +130,7 @@ DNS_STATUS WINAPI DnsValidateName_W( PCWSTR name, DNS_NAME_FORMAT format )
{
{
PCWSTR
p
;
PCWSTR
p
;
unsigned
int
i
,
j
,
state
=
0
;
unsigned
int
i
,
j
,
state
=
0
;
static
const
WCHAR
invalid
[]
=
{
static
const
WCHAR
invalid
[]
=
L"{|}~[
\\
]^':;<=>?@!
\"
#$%&`()+/,"
;
'{'
,
'|'
,
'}'
,
'~'
,
'['
,
'\\'
,
']'
,
'^'
,
'\''
,
':'
,
';'
,
'<'
,
'='
,
'>'
,
'?'
,
'@'
,
'!'
,
'\"'
,
'#'
,
'$'
,
'%'
,
'^'
,
'`'
,
'('
,
')'
,
'+'
,
'/'
,
','
,
0
};
TRACE
(
"(%s, %d)
\n
"
,
debugstr_w
(
name
),
format
);
TRACE
(
"(%s, %d)
\n
"
,
debugstr_w
(
name
),
format
);
...
@@ -162,7 +149,7 @@ DNS_STATUS WINAPI DnsValidateName_W( PCWSTR name, DNS_NAME_FORMAT format )
...
@@ -162,7 +149,7 @@ DNS_STATUS WINAPI DnsValidateName_W( PCWSTR name, DNS_NAME_FORMAT format )
if
(
j
>
62
)
state
|=
HAS_LONG_LABEL
;
if
(
j
>
62
)
state
|=
HAS_LONG_LABEL
;
if
(
strchrW
(
invalid
,
*
p
))
state
|=
HAS_INVALID
;
if
(
wcschr
(
invalid
,
*
p
))
state
|=
HAS_INVALID
;
else
if
((
unsigned
)
*
p
>
127
)
state
|=
HAS_EXTENDED
;
else
if
((
unsigned
)
*
p
>
127
)
state
|=
HAS_EXTENDED
;
else
if
(
*
p
==
' '
)
state
|=
HAS_SPACE
;
else
if
(
*
p
==
' '
)
state
|=
HAS_SPACE
;
else
if
(
*
p
==
'_'
)
state
|=
HAS_UNDERSCORE
;
else
if
(
*
p
==
'_'
)
state
|=
HAS_UNDERSCORE
;
...
...
dlls/dnsapi/record.c
View file @
5ad5be89
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#include "windns.h"
#include "windns.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "dnsapi.h"
#include "dnsapi.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dnsapi
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dnsapi
);
...
@@ -450,8 +449,8 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -450,8 +449,8 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
MINFO
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
MINFO
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
MINFO
.
pNameMailbox
)
+
1
)
*
sizeof
(
WCHAR
)
+
(
wcslen
(
dst
->
Data
.
MINFO
.
pNameMailbox
)
+
1
)
*
sizeof
(
WCHAR
)
+
(
strlenW
(
dst
->
Data
.
MINFO
.
pNameErrorsMailbox
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
MINFO
.
pNameErrorsMailbox
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
case
DNS_TYPE_AFSDB
:
case
DNS_TYPE_AFSDB
:
...
@@ -463,7 +462,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -463,7 +462,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
MX
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
MX
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
MX
.
pNameExchange
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
MX
.
pNameExchange
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
case
DNS_TYPE_NXT
:
case
DNS_TYPE_NXT
:
...
@@ -473,7 +472,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -473,7 +472,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
NXT
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
NXT
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
NXT
.
pNameNext
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
NXT
.
pNameNext
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
case
DNS_TYPE_CNAME
:
case
DNS_TYPE_CNAME
:
...
@@ -490,7 +489,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -490,7 +489,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
PTR
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
PTR
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
PTR
.
pNameHost
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
PTR
.
pNameHost
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
case
DNS_TYPE_SIG
:
case
DNS_TYPE_SIG
:
...
@@ -500,7 +499,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -500,7 +499,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
SIG
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
SIG
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
SIG
.
pNameSigner
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
SIG
.
pNameSigner
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
case
DNS_TYPE_SOA
:
case
DNS_TYPE_SOA
:
...
@@ -517,8 +516,8 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -517,8 +516,8 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
SOA
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
SOA
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
SOA
.
pNamePrimaryServer
)
+
1
)
*
sizeof
(
WCHAR
)
+
(
wcslen
(
dst
->
Data
.
SOA
.
pNamePrimaryServer
)
+
1
)
*
sizeof
(
WCHAR
)
+
(
strlenW
(
dst
->
Data
.
SOA
.
pNameAdministrator
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
SOA
.
pNameAdministrator
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
case
DNS_TYPE_SRV
:
case
DNS_TYPE_SRV
:
...
@@ -528,7 +527,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
...
@@ -528,7 +527,7 @@ PDNS_RECORD WINAPI DnsRecordCopyEx( PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
SRV
);
dst
->
wDataLength
=
sizeof
(
dst
->
Data
.
SRV
);
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
if
(
out
==
DnsCharSetUnicode
)
dst
->
wDataLength
+=
(
strlenW
(
dst
->
Data
.
SRV
.
pNameTarget
)
+
1
)
*
sizeof
(
WCHAR
);
(
wcslen
(
dst
->
Data
.
SRV
.
pNameTarget
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
break
;
}
}
default:
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment