summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <jas@mocca.josefsson.org>2007-05-25 15:11:47 +0200
committerSimon Josefsson <jas@mocca.josefsson.org>2007-05-25 15:11:47 +0200
commitcc2fe334fd630decbaba3f01cc9208b57c7943f1 (patch)
tree6286e7e65b4f3631c59b124646e5ec0170a0396d /gl
parentad11a9fcc75034a52eb6e1ce6bb63a7e5a707e0f (diff)
downloadlibtasn1-cc2fe334fd630decbaba3f01cc9208b57c7943f1.tar.gz
libtasn1-cc2fe334fd630decbaba3f01cc9208b57c7943f1.tar.bz2
libtasn1-cc2fe334fd630decbaba3f01cc9208b57c7943f1.zip
Update.
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am13
-rw-r--r--gl/getopt_.h6
-rw-r--r--gl/m4/gnulib-comp.m42
-rw-r--r--gl/m4/unistd_h.m44
-rw-r--r--gl/string_.h16
-rw-r--r--gl/unistd_.h30
-rw-r--r--gl/version-etc.c4
7 files changed, 60 insertions, 15 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 700c216..39bb5cc 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -35,6 +35,15 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
+## begin gnulib module absolute-header
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+
+## end gnulib module absolute-header
+
## begin gnulib module getopt
BUILT_SOURCES += $(GETOPT_H)
@@ -109,6 +118,7 @@ string.h: string_.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \
+ -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
-e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
-e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
@@ -172,6 +182,7 @@ unistd.h: unistd_.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
+ -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
-e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
@@ -179,9 +190,11 @@ unistd.h: unistd_.h
-e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
diff --git a/gl/getopt_.h b/gl/getopt_.h
index 27fce3d..615ef9a 100644
--- a/gl/getopt_.h
+++ b/gl/getopt_.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -101,7 +101,7 @@
# endif
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -216,7 +216,7 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 3678239..bd2b6d0 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -45,6 +45,8 @@ AC_DEFUN([gl_INIT],
gl_cond_libtool=true
gl_source_base='gl'
gl_GETOPT
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
gl_FUNC_MEMMOVE
gl_FUNC_READ_FILE
gl_STDARG_H
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 628b818..d62da69 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 5
+# unistd_h.m4 serial 6
dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -40,10 +40,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
+ HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
diff --git a/gl/string_.h b/gl/string_.h
index 483c9fc..43801e8 100644
--- a/gl/string_.h
+++ b/gl/string_.h
@@ -16,17 +16,17 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+#if @HAVE_INCLUDE_NEXT@
+# include_next <string.h>
+#endif
+
#ifndef _GL_STRING_H
#define _GL_STRING_H
-/* This #pragma avoids a warning with "gcc -Wmissing-prototypes" on some
- mingw systems. */
-#ifdef __GNUC__
-# pragma GCC system_header
+#if ! @HAVE_INCLUDE_NEXT@
+# include @ABSOLUTE_STRING_H@
#endif
-#include @ABSOLUTE_STRING_H@
-
/* The definition of GL_LINK_WARNING is copied here. */
@@ -192,9 +192,9 @@ extern char *strdup (char const *__s);
# if ! @HAVE_STRNDUP@
# undef strndup
# define strndup rpl_strndup
-# if ! @HAVE_DECL_STRNDUP@
+# endif
+# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
extern char *strndup (char const *__string, size_t __n);
-# endif
# endif
#elif defined GNULIB_POSIXCHECK
# undef strndup
diff --git a/gl/unistd_.h b/gl/unistd_.h
index 77df861..1fce509 100644
--- a/gl/unistd_.h
+++ b/gl/unistd_.h
@@ -19,9 +19,20 @@
#define _GL_UNISTD_H
#if @HAVE_UNISTD_H@
-# include @ABSOLUTE_UNISTD_H@
+# if @HAVE_INCLUDE_NEXT@
+# include_next <unistd.h>
+# else
+# include @ABSOLUTE_UNISTD_H@
+# endif
+#endif
+
+/* mingw doesn't define the SEEK_* macros in <unistd.h>. */
+#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
+# include <stdio.h>
#endif
+/* mingw fails to declare _exit in <unistd.h>. */
+#include <stdlib.h>
/* The definition of GL_LINK_WARNING is copied here. */
@@ -184,6 +195,23 @@ extern int readlink (const char *file, char *buf, size_t bufsize);
#endif
+#if @GNULIB_SLEEP@
+/* Pause the execution of the current thread for N seconds.
+ Returns the number of seconds left to sleep.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/sleep.html>. */
+# if !@HAVE_SLEEP@
+extern unsigned int sleep (unsigned int n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sleep
+# define sleep(n) \
+ (GL_LINK_WARNING ("sleep is unportable - " \
+ "use gnulib module sleep for portability"), \
+ sleep (n))
+#endif
+
+
#ifdef __cplusplus
}
#endif
diff --git a/gl/version-etc.c b/gl/version-etc.c
index 65997d9..1ae82c4 100644
--- a/gl/version-etc.c
+++ b/gl/version-etc.c
@@ -67,8 +67,8 @@ version_etc_va (FILE *stream,
fputs (_("\
\n\
-This is free software. You may redistribute copies of it under the terms of\n\
-the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n\
+License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n\
+This is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n\
\n\
"),