summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-04-21 13:27:38 +0200
committerSimon Josefsson <simon@josefsson.org>2009-04-21 13:27:38 +0200
commit36bce285c528255a9c948552ebeb4f1d3759336b (patch)
treefaa379db8c640eadf76428e23005afcb3777dec1 /gl
parent3c65348da9fdcaa75d7f902a833d98b95a71862f (diff)
downloadgnutls-36bce285c528255a9c948552ebeb4f1d3759336b.tar.gz
Need sockets module.
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am10
-rw-r--r--gl/m4/gnulib-cache.m43
-rw-r--r--gl/m4/gnulib-comp.m47
-rw-r--r--gl/sockets.c (renamed from gl/tests/sockets.c)0
-rw-r--r--gl/sockets.h (renamed from gl/tests/sockets.h)0
-rw-r--r--gl/tests/Makefile.am14
-rw-r--r--gl/tests/dummy.c42
7 files changed, 63 insertions, 13 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index d3f8a53ab2..db003a5038 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -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)
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 235b9498e6..edf088a681 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -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
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index e8e36322c1..db94eda7ac 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -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
diff --git a/gl/tests/sockets.c b/gl/sockets.c
index 9d5c547928..9d5c547928 100644
--- a/gl/tests/sockets.c
+++ b/gl/sockets.c
diff --git a/gl/tests/sockets.h b/gl/sockets.h
index b42e368d21..b42e368d21 100644
--- a/gl/tests/sockets.h
+++ b/gl/sockets.h
diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am
index 92458c1b1a..d6d7b03085 100644
--- a/gl/tests/Makefile.am
+++ b/gl/tests/Makefile.am
@@ -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
index 0000000000..ccb5c26f87
--- /dev/null
+++ b/gl/tests/dummy.c
@@ -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