]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Need sockets module.
authorSimon Josefsson <simon@josefsson.org>
Tue, 21 Apr 2009 11:27:38 +0000 (13:27 +0200)
committerSimon Josefsson <simon@josefsson.org>
Tue, 21 Apr 2009 11:27:38 +0000 (13:27 +0200)
gl/Makefile.am
gl/m4/gnulib-cache.m4
gl/m4/gnulib-comp.m4
gl/sockets.c [moved from gl/tests/sockets.c with 100% similarity]
gl/sockets.h [moved from gl/tests/sockets.h with 100% similarity]
gl/tests/Makefile.am
gl/tests/dummy.c [new file with mode: 0644]

index d3f8a53ab26d80ac5984abc07c072f6208d72c34..db003a5038bf949c6b13e63d5a2f3419ddbd6f4c 100644 (file)
@@ -9,7 +9,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sockets sys_stat version-etc-fsf warnings
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -527,6 +527,14 @@ EXTRA_libgnu_la_SOURCES += socket.c
 
 ## end   gnulib module socket
 
+## begin gnulib module sockets
+
+libgnu_la_SOURCES += sockets.h sockets.c
+
+EXTRA_DIST += w32sock.h
+
+## end   gnulib module sockets
+
 ## begin gnulib module stdarg
 
 BUILT_SOURCES += $(STDARG_H)
index 235b9498e646a0ef9ac5bd09ff75b127ad64d55c..edf088a6813e638d70bb6fb7913a5b3b0544740b 100644 (file)
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sockets sys_stat version-etc-fsf warnings
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -54,6 +54,7 @@ gl_MODULES([
   setsockopt
   shutdown
   socket
+  sockets
   sys_stat
   version-etc-fsf
   warnings
index e8e36322c17315f103a23b54239187520b720533..db94eda7ac7e927a5b680580f2955ade32489981 100644 (file)
@@ -158,6 +158,7 @@ AC_SUBST([LTALLOCA])
     AC_LIBOBJ([socket])
   fi
   gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+  gl_SOCKETS
   gl_TYPE_SOCKLEN_T
   gl_STDARG_H
   AM_STDBOOL_H
@@ -229,7 +230,6 @@ AC_SUBST([LTALLOCA])
   gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
   gl_MODULE_INDICATOR([ioctl])
   AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
-  gl_SOCKETS
   gt_TYPE_WCHAR_T
   gt_TYPE_WINT_T
   gl_SYS_IOCTL_H
@@ -390,6 +390,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/size_max.h
   lib/snprintf.c
   lib/socket.c
+  lib/sockets.c
+  lib/sockets.h
   lib/stdarg.in.h
   lib/stdbool.in.h
   lib/stdint.in.h
@@ -520,10 +522,9 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-unistd.c
   tests/test-vasnprintf.c
   tests/test-wchar.c
+  tests=lib/dummy.c
   tests=lib/gettimeofday.c
   tests=lib/ioctl.c
-  tests=lib/sockets.c
-  tests=lib/sockets.h
   tests=lib/sys_ioctl.in.h
   tests=lib/verify.h
   tests=lib/w32sock.h
similarity index 100%
rename from gl/tests/sockets.c
rename to gl/sockets.c
similarity index 100%
rename from gl/tests/sockets.h
rename to gl/sockets.h
index 92458c1b1a7df3f3f932c606335b44db91a9a33a..d6d7b0308578eedc7d65d6106ccbeed3228aa326 100644 (file)
@@ -209,14 +209,6 @@ EXTRA_DIST += test-snprintf.c
 
 ## end   gnulib module snprintf-tests
 
-## begin gnulib module sockets
-
-libtests_a_SOURCES += sockets.h sockets.c
-
-EXTRA_DIST += w32sock.h
-
-## end   gnulib module sockets
-
 ## begin gnulib module sockets-tests
 
 TESTS += test-sockets
@@ -375,6 +367,12 @@ EXTRA_DIST += test-wchar.c
 
 ## end   gnulib module wchar-tests
 
+## begin gnulib module dummy
+
+libtests_a_SOURCES += dummy.c
+
+## end   gnulib module dummy
+
 # Clean up after Solaris cc.
 clean-local:
        rm -rf SunWS_cache
diff --git a/gl/tests/dummy.c b/gl/tests/dummy.c
new file mode 100644 (file)
index 0000000..ccb5c26
--- /dev/null
@@ -0,0 +1,42 @@
+/* A dummy file, to prevent empty libraries from breaking builds.
+   Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
+   libraries without any object files.  You might get an error like:
+
+   > ar cru .libs/libgl.a
+   > ar: no archive members specified
+
+   Compiling this file, and adding its object file to the library, will
+   prevent the library from being empty.  */
+
+/* Some systems, such as Solaris with cc 5.0, refuse to work with libraries
+   that don't export any symbol.  You might get an error like:
+
+   > cc ... libgnu.a
+   > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a
+
+   Compiling this file, and adding its object file to the library, will
+   prevent the library from exporting no symbols.  */
+
+#ifdef __sun
+/* This declaration ensures that the library will export at least 1 symbol.  */
+int gl_dummy_symbol;
+#else
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+#endif