bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: winsock.c split


From: Bruno Haible
Subject: Re: winsock.c split
Date: Sat, 25 Oct 2008 22:57:01 +0200
User-agent: KMail/1.5.4

After this simplification, it's possible to reduce the dependencies of
m4/sys_socket_h.m4, by use of m4_ifdef. Often the use of m4_ifdef introduces
bugs (think of the situation of "gnulib-tool --create-testdir --tests", where
the .m4 macros of the tests are visible to the configure.ac of the top-level
directory). But here it's ok: If gl_UNISTD_H_DEFAULTS is not defined, it's
allowed to assign values to the variables that it would initialize, even
if they are not initialized.

2008-10-25  Bruno Haible  <address@hidden>

        * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
        gl_UNISTD_H_DEFAULTS, gl_SYS_IOCTL_H_DEFAULTS only if they exist.
        * modules/sys_socket (Files): Remove m4/unistd_h.m4, m4/sys_ioctl_h.m4.

--- m4/sys_socket_h.m4.orig     2008-10-25 22:50:07.000000000 +0200
+++ m4/sys_socket_h.m4  2008-10-25 22:48:54.000000000 +0200
@@ -71,8 +71,8 @@
 # Sets and substitutes HAVE_WINSOCK2_H.
 AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
 [
-  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+  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_CHECK_HEADERS_ONCE([sys/socket.h])
   if test $ac_cv_header_sys_socket_h != yes; then
     dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
--- modules/sys_socket.orig     2008-10-25 22:50:08.000000000 +0200
+++ modules/sys_socket  2008-10-25 22:35:31.000000000 +0200
@@ -5,8 +5,6 @@
 lib/sys_socket.in.h
 m4/sys_socket_h.m4
 m4/sockpfaf.m4
-m4/unistd_h.m4
-m4/sys_ioctl_h.m4
 
 Depends-on:
 include_next





reply via email to

[Prev in Thread] Current Thread [Next in Thread]