diff options
author | Bruno Haible <bruno@clisp.org> | 2009-08-10 23:00:13 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-08-10 23:00:13 +0200 |
commit | 7f8441f9767253da8deb1f6c73a488220fcbcdd7 (patch) | |
tree | 9e28a1b15b9e8cac1fb6af62d1ee00096628e21c /modules/socket | |
parent | 6c99c5d12c408e6e0429edac4a86771d1543edaf (diff) | |
download | gnulib-7f8441f9767253da8deb1f6c73a488220fcbcdd7.tar.gz |
Make it possible to use module 'gethostname' without module 'close' or 'ioctl'.
Diffstat (limited to 'modules/socket')
-rw-r--r-- | modules/socket | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/socket b/modules/socket index b736fd1d33..f5daa4919b 100644 --- a/modules/socket +++ b/modules/socket @@ -15,6 +15,15 @@ AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([socket]) fi +# When this module is used, sockets may actually occur as file descriptors, +# hence it is worth warning if the modules 'close' and 'ioctl' are not used. +m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) +m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) +AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2]) +if test "$ac_cv_header_winsock2_h" = yes; then + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 +fi gl_SYS_SOCKET_MODULE_INDICATOR([socket]) Makefile.am: |