Fix link errors on mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 28 Mar 2010 12:21:28 +0000 (14:21 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Mar 2010 12:21:28 +0000 (14:21 +0200)
ChangeLog
lib/sys_ioctl.in.h
modules/sys_ioctl-tests
modules/sys_select-tests

index dca5a12..199c9b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
 2010-03-28  Bruno Haible  <bruno@clisp.org>
+
+       Fix link errors on mingw.
+       * lib/sys_ioctl.in.h (ioctl): Fix declaration idiom.
+       * modules/sys_ioctl-tests (Makefile.am): Link test-sys_ioctl-c++ with
+       $(LIBSOCKET).
+       * modules/sys_select-tests (Makefile.am): Link test-sys_select-c++ with
+       $(LIBSOCKET).
+
+2010-03-28  Bruno Haible  <bruno@clisp.org>
             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        lib-ignore: Determine different options for different compilers.
index eee3b57..193880a 100644 (file)
 #   undef ioctl
 #   define ioctl rpl_ioctl
 #  endif
+_GL_FUNCDECL_RPL (ioctl, int,
+                  (int fd, int request, ... /* {void *,char *} arg */));
+_GL_CXXALIAS_RPL (ioctl, int,
+                  (int fd, int request, ... /* {void *,char *} arg */));
+# else
 _GL_FUNCDECL_SYS (ioctl, int,
                   (int fd, int request, ... /* {void *,char *} arg */));
-# endif
 /* Need to cast, because on glibc systems, the second parameter is
                                 unsigned long int request.  */
 _GL_CXXALIAS_SYS_CAST (ioctl, int,
                        (int fd, int request, ... /* {void *,char *} arg */));
+# endif
 _GL_CXXALIASWARN (ioctl);
 #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 # undef ioctl
index a647d8f..d700d34 100644 (file)
@@ -15,5 +15,5 @@ if ANSICXX
 TESTS += test-sys_ioctl-c++
 check_PROGRAMS += test-sys_ioctl-c++
 test_sys_ioctl_c___SOURCES = test-sys_ioctl-c++.cc
-test_sys_ioctl_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME)
+test_sys_ioctl_c___LDADD = $(LDADD) $(LIBINTL) $(LIBSOCKET) $(LIB_CLOCK_GETTIME)
 endif
index 6e7a5be..1ba7a4a 100644 (file)
@@ -15,5 +15,5 @@ if ANSICXX
 TESTS += test-sys_select-c++
 check_PROGRAMS += test-sys_select-c++
 test_sys_select_c___SOURCES = test-sys_select-c++.cc
-test_sys_select_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
+test_sys_select_c___LDADD = $(LDADD) $(LIBINTL) $(LIBSOCKET) $(LIB_NANOSLEEP)
 endif