diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-10-06 12:41:02 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-10-06 12:41:02 +0200 |
commit | 6d53fee59d340e094dc448059ceddcb6fa4a001d (patch) | |
tree | 13d98888f2a1d5964c65b9fbca7a8bf24b724937 /gl | |
parent | 696eaa54f0415d49077e6e7ece9c44fb98d711b7 (diff) | |
download | gnutls-6d53fee59d340e094dc448059ceddcb6fa4a001d.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r-- | gl/Makefile.am | 4 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 1 | ||||
-rw-r--r-- | gl/m4/stdio_h.m4 | 5 | ||||
-rw-r--r-- | gl/m4/unistd_h.m4 | 3 | ||||
-rw-r--r-- | gl/progname.c | 15 | ||||
-rw-r--r-- | gl/stdio.in.h | 16 | ||||
-rw-r--r-- | gl/unistd.in.h | 6 |
7 files changed, 43 insertions, 7 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index c03aa4e536..78642d67ba 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -705,6 +705,7 @@ stdio.h: stdio.in.h -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ + -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ @@ -723,6 +724,7 @@ stdio.h: stdio.in.h -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ + -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ @@ -743,6 +745,7 @@ stdio.h: stdio.in.h -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ + -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ @@ -1147,6 +1150,7 @@ unistd.h: unistd.in.h -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ + -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index fb65350e03..fa0a089aec 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -126,6 +126,7 @@ AC_SUBST([LTALLOCA]) gl_STRING_MODULE_INDICATOR([perror]) gl_PMCCABE2HTML AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>]) + AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>]) gl_FUNC_READ_FILE gl_FUNC_READLINE gl_FUNC_REALLOC_POSIX diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 01af04da92..ed828eac89 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 19 +# stdio_h.m4 serial 21 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -69,6 +69,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) + GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) @@ -90,6 +91,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) + HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) @@ -110,6 +112,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) + REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 16daed884c..5aa39aeda2 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 30 +# unistd_h.m4 serial 31 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -102,6 +102,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) + REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) diff --git a/gl/progname.c b/gl/progname.c index 19df10ad71..bfa374a528 100644 --- a/gl/progname.c +++ b/gl/progname.c @@ -48,7 +48,14 @@ set_program_name (const char *argv0) { argv0 = base; if (strncmp (base, "lt-", 3) == 0) - argv0 = base + 3; + { + argv0 = base + 3; + /* On glibc systems, remove the "lt-" prefix from the variable + program_invocation_short_name. */ +#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME + program_invocation_short_name = (char *) argv0; +#endif + } } /* But don't strip off a leading <dirname>/ in general, because when the user @@ -62,9 +69,9 @@ set_program_name (const char *argv0) program_name = argv0; - /* On glibc systems, when the gnulib module 'error' is not used, the error() - function comes from libc and uses the variable program_invocation_name, - not program_name. So set this variable as well. */ + /* On glibc systems, the error() function comes from libc and uses the + variable program_invocation_name, not program_name. So set this variable + as well. */ #if HAVE_DECL_PROGRAM_INVOCATION_NAME program_invocation_name = (char *) argv0; #endif diff --git a/gl/stdio.in.h b/gl/stdio.in.h index ea1df56dc6..5002acc6d2 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h @@ -444,6 +444,22 @@ extern int rename (const char *old, const char *new); rename (o, n)) #endif +#if @GNULIB_RENAMEAT@ +# if @REPLACE_RENAMEAT@ +# undef renameat +# define renameat rpl_renameat +# endif +# if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@ +extern int renameat (int fd1, char const *file1, int fd2, char const *file2); +# endif +#elif defined GNULIB_POSIXCHECK +# undef renameat +# define renameat(d1,f1,d2,f2) \ + (GL_LINK_WARNING ("renameat is not portable - " \ + "use gnulib module renameat for portability"), \ + renameat (d1, f1, d2, f2)) +#endif + #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # define snprintf rpl_snprintf diff --git a/gl/unistd.in.h b/gl/unistd.in.h index fa4f4c83c0..34da9369c8 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -582,10 +582,14 @@ extern int link (const char *path1, const char *path2); #endif #if @GNULIB_LINKAT@ +# if @REPLACE_LINKAT@ +# undef linkat +# define linkat rpl_linkat +# endif /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ -# if !@HAVE_LINKAT@ +# if !@HAVE_LINKAT@ || @REPLACE_LINKAT@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2, int flag); # endif |