summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-05-11 13:36:44 +0200
committerSimon Josefsson <simon@josefsson.org>2009-05-11 13:36:44 +0200
commit19b635a93afa204a634d1967bb258ddd386e0929 (patch)
tree287cdf648189874376031389ad44e58e9427f87f /lib
parentb46bb5678b5a6e82da798f62aac06026e75ba418 (diff)
downloadgnutls-19b635a93afa204a634d1967bb258ddd386e0929.tar.gz
Update gnulib files.
Diffstat (limited to 'lib')
-rw-r--r--lib/gl/Makefile.am2
-rw-r--r--lib/gl/m4/gnulib-cache.m48
-rw-r--r--lib/gl/m4/gnulib-comp.m48
-rw-r--r--lib/gl/sys_socket.in.h14
-rw-r--r--lib/gl/tests/Makefile.am6
-rw-r--r--lib/gl/tests/test-lseek.c6
-rwxr-xr-xlib/gl/tests/test-lseek.sh3
7 files changed, 24 insertions, 23 deletions
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 9a3565800d..d179c75d5b 100644
--- a/lib/gl/Makefile.am
+++ b/lib/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=liblgnu --source-base=lib/gl --m4-base=lib/gl/m4 --doc-base=doc --tests-base=lib/gl/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
AUTOMAKE_OPTIONS = 1.5 gnits
diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4
index e422fa283c..1a1547f588 100644
--- a/lib/gl/m4/gnulib-cache.m4
+++ b/lib/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=liblgnu --source-base=lib/gl --m4-base=lib/gl/m4 --doc-base=doc --tests-base=lib/gl/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
@@ -43,11 +43,11 @@ gl_MODULES([
vasprintf
])
gl_AVOID([])
-gl_SOURCE_BASE([lib/gl])
-gl_M4_BASE([lib/gl/m4])
+gl_SOURCE_BASE([gl])
+gl_M4_BASE([gl/m4])
gl_PO_BASE([])
gl_DOC_BASE([doc])
-gl_TESTS_BASE([lib/gl/tests])
+gl_TESTS_BASE([gl/tests])
gl_WITH_TESTS
gl_LIB([liblgnu])
gl_LGPL([2])
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 9c1e569134..9b873f41dd 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -41,7 +41,7 @@ AC_DEFUN([lgl_INIT],
m4_pushdef([lgl_LIBSOURCES_LIST], [])
m4_pushdef([lgl_LIBSOURCES_DIR], [])
gl_COMMON
- gl_source_base='lib/gl'
+ gl_source_base='gl'
gl_FUNC_ALLOCA
gl_BYTESWAP
gl_HEADER_ERRNO_H
@@ -131,7 +131,7 @@ AC_DEFUN([lgl_INIT],
m4_pushdef([lgltests_LIBSOURCES_LIST], [])
m4_pushdef([lgltests_LIBSOURCES_DIR], [])
gl_COMMON
- gl_source_base='lib/gl/tests'
+ gl_source_base='gl/tests'
gl_FUNC_UNGETC_WORKS
gt_TYPE_WCHAR_T
gt_TYPE_WINT_T
@@ -191,7 +191,7 @@ AC_DEFUN([lgl_REPLACE_FUNCS], [
AC_DEFUN([lgl_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([lgl_LIBSOURCES_DIR], [lib/gl])
+ m4_define([lgl_LIBSOURCES_DIR], [gl])
m4_append([lgl_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])
@@ -218,7 +218,7 @@ AC_DEFUN([lgltests_REPLACE_FUNCS], [
AC_DEFUN([lgltests_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([lgltests_LIBSOURCES_DIR], [lib/gl/tests])
+ m4_define([lgltests_LIBSOURCES_DIR], [gl/tests])
m4_append([lgltests_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])
diff --git a/lib/gl/sys_socket.in.h b/lib/gl/sys_socket.in.h
index a11230b9d5..efe5fff361 100644
--- a/lib/gl/sys_socket.in.h
+++ b/lib/gl/sys_socket.in.h
@@ -44,14 +44,16 @@
#define _GL_SYS_SOCKET_H
#if !@HAVE_STRUCT_SOCKADDR_STORAGE@
-#include <alignof.h>
+# include <alignof.h>
/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
-#define __ss_aligntype unsigned long int
-#define _SS_SIZE 256
-#define _SS_PADSIZE (_SS_SIZE - (max (sizeof (sa_family_t), \
- alignof (__ss_aligntype)) \
- + sizeof (__ss_aligntype)))
+# define __ss_aligntype unsigned long int
+# define _SS_SIZE 256
+# define _SS_PADSIZE \
+ (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \
+ ? sizeof (sa_family_t) \
+ : alignof (__ss_aligntype)) \
+ + sizeof (__ss_aligntype)))
struct sockaddr_storage
{
diff --git a/lib/gl/tests/Makefile.am b/lib/gl/tests/Makefile.am
index cc663e90b1..8aad090943 100644
--- a/lib/gl/tests/Makefile.am
+++ b/lib/gl/tests/Makefile.am
@@ -31,10 +31,10 @@ MAINTAINERCLEANFILES =
AM_CPPFLAGS = \
-I. -I$(srcdir) \
- -I../../.. -I$(srcdir)/../../.. \
- -I../../../lib/gl -I$(srcdir)/../../../lib/gl
+ -I../.. -I$(srcdir)/../.. \
+ -I../../gl -I$(srcdir)/../../gl
-LDADD = libtests.a ../../../lib/gl/liblgnu.la libtests.a $(LIBTESTS_LIBDEPS)
+LDADD = libtests.a ../../gl/liblgnu.la libtests.a $(LIBTESTS_LIBDEPS)
libtests_a_SOURCES =
libtests_a_LIBADD = $(lgltests_LIBOBJS)
diff --git a/lib/gl/tests/test-lseek.c b/lib/gl/tests/test-lseek.c
index 5d9b5c044e..ebba02ec6d 100644
--- a/lib/gl/tests/test-lseek.c
+++ b/lib/gl/tests/test-lseek.c
@@ -85,9 +85,9 @@ main (int argc, char **argv)
case '2': /* closed */
/* Explicitly close file descriptors 0 and 1. The <&- and >&- in the
- invoking shell are not enough on HP-UX.
- close (0); calling close fails on mingw -- simon@josefsson.org
- close (1); */
+ invoking shell are not enough on HP-UX. */
+ close (0);
+ close (1);
errno = 0;
ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
ASSERT (errno == EBADF);
diff --git a/lib/gl/tests/test-lseek.sh b/lib/gl/tests/test-lseek.sh
index ae3b23e57e..e84c2bb493 100755
--- a/lib/gl/tests/test-lseek.sh
+++ b/lib/gl/tests/test-lseek.sh
@@ -11,8 +11,7 @@ tmpfiles=t-lseek.tmp
echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1
# closed descriptors
-# Doesn't work under mingw -- simon@josefsson.org
-#./test-lseek${EXEEXT} 2 <&- >&- || exit 1
+./test-lseek${EXEEXT} 2 <&- >&- || exit 1
rm -rf $tmpfiles
exit 0