From: Bruno Haible Date: Sun, 28 Mar 2010 12:21:28 +0000 (+0200) Subject: Fix link errors on mingw. X-Git-Tag: v0.1~4410 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=2f8144cadad7c1156c9f195a3ef1d53d8aa19ffc;p=gnulib.git Fix link errors on mingw. --- diff --git a/ChangeLog b/ChangeLog index dca5a125c..199c9b869 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ 2010-03-28 Bruno Haible + + 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 Ralf Wildenhues lib-ignore: Determine different options for different compilers. diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h index eee3b57f1..193880a99 100644 --- a/lib/sys_ioctl.in.h +++ b/lib/sys_ioctl.in.h @@ -49,13 +49,18 @@ # 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 diff --git a/modules/sys_ioctl-tests b/modules/sys_ioctl-tests index a647d8f74..d700d3434 100644 --- a/modules/sys_ioctl-tests +++ b/modules/sys_ioctl-tests @@ -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 diff --git a/modules/sys_select-tests b/modules/sys_select-tests index 6e7a5be14..1ba7a4af3 100644 --- a/modules/sys_select-tests +++ b/modules/sys_select-tests @@ -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