summaryrefslogtreecommitdiff
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
parentb46bb5678b5a6e82da798f62aac06026e75ba418 (diff)
downloadgnutls-19b635a93afa204a634d1967bb258ddd386e0929.tar.gz
Update gnulib files.
-rw-r--r--cfg.mk5
-rw-r--r--gl/sys_socket.in.h14
-rwxr-xr-xgl/tests/test-vc-list-files-git.sh4
-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
-rw-r--r--libextra/gl/gnulib.mk2
-rw-r--r--libextra/gl/m4/gnulib-cache.m48
-rw-r--r--libextra/gl/m4/gnulib-comp.m48
13 files changed, 49 insertions, 39 deletions
diff --git a/cfg.mk b/cfg.mk
index ef71a0d15e..1ceb691dbd 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -54,6 +54,11 @@ update-po: refresh-po
bootstrap: autoreconf
$(WFLAGS) ./configure $(CFGFLAGS)
+glimport:
+ gnulib-tool --m4-base gl/m4 --import
+ cd lib && gnulib-tool --m4-base gl/m4 --import
+ cd libextra && gnulib-tool --m4-base gl/m4 --import
+
# Code Coverage
pre-coverage:
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 87eed880ce..dadd56ac58 100644
--- a/gl/sys_socket.in.h
+++ b/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/gl/tests/test-vc-list-files-git.sh b/gl/tests/test-vc-list-files-git.sh
index a42aec19a4..f1627e7e50 100755
--- a/gl/tests/test-vc-list-files-git.sh
+++ b/gl/tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -36,6 +36,8 @@ mkdir $tmpdir && cd $tmpdir &&
|| { echo "Skipping test: git not found in PATH"; (exit 77); exit 77; }; } &&
mkdir d &&
touch d/a b c &&
+ git config user.email "you@example.com"
+ git config user.name "Your Name"
git add . > /dev/null &&
git commit -q -a -m log &&
printf '%s\n' b c d/a > expected &&
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
diff --git a/libextra/gl/gnulib.mk b/libextra/gl/gnulib.mk
index 7649765e4a..09f301cbd9 100644
--- a/libextra/gl/gnulib.mk
+++ b/libextra/gl/gnulib.mk
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libxgnu --source-base=libextra/gl --m4-base=libextra/gl/m4 --doc-base=doc --tests-base=libextra/gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib
+# Reproduce by: gnulib-tool --import --dir=. --lib=libxgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib
MOSTLYCLEANFILES += core *.stackdump
diff --git a/libextra/gl/m4/gnulib-cache.m4 b/libextra/gl/m4/gnulib-cache.m4
index 433493061c..21c1d85537 100644
--- a/libextra/gl/m4/gnulib-cache.m4
+++ b/libextra/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libxgnu --source-base=libextra/gl --m4-base=libextra/gl/m4 --doc-base=doc --tests-base=libextra/gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib
+# gnulib-tool --import --dir=. --lib=libxgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
@@ -26,11 +26,11 @@ gl_MODULES([
havelib
])
gl_AVOID([dummy stdint])
-gl_SOURCE_BASE([libextra/gl])
-gl_M4_BASE([libextra/gl/m4])
+gl_SOURCE_BASE([gl])
+gl_M4_BASE([gl/m4])
gl_PO_BASE([])
gl_DOC_BASE([doc])
-gl_TESTS_BASE([libextra/gl/tests])
+gl_TESTS_BASE([gl/tests])
gl_LIB([libxgnu])
gl_MAKEFILE_NAME([gnulib.mk])
gl_LIBTOOL
diff --git a/libextra/gl/m4/gnulib-comp.m4 b/libextra/gl/m4/gnulib-comp.m4
index 371c4bc3ba..d4ea4cf754 100644
--- a/libextra/gl/m4/gnulib-comp.m4
+++ b/libextra/gl/m4/gnulib-comp.m4
@@ -40,7 +40,7 @@ AC_DEFUN([xgl_INIT],
m4_pushdef([xgl_LIBSOURCES_LIST], [])
m4_pushdef([xgl_LIBSOURCES_DIR], [])
gl_COMMON
- gl_source_base='libextra/gl'
+ gl_source_base='gl'
gl_HMAC_MD5
gl_MD5
gl_MEMXOR
@@ -82,7 +82,7 @@ AC_DEFUN([xgl_INIT],
m4_pushdef([xgltests_LIBSOURCES_LIST], [])
m4_pushdef([xgltests_LIBSOURCES_DIR], [])
gl_COMMON
- gl_source_base='libextra/gl/tests'
+ gl_source_base='gl/tests'
m4_ifval(xgltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([xgltests_LIBSOURCES_DIR])[ ||
for gl_file in ]xgltests_LIBSOURCES_LIST[ ; do
@@ -136,7 +136,7 @@ AC_DEFUN([xgl_REPLACE_FUNCS], [
AC_DEFUN([xgl_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([xgl_LIBSOURCES_DIR], [libextra/gl])
+ m4_define([xgl_LIBSOURCES_DIR], [gl])
m4_append([xgl_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])
@@ -163,7 +163,7 @@ AC_DEFUN([xgltests_REPLACE_FUNCS], [
AC_DEFUN([xgltests_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([xgltests_LIBSOURCES_DIR], [libextra/gl/tests])
+ m4_define([xgltests_LIBSOURCES_DIR], [gl/tests])
m4_append([xgltests_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])