Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
578
Issues
578
List
Boards
Labels
Service Desk
Milestones
Merge Requests
109
Merge Requests
109
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
194b6a25
Commit
194b6a25
authored
Aug 28, 1999
by
Michael Graff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sendmsg() and recvmsg() work on solaris and hpux through nasty methods
parent
2dcb05b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
51 deletions
+87
-51
acconfig.h
acconfig.h
+9
-1
config.h.in
config.h.in
+9
-1
configure
configure
+43
-31
configure.in
configure.in
+9
-3
lib/isc/unix/socket.c
lib/isc/unix/socket.c
+17
-15
No files found.
acconfig.h
View file @
194b6a25
...
@@ -33,5 +33,13 @@
...
@@ -33,5 +33,13 @@
/* define if catgets() is available */
/* define if catgets() is available */
#undef HAVE_CATGETS
#undef HAVE_CATGETS
/*
D
efine if you have the NET_RT_IFLIST sysctl variable. */
/*
d
efine if you have the NET_RT_IFLIST sysctl variable. */
#undef HAVE_IFLIST_SYSCTL
#undef HAVE_IFLIST_SYSCTL
/* define if you need to #define _XPG4_2 before including sys/socket.h */
#undef NEED_XPG4_2_BEFORE_SOCKET_H
/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
* sys/socket.h
*/
#undef NEED_XSE_BEFORE_SOCKET_H
config.h.in
View file @
194b6a25
...
@@ -33,9 +33,17 @@
...
@@ -33,9 +33,17 @@
/* define if catgets() is available */
/* define if catgets() is available */
#undef HAVE_CATGETS
#undef HAVE_CATGETS
/*
D
efine if you have the NET_RT_IFLIST sysctl variable. */
/*
d
efine if you have the NET_RT_IFLIST sysctl variable. */
#undef HAVE_IFLIST_SYSCTL
#undef HAVE_IFLIST_SYSCTL
/* define if you need to #define _XPG4_2 before including sys/socket.h */
#undef NEED_XPG4_2_BEFORE_SOCKET_H
/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
* sys/socket.h
*/
#undef NEED_XSE_BEFORE_SOCKET_H
/* Define if you have the <fcntl.h> header file. */
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
#undef HAVE_FCNTL_H
...
...
configure
View file @
194b6a25
#! /bin/sh
#! /bin/sh
# From configure.in Revision: 1.
49
# From configure.in Revision: 1.
50
...
@@ -2056,8 +2056,20 @@ fi
...
@@ -2056,8 +2056,20 @@ fi
case
"
$host
"
in
case
"
$host
"
in
*
-dec-osf
*
)
*
-dec-osf
*
)
cat
>>
confdefs.h
<<
\
EOF
cat
>>
confdefs.h
<<
\
EOF
#define _SOCKADDR_LEN 1
#define _SOCKADDR_LEN 1
EOF
;;
*
-sun-solaris
*
)
cat
>>
confdefs.h
<<
\
EOF
#define NEED_XPG4_2_BEFORE_SOCKET_H 1
EOF
;;
*
-hp-hpux
*
)
cat
>>
confdefs.h
<<
\
EOF
#define NEED_XSE_BEFORE_SOCKET_H 1
EOF
EOF
;;
;;
...
@@ -2065,9 +2077,9 @@ esac
...
@@ -2065,9 +2077,9 @@ esac
echo
$ac_n
"checking for sa_len in struct sockaddr""...
$ac_c
"
1>&6
echo
$ac_n
"checking for sa_len in struct sockaddr""...
$ac_c
"
1>&6
echo
"configure:20
69
: checking for sa_len in struct sockaddr"
>
&5
echo
"configure:20
81
: checking for sa_len in struct sockaddr"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 20
71
"configure"
#line 20
83
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/types.h>
...
@@ -2076,7 +2088,7 @@ int main() {
...
@@ -2076,7 +2088,7 @@ int main() {
struct sockaddr sa; sa.sa_len = 0; return (0);
struct sockaddr sa; sa.sa_len = 0; return (0);
; return 0; }
; return 0; }
EOF
EOF
if
{
(
eval echo
configure:20
80
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:20
92
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
echo
"
$ac_t
""yes"
1>&6
ISC_NET_HAVESALEN
=
"#define ISC_NET_HAVESALEN 1"
ISC_NET_HAVESALEN
=
"#define ISC_NET_HAVESALEN 1"
...
@@ -2092,9 +2104,9 @@ rm -f conftest*
...
@@ -2092,9 +2104,9 @@ rm -f conftest*
echo
$ac_n
"checking for interface list sysctl""...
$ac_c
"
1>&6
echo
$ac_n
"checking for interface list sysctl""...
$ac_c
"
1>&6
echo
"configure:2
096
: checking for interface list sysctl"
>
&5
echo
"configure:2
108
: checking for interface list sysctl"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 2
098
"configure"
#line 2
110
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/param.h>
#include <sys/param.h>
...
@@ -2201,7 +2213,7 @@ else
...
@@ -2201,7 +2213,7 @@ else
fi
fi
echo
$ac_n
"checking build system type""...
$ac_c
"
1>&6
echo
$ac_n
"checking build system type""...
$ac_c
"
1>&6
echo
"configure:22
05
: checking build system type"
>
&5
echo
"configure:22
17
: checking build system type"
>
&5
build_alias
=
$build
build_alias
=
$build
case
"
$build_alias
"
in
case
"
$build_alias
"
in
...
@@ -2230,7 +2242,7 @@ ac_prog=ld
...
@@ -2230,7 +2242,7 @@ ac_prog=ld
if
test
"
$ac_cv_prog_gcc
"
=
yes
;
then
if
test
"
$ac_cv_prog_gcc
"
=
yes
;
then
# Check if gcc -print-prog-name=ld gives a path.
# Check if gcc -print-prog-name=ld gives a path.
echo
$ac_n
"checking for ld used by GCC""...
$ac_c
"
1>&6
echo
$ac_n
"checking for ld used by GCC""...
$ac_c
"
1>&6
echo
"configure:22
34
: checking for ld used by GCC"
>
&5
echo
"configure:22
46
: checking for ld used by GCC"
>
&5
ac_prog
=
`
(
$CC
-print-prog-name
=
ld
)
2>&5
`
ac_prog
=
`
(
$CC
-print-prog-name
=
ld
)
2>&5
`
case
"
$ac_prog
"
in
case
"
$ac_prog
"
in
# Accept absolute paths.
# Accept absolute paths.
...
@@ -2254,10 +2266,10 @@ echo "configure:2234: checking for ld used by GCC" >&5
...
@@ -2254,10 +2266,10 @@ echo "configure:2234: checking for ld used by GCC" >&5
esac
esac
elif
test
"
$with_gnu_ld
"
=
yes
;
then
elif
test
"
$with_gnu_ld
"
=
yes
;
then
echo
$ac_n
"checking for GNU ld""...
$ac_c
"
1>&6
echo
$ac_n
"checking for GNU ld""...
$ac_c
"
1>&6
echo
"configure:22
58
: checking for GNU ld"
>
&5
echo
"configure:22
70
: checking for GNU ld"
>
&5
else
else
echo
$ac_n
"checking for non-GNU ld""...
$ac_c
"
1>&6
echo
$ac_n
"checking for non-GNU ld""...
$ac_c
"
1>&6
echo
"configure:22
61
: checking for non-GNU ld"
>
&5
echo
"configure:22
73
: checking for non-GNU ld"
>
&5
fi
fi
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_LD
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_LD
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
@@ -2293,7 +2305,7 @@ fi
...
@@ -2293,7 +2305,7 @@ fi
test
-z
"
$LD
"
&&
{
echo
"configure: error: no acceptable ld found in
\$
PATH"
1>&2
;
exit
1
;
}
test
-z
"
$LD
"
&&
{
echo
"configure: error: no acceptable ld found in
\$
PATH"
1>&2
;
exit
1
;
}
echo
$ac_n
"checking if the linker (
$LD
) is GNU ld""...
$ac_c
"
1>&6
echo
$ac_n
"checking if the linker (
$LD
) is GNU ld""...
$ac_c
"
1>&6
echo
"configure:2
297
: checking if the linker (
$LD
) is GNU ld"
>
&5
echo
"configure:2
309
: checking if the linker (
$LD
) is GNU ld"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_gnu_ld
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_gnu_ld
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
...
@@ -2309,7 +2321,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
...
@@ -2309,7 +2321,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo
$ac_n
"checking for BSD-compatible nm""...
$ac_c
"
1>&6
echo
$ac_n
"checking for BSD-compatible nm""...
$ac_c
"
1>&6
echo
"configure:23
13
: checking for BSD-compatible nm"
>
&5
echo
"configure:23
25
: checking for BSD-compatible nm"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_NM
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_NM
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
...
@@ -2346,7 +2358,7 @@ echo "$ac_t""$NM" 1>&6
...
@@ -2346,7 +2358,7 @@ echo "$ac_t""$NM" 1>&6
echo
$ac_n
"checking whether ln -s works""...
$ac_c
"
1>&6
echo
$ac_n
"checking whether ln -s works""...
$ac_c
"
1>&6
echo
"configure:23
50
: checking whether ln -s works"
>
&5
echo
"configure:23
62
: checking whether ln -s works"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_LN_S
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_LN_S
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
...
@@ -2390,8 +2402,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
...
@@ -2390,8 +2402,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
case
"
$host
"
in
case
"
$host
"
in
*
-
*
-irix6
*
)
*
-
*
-irix6
*
)
# Find out which ABI we are using.
# Find out which ABI we are using.
echo
'#line 2
394
"configure"'
>
conftest.
$ac_ext
echo
'#line 2
406
"configure"'
>
conftest.
$ac_ext
if
{
(
eval echo
configure:2
395
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:2
407
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
case
"
`
/usr/bin/file conftest.o
`
"
in
case
"
`
/usr/bin/file conftest.o
`
"
in
*
32-bit
*
)
*
32-bit
*
)
LD
=
"
${
LD
-ld
}
-32"
LD
=
"
${
LD
-ld
}
-32"
...
@@ -2412,19 +2424,19 @@ case "$host" in
...
@@ -2412,19 +2424,19 @@ case "$host" in
SAVE_CFLAGS
=
"
$CFLAGS
"
SAVE_CFLAGS
=
"
$CFLAGS
"
CFLAGS
=
"
$CFLAGS
-belf"
CFLAGS
=
"
$CFLAGS
-belf"
echo
$ac_n
"checking whether the C compiler needs -belf""...
$ac_c
"
1>&6
echo
$ac_n
"checking whether the C compiler needs -belf""...
$ac_c
"
1>&6
echo
"configure:24
16
: checking whether the C compiler needs -belf"
>
&5
echo
"configure:24
28
: checking whether the C compiler needs -belf"
>
&5
if
eval
"test
\"
`
echo
'$''{'
lt_cv_cc_needs_belf
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
lt_cv_cc_needs_belf
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 24
21
"configure"
#line 24
33
"configure"
#include "confdefs.h"
#include "confdefs.h"
int main() {
int main() {
; return 0; }
; return 0; }
EOF
EOF
if
{
(
eval echo
configure:24
28
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:24
40
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
rm
-rf
conftest
*
lt_cv_cc_needs_belf
=
yes
lt_cv_cc_needs_belf
=
yes
else
else
...
@@ -2539,9 +2551,9 @@ esac
...
@@ -2539,9 +2551,9 @@ esac
echo
$ac_n
"checking for IPv6 structures""...
$ac_c
"
1>&6
echo
$ac_n
"checking for IPv6 structures""...
$ac_c
"
1>&6
echo
"configure:25
43
: checking for IPv6 structures"
>
&5
echo
"configure:25
55
: checking for IPv6 structures"
>
&5
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 25
45
"configure"
#line 25
57
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/types.h>
...
@@ -2551,7 +2563,7 @@ int main() {
...
@@ -2551,7 +2563,7 @@ int main() {
struct sockaddr_in6 sin6; return (0);
struct sockaddr_in6 sin6; return (0);
; return 0; }
; return 0; }
EOF
EOF
if
{
(
eval echo
configure:25
55
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:25
67
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
rm
-rf
conftest
*
echo
"
$ac_t
""yes"
1>&6
echo
"
$ac_t
""yes"
1>&6
ISC_NET_HAVEIPV6
=
"#define ISC_NET_HAVEIPV6 1"
ISC_NET_HAVEIPV6
=
"#define ISC_NET_HAVEIPV6 1"
...
@@ -2574,12 +2586,12 @@ rm -f conftest*
...
@@ -2574,12 +2586,12 @@ rm -f conftest*
echo
$ac_n
"checking for inet_ntop""...
$ac_c
"
1>&6
echo
$ac_n
"checking for inet_ntop""...
$ac_c
"
1>&6
echo
"configure:25
78
: checking for inet_ntop"
>
&5
echo
"configure:25
90
: checking for inet_ntop"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_inet_ntop
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_inet_ntop
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 25
83
"configure"
#line 25
95
"configure"
#include "confdefs.h"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_ntop(); below. */
which can conflict with char inet_ntop(); below. */
...
@@ -2602,7 +2614,7 @@ inet_ntop();
...
@@ -2602,7 +2614,7 @@ inet_ntop();
; return 0; }
; return 0; }
EOF
EOF
if
{
(
eval echo
configure:26
06
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:26
18
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
rm
-rf
conftest
*
eval
"ac_cv_func_inet_ntop=yes"
eval
"ac_cv_func_inet_ntop=yes"
else
else
...
@@ -2626,12 +2638,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
...
@@ -2626,12 +2638,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
fi
fi
echo
$ac_n
"checking for inet_pton""...
$ac_c
"
1>&6
echo
$ac_n
"checking for inet_pton""...
$ac_c
"
1>&6
echo
"configure:26
30
: checking for inet_pton"
>
&5
echo
"configure:26
42
: checking for inet_pton"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_inet_pton
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_inet_pton
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 26
35
"configure"
#line 26
47
"configure"
#include "confdefs.h"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_pton(); below. */
which can conflict with char inet_pton(); below. */
...
@@ -2654,7 +2666,7 @@ inet_pton();
...
@@ -2654,7 +2666,7 @@ inet_pton();
; return 0; }
; return 0; }
EOF
EOF
if
{
(
eval echo
configure:26
58
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:26
70
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
rm
-rf
conftest
*
eval
"ac_cv_func_inet_pton=yes"
eval
"ac_cv_func_inet_pton=yes"
else
else
...
@@ -2678,12 +2690,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
...
@@ -2678,12 +2690,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
fi
fi
echo
$ac_n
"checking for inet_aton""...
$ac_c
"
1>&6
echo
$ac_n
"checking for inet_aton""...
$ac_c
"
1>&6
echo
"configure:26
82
: checking for inet_aton"
>
&5
echo
"configure:26
94
: checking for inet_aton"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_inet_aton
'+set}'
`
\"
= set"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_inet_aton
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
else
cat
>
conftest.
$ac_ext
<<
EOF
cat
>
conftest.
$ac_ext
<<
EOF
#line 26
87
"configure"
#line 26
99
"configure"
#include "confdefs.h"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
which can conflict with char inet_aton(); below. */
...
@@ -2706,7 +2718,7 @@ inet_aton();
...
@@ -2706,7 +2718,7 @@ inet_aton();
; return 0; }
; return 0; }
EOF
EOF
if
{
(
eval echo
configure:27
10
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:27
22
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
rm
-rf
conftest
*
rm
-rf
conftest
*
eval
"ac_cv_func_inet_aton=yes"
eval
"ac_cv_func_inet_aton=yes"
else
else
...
...
configure.in
View file @
194b6a25
...
@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
...
@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl SOFTWARE.
dnl SOFTWARE.
AC_REVISION($Revision: 1.5
0
$)
AC_REVISION($Revision: 1.5
1
$)
AC_PREREQ(2.13)
AC_PREREQ(2.13)
...
@@ -239,10 +239,16 @@ dnl
...
@@ -239,10 +239,16 @@ dnl
case "$host" in
case "$host" in
*-dec-osf*)
*-dec-osf*)
dnl Turn on 4.4BSD style sa_len support.
dnl Turn on 4.4BSD style sa_len support.
dnl (Disabled for now because it is incompatible
dnl with the use of send() and recv()).
AC_DEFINE(_SOCKADDR_LEN)
AC_DEFINE(_SOCKADDR_LEN)
;;
;;
*-sun-solaris*)
dnl Solaris has yet another trick to get 4.4BSD behavior
AC_DEFINE(NEED_XPG4_2_BEFORE_SOCKET_H)
;;
*-hp-hpux*)
dnl And HP has to be different, too.
AC_DEFINE(NEED_XSE_BEFORE_SOCKET_H)
;;
esac
esac
dnl
dnl
...
...
lib/isc/unix/socket.c
View file @
194b6a25
...
@@ -19,6 +19,17 @@
...
@@ -19,6 +19,17 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/uio.h>
#if defined(NEED_XPG4_2_BEFORE_SOCKET_H) && !defined(_XPG4_2)
#define _XPG4_2
#include <sys/socket.h>
#undef _XPG4_2
#elif defined(NEED_XSE_BEFORE_SOCKET_H) && !defined(_XOPEN_SOURCE_EXTENDED)
#define _XOPEN_SOURCE_EXTENDED
#include <sys/socket.h>
#define _XOPEN_SOURCE_EXTENDED
#else
#include <sys/socket.h>
#endif
#include <errno.h>
#include <errno.h>
#include <stddef.h>
#include <stddef.h>
...
@@ -39,19 +50,10 @@
...
@@ -39,19 +50,10 @@
/*
/*
* Some systems define the socket length argument as an int, some as size_t,
* Some systems define the socket length argument as an int, some as size_t,
* some as socklen_t. This is here
,
so it can be easily changed if needed.
* some as socklen_t. This is here so it can be easily changed if needed.
*/
*/
#ifndef ISC_SOCKADDR_LEN_T
#ifndef ISC_SOCKADDR_LEN_T
#define ISC_SOCKADDR_LEN_T int
#define ISC_SOCKADDR_LEN_T unsigned int
#endif
/*
* As above, one system (solaris) wants the pointers passed into recv() and
* the other network functions to be char *. All the others seem to use
* void *. Cast everything to char * for now.
*/
#ifndef ISC_SOCKDATA_CAST
#define ISC_SOCKDATA_CAST(x) ((char *)(x))
#endif
#endif
/*
/*
...
@@ -496,7 +498,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
...
@@ -496,7 +498,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
#ifdef SO_TIMESTAMP
#ifdef SO_TIMESTAMP
if
(
type
==
isc_sockettype_udp
if
(
type
==
isc_sockettype_udp
&&
setsockopt
(
sock
->
fd
,
SOL_SOCKET
,
SO_TIMESTAMP
,
&&
setsockopt
(
sock
->
fd
,
SOL_SOCKET
,
SO_TIMESTAMP
,
ISC_SOCKDATA_CAST
(
&
on
)
,
sizeof
on
)
<
0
)
{
(
void
*
)
&
on
,
sizeof
on
)
<
0
)
{
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"setsockopt(%d) failed"
,
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"setsockopt(%d) failed"
,
sock
->
fd
);
sock
->
fd
);
/* Press on... */
/* Press on... */
...
@@ -782,7 +784,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev)
...
@@ -782,7 +784,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev)
* again.
* again.
*/
*/
addrlen
=
sizeof
dev
->
newsocket
->
address
.
type
;
addrlen
=
sizeof
dev
->
newsocket
->
address
.
type
;
fd
=
accept
(
sock
->
fd
,
&
dev
->
newsocket
->
address
.
type
.
sa
,
&
addrlen
);
fd
=
accept
(
sock
->
fd
,
&
dev
->
newsocket
->
address
.
type
.
sa
,
(
void
*
)
&
addrlen
);
dev
->
newsocket
->
address
.
length
=
addrlen
;
dev
->
newsocket
->
address
.
length
=
addrlen
;
if
(
fd
<
0
)
{
if
(
fd
<
0
)
{
if
(
SOFT_ERROR
(
errno
))
{
if
(
SOFT_ERROR
(
errno
))
{
...
@@ -1303,7 +1305,7 @@ watcher(void *uap)
...
@@ -1303,7 +1305,7 @@ watcher(void *uap)
* Process reads on internal, control fd.
* Process reads on internal, control fd.
*/
*/
if
(
FD_ISSET
(
ctlfd
,
&
readfds
))
{
if
(
FD_ISSET
(
ctlfd
,
&
readfds
))
{
while
(
1
)
{
for
(;;
)
{
msg
=
select_readmsg
(
manager
);
msg
=
select_readmsg
(
manager
);
XTRACE
(
TRACE_WATCHER
,
XTRACE
(
TRACE_WATCHER
,
...
@@ -1980,7 +1982,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr)
...
@@ -1980,7 +1982,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr)
LOCK
(
&
sock
->
lock
);
LOCK
(
&
sock
->
lock
);
if
(
setsockopt
(
sock
->
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
if
(
setsockopt
(
sock
->
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
ISC_SOCKDATA_CAST
(
&
on
)
,
sizeof
on
)
<
0
)
{
(
void
*
)
&
on
,
sizeof
on
)
<
0
)
{
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"setsockopt(%d) failed"
,
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"setsockopt(%d) failed"
,
sock
->
fd
);
sock
->
fd
);
/* Press on... */
/* Press on... */
...
...
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