Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
40a6a74a
Commit
40a6a74a
authored
Feb 20, 2006
by
Vitaly Lipatov
Committed by
Alexandre Julliard
Feb 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winsock: Add check for sin6_scope_id.
parent
334e1911
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
26 deletions
+145
-26
configure
configure
+121
-0
configure.ac
configure.ac
+9
-0
socket.c
dlls/winsock/socket.c
+12
-26
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
40a6a74a
...
...
@@ -18550,6 +18550,127 @@ _ACEOF
fi
echo
"
$as_me
:
$LINENO
: checking for struct sockaddr_in6.sin6_scope_id"
>
&5
echo
$ECHO_N
"checking for struct sockaddr_in6.sin6_scope_id...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_member_struct_sockaddr_in6_sin6_scope_id
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
int
main ()
{
static struct sockaddr_in6 ac_aggr;
if (ac_aggr.sin6_scope_id)
return 0;
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_compile
\"
"
)
>
&5
(
eval
$ac_compile
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
&&
{
ac_try
=
'test -s conftest.$ac_objext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_member_struct_sockaddr_in6_sin6_scope_id
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
int
main ()
{
static struct sockaddr_in6 ac_aggr;
if (sizeof ac_aggr.sin6_scope_id)
return 0;
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_compile
\"
"
)
>
&5
(
eval
$ac_compile
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
&&
{
ac_try
=
'test -s conftest.$ac_objext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_member_struct_sockaddr_in6_sin6_scope_id
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_member_struct_sockaddr_in6_sin6_scope_id
=
no
fi
rm
-f
conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
rm
-f
conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_member_struct_sockaddr_in6_sin6_scope_id
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_member_struct_sockaddr_in6_sin6_scope_id
"
>
&6
if
test
$ac_cv_member_struct_sockaddr_in6_sin6_scope_id
=
yes
;
then
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
_ACEOF
fi
echo
"
$as_me
:
$LINENO
: checking for timezone variable"
>
&5
echo
$ECHO_N
"checking for timezone variable...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_have_timezone
+set
}
"
=
set
;
then
...
...
configure.ac
View file @
40a6a74a
...
...
@@ -1367,6 +1367,15 @@ AC_CHECK_MEMBERS([struct option.name],,,
dnl Check for stat.st_blocks
AC_CHECK_MEMBERS([struct stat.st_blocks])
dnl Check for sin6_scope_id
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])
dnl Check for the external timezone variables timezone and daylight
AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
AC_TRY_LINK([#include <time.h>],[timezone;],
...
...
dlls/winsock/socket.c
View file @
40a6a74a
...
...
@@ -930,28 +930,20 @@ static struct sockaddr* ws_sockaddr_ws2u(const struct WS_sockaddr* wsaddr, int w
case
WS_AF_INET6
:
{
struct
sockaddr_in6
*
uin6
;
const
struct
WS_sockaddr_in6
*
win6
=
(
struct
WS_sockaddr_in6
*
)
wsaddr
;
const
struct
WS_sockaddr_in6_old
*
win6old
=
(
struct
WS_sockaddr_in6_old
*
)
wsaddr
;
/* Note: Windows has 2 versions of the sockaddr_in6 struct, one with
* scope_id, one without. Check:
* http://msdn.microsoft.com/library/en-us/winsock/winsock/sockaddr_2.asp
*/
if
(
wsaddrlen
==
sizeof
(
struct
WS_sockaddr_in6_old
))
{
*
uaddrlen
=
sizeof
(
struct
sockaddr_in6
);
uin6
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
*
uaddrlen
);
uin6
->
sin6_family
=
AF_INET6
;
uin6
->
sin6_port
=
win6old
->
sin6_port
;
uin6
->
sin6_flowinfo
=
win6old
->
sin6_flowinfo
;
memcpy
(
&
uin6
->
sin6_addr
,
&
win6old
->
sin6_addr
,
16
);
/* 16 bytes = 128 address bits */
return
(
struct
sockaddr
*
)
uin6
;
}
if
(
wsaddrlen
>=
sizeof
(
struct
WS_sockaddr_in6
))
{
if
(
wsaddrlen
>=
sizeof
(
struct
WS_sockaddr_in6_old
))
{
*
uaddrlen
=
sizeof
(
struct
sockaddr_in6
);
uin6
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
*
uaddrlen
);
uin6
->
sin6_family
=
AF_INET6
;
uin6
->
sin6_port
=
win6
->
sin6_port
;
uin6
->
sin6_flowinfo
=
win6
->
sin6_flowinfo
;
uin6
->
sin6_scope_id
=
win6
->
sin6_scope_id
;
#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
if
(
wsaddrlen
>=
sizeof
(
struct
WS_sockaddr_in6
))
uin6
->
sin6_scope_id
=
win6
->
sin6_scope_id
;
#endif
memcpy
(
&
uin6
->
sin6_addr
,
&
win6
->
sin6_addr
,
16
);
/* 16 bytes = 128 address bits */
return
(
struct
sockaddr
*
)
uin6
;
}
...
...
@@ -1066,28 +1058,22 @@ static int ws_sockaddr_u2ws(const struct sockaddr* uaddr, int uaddrlen, struct W
#endif
case
AF_INET6
:
{
const
struct
sockaddr_in6
*
uin6
=
(
struct
sockaddr_in6
*
)
uaddr
;
struct
WS_sockaddr_in6
*
win6
=
(
struct
WS_sockaddr_in6
*
)
wsaddr
;
struct
WS_sockaddr_in6_old
*
win6old
=
(
struct
WS_sockaddr_in6_old
*
)
wsaddr
;
if
(
*
wsaddrlen
<
sizeof
(
struct
WS_sockaddr_in6_old
))
return
-
1
;
if
(
*
wsaddrlen
==
sizeof
(
struct
WS_sockaddr_in6_old
))
{
win6old
->
sin6_family
=
WS_AF_INET6
;
win6old
->
sin6_port
=
uin6
->
sin6_port
;
win6old
->
sin6_flowinfo
=
uin6
->
sin6_flowinfo
;
memcpy
(
&
win6old
->
sin6_addr
,
&
uin6
->
sin6_addr
,
16
);
/* 16 bytes = 128 address bits */
*
wsaddrlen
=
sizeof
(
struct
WS_sockaddr_in6_old
);
return
0
;
}
win6old
->
sin6_family
=
WS_AF_INET6
;
win6old
->
sin6_port
=
uin6
->
sin6_port
;
win6old
->
sin6_flowinfo
=
uin6
->
sin6_flowinfo
;
memcpy
(
&
win6old
->
sin6_addr
,
&
uin6
->
sin6_addr
,
16
);
/* 16 bytes = 128 address bits */
*
wsaddrlen
=
sizeof
(
struct
WS_sockaddr_in6_old
);
#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
if
(
*
wsaddrlen
>=
sizeof
(
struct
WS_sockaddr_in6
))
{
win6
->
sin6_family
=
WS_AF_INET6
;
win6
->
sin6_port
=
uin6
->
sin6_port
;
win6
->
sin6_flowinfo
=
uin6
->
sin6_flowinfo
;
memcpy
(
&
win6
->
sin6_addr
,
&
uin6
->
sin6_addr
,
16
);
/* 16 bytes = 128 address bits */
struct
WS_sockaddr_in6
*
win6
=
(
struct
WS_sockaddr_in6
*
)
wsaddr
;
win6
->
sin6_scope_id
=
uin6
->
sin6_scope_id
;
*
wsaddrlen
=
sizeof
(
struct
WS_sockaddr_in6
);
return
0
;
}
#endif
return
0
;
}
case
AF_INET
:
{
...
...
include/config.h.in
View file @
40a6a74a
...
...
@@ -629,6 +629,9 @@
/* Define to 1 if `name' is member of `struct option'. */
#undef HAVE_STRUCT_OPTION_NAME
/* Define to 1 if `sin6_scope_id' is member of `struct sockaddr_in6'. */
#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
...
...
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