[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gsasl branch, master, updated. gsasl-1-2-101-g6fbdb8b
From: |
Simon Josefsson |
Subject: |
[SCM] GNU gsasl branch, master, updated. gsasl-1-2-101-g6fbdb8b |
Date: |
Thu, 08 Oct 2009 13:26:59 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gsasl".
http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=6fbdb8b5d2109ad2bf152f0db8081dbe0a80acc6
The branch, master has been updated
via 6fbdb8b5d2109ad2bf152f0db8081dbe0a80acc6 (commit)
from 79a1534fbf3f0aa0a7f99d26a5c92bbe2a58e867 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6fbdb8b5d2109ad2bf152f0db8081dbe0a80acc6
Author: Simon Josefsson <address@hidden>
Date: Thu Oct 8 15:26:30 2009 +0200
Update gnulib files.
-----------------------------------------------------------------------
Summary of changes:
gl/Makefile.am | 11 ++-
gl/getopt.in.h | 36 ++++++--
gl/getopt_int.h | 4 +-
gl/m4/getopt.m4 | 11 ++-
gl/m4/gnulib-comp.m4 | 1 +
gl/m4/stdio_h.m4 | 5 +-
gl/m4/unistd_h.m4 | 3 +-
gl/progname.c | 15 +++-
gl/stdio.in.h | 16 ++++
gl/unistd.in.h | 8 ++-
gltests/test-getopt.c | 3 +
gltests/test-getopt_long.h | 21 +++++
gltests/test-quotearg.c | 206 ++++++++++++++++++++++++--------------------
lib/gl/Makefile.am | 4 +
lib/gl/m4/stdio_h.m4 | 5 +-
lib/gl/m4/unistd_h.m4 | 3 +-
lib/gl/stdio.in.h | 16 ++++
lib/gl/unistd.in.h | 8 ++-
lib/maint.mk | 10 +-
maint.mk | 10 +-
20 files changed, 272 insertions(+), 124 deletions(-)
diff --git a/gl/Makefile.am b/gl/Makefile.am
index b8a80db..5e9ad53 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -329,7 +329,12 @@ BUILT_SOURCES += $(GETOPT_H)
getopt.h: getopt.in.h
$(AM_V_GEN)rm -f address@hidden $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/getopt.in.h; \
+ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/getopt.in.h; \
} > address@hidden && \
mv -f address@hidden $@
MOSTLYCLEANFILES += getopt.h getopt.h-t
@@ -907,6 +912,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' \
@@ -925,6 +931,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' \
@@ -945,6 +952,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' \
@@ -1330,6 +1338,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/getopt.in.h b/gl/getopt.in.h
index d2d3e6e..7377f3c 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,24 +16,42 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GETOPT_H
+#ifndef _GL_GETOPT_H
+
+#if __GNUC__ >= 3
address@hidden@
+#endif
+
+/* The include_next requires a split double-inclusion guard. We must
+ also inform the replacement unistd.h to not recursively use
+ <getopt.h>; our definitions will be present soon enough. */
+#if @HAVE_GETOPT_H@
+# define _GL_SYSTEM_GETOPT
+# @INCLUDE_NEXT@ @NEXT_GETOPT_H@
+# undef _GL_SYSTEM_GETOPT
+#endif
+
+#ifndef _GL_GETOPT_H
#ifndef __need_getopt
-# define _GETOPT_H 1
+# define _GL_GETOPT_H 1
#endif
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in this header. When this happens, include the
headers that might declare getopt so that they will not cause
- confusion if included after this file. Then systematically rename
+ confusion if included after this file (if the system had <getopt.h>,
+ we have already included it). Then systematically rename
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
-# include <stdlib.h>
-# include <stdio.h>
-# include <unistd.h>
+# if address@hidden@
+# include <stdlib.h>
+# include <stdio.h>
+# include <unistd.h>
+# endif
# undef __need_getopt
# undef getopt
# undef getopt_long
@@ -42,6 +60,7 @@
# undef opterr
# undef optind
# undef optopt
+# undef option
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
@@ -52,6 +71,8 @@
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
+# define option __GETOPT_ID (option)
+# define _getopt_internal __GETOPT_ID (getopt_internal)
#endif
/* Standalone applications get correct prototypes for getopt_long and
@@ -223,3 +244,4 @@ extern int getopt_long_only (int ___argc, char
*__getopt_argv_const *___argv,
#undef __need_getopt
#endif /* getopt.h */
+#endif /* getopt.h */
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index 3c6628b..69cdf0d 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -19,6 +19,8 @@
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
+#include <getopt.h>
+
extern int _getopt_internal (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 7443dfe..8f0c36c 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,4 +1,4 @@
-# getopt.m4 serial 22
+# getopt.m4 serial 23
dnl Copyright (C) 2002-2006, 2008-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,
@@ -54,6 +54,15 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt.
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ gl_CHECK_NEXT_HEADERS([getopt.h])
+ AC_CHECK_HEADERS_ONCE([getopt.h])
+ if test $ac_cv_header_getopt_h = yes; then
+ HAVE_GETOPT_H=1
+ else
+ HAVE_GETOPT_H=0
+ fi
+ AC_SUBST([HAVE_GETOPT_H])
+
gl_replace_getopt=
dnl Test whether <getopt.h> is available.
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 8aa8c81..f269795 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -124,6 +124,7 @@ AC_SUBST([LTALLOCA])
gl_PMCCABE2HTML
gl_FUNC_POLL
AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
gl_QUOTE
gl_QUOTEARG
gl_FUNC_READLINE
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 01af04d..ed828ea 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 16daed8..5aa39ae 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 19df10a..bfa374a 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 ea1df56..5002acc 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 address@hidden@ || @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 fa4f4c8..0e31883 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -49,7 +49,7 @@
#endif
/* Get getopt(), optarg, optind, opterr, optopt. */
-#if @GNULIB_UNISTD_H_GETOPT@
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
# include <getopt.h>
#endif
@@ -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 address@hidden@
+# if address@hidden@ || @REPLACE_LINKAT@
extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
int flag);
# endif
diff --git a/gltests/test-getopt.c b/gltests/test-getopt.c
index b3dd60b..12d8d92 100644
--- a/gltests/test-getopt.c
+++ b/gltests/test-getopt.c
@@ -60,6 +60,9 @@ main ()
test_getopt ();
#if GNULIB_GETOPT_GNU
test_getopt_long ();
+
+ setenv ("POSIXLY_CORRECT", "1", 0);
+ test_getopt_long_posix ();
#endif
return 0;
diff --git a/gltests/test-getopt_long.h b/gltests/test-getopt_long.h
index 0017f19..fb505b2 100644
--- a/gltests/test-getopt_long.h
+++ b/gltests/test-getopt_long.h
@@ -935,3 +935,24 @@ test_getopt_long (void)
ASSERT (optind == 4);
}
}
+
+/* Test behavior of getopt_long when POSIXLY_CORRECT is set in the
+ environment. Options with optional arguments should not change
+ behavior just because of an environment variable.
+ http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html */
+static void
+test_getopt_long_posix (void)
+{
+ int c = 3;
+ char *v[4] = {"test", "-r", "foo", NULL};
+ struct option l[] = {{NULL}};
+ int start;
+ int result;
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ optind = start;
+ result = getopt_long (c, v, "r::", l, NULL);
+ }
+ ASSERT (result == 'r');
+ ASSERT (optarg == NULL);
+}
diff --git a/gltests/test-quotearg.c b/gltests/test-quotearg.c
index 65779ad..04891bc 100644
--- a/gltests/test-quotearg.c
+++ b/gltests/test-quotearg.c
@@ -52,7 +52,8 @@ struct result_strings {
char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */
char const *str5; /* Translation of "a:b". */
char const *str6; /* Translation of "a\\b". */
- char const *str7; /* Translation of LQ RQ. */
+ char const *str7a; /* Translation of LQ RQ, in ASCII charset. */
+ char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
};
struct result_groups {
@@ -70,105 +71,108 @@ struct result_groups {
static struct result_strings inputs = {
"", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ
+ LQ RQ, NULL
};
static struct result_groups results_g[] = {
/* literal_quoting_style */
{ { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ },
+ LQ RQ, LQ RQ },
{ "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ },
+ LQ RQ, LQ RQ },
{ "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ } },
+ LQ RQ, LQ RQ } },
/* shell_quoting_style */
{ { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
- "'a\\b'", LQ RQ },
+ "'a\\b'", LQ RQ, LQ RQ },
{ "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
- "'a\\b'", LQ RQ },
+ "'a\\b'", LQ RQ, LQ RQ },
{ "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", LQ RQ } },
+ "'a\\b'", LQ RQ, LQ RQ } },
/* shell_always_quoting_style */
{ { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'" },
+ "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
{ "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'" },
+ "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
{ "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'" } },
+ "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } },
/* c_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" } },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
/* c_maybe_quoting_style */
{ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"" } },
+ "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
/* escape_quoting_style */
{ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
- "a\\\\b", LQ_ENC RQ_ENC },
+ "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
- "a\\\\b", LQ_ENC RQ_ENC },
+ "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
- "a\\\\b", LQ_ENC RQ_ENC } },
+ "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
/* locale_quoting_style */
{ { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
- "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'" },
+ "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
{ "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
- "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'" },
+ "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
{ "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
- "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'" } },
+ "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" } },
/* clocale_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" } }
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
};
static struct result_groups flag_results[] = {
/* literal_quoting_style and QA_ELIDE_NULL_BYTES */
- { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ },
- { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ },
- { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ } },
+ { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+ LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+ LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+ LQ RQ } },
/* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
{ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"" } },
+ "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
/* c_quoting_style and QA_SPLIT_TRIGRAPHS */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" },
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"" } }
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
};
#if ENABLE_NLS
@@ -177,24 +181,24 @@ static struct result_groups locale_results[] = {
/* locale_quoting_style */
{ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ },
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ },
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ},
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ } },
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } },
/* clocale_quoting_style */
{ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ },
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ },
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ } }
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } }
};
#endif /* ENABLE_NLS */
@@ -213,79 +217,79 @@ static struct result_groups custom_results[] = {
/* left_quote = right_quote = "" */
{ { "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
- LQ_ENC RQ_ENC },
+ LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
- LQ_ENC RQ_ENC },
+ LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
- LQ_ENC RQ_ENC } },
+ LQ_ENC RQ_ENC, LQ RQ } },
/* left_quote = right_quote = "'" */
{ { "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'" },
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'" },
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'" } },
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* left_quote = "(" and right_quote = ")" */
{ { "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")" },
+ "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
{ "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")" },
+ "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
{ "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")" } },
+ "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
/* left_quote = ":" and right_quote = " " */
{ { ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " " },
+ ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
{ ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " " },
+ ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
{ ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " " } },
+ ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
/* left_quote = " " and right_quote = ":" */
{ { " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":" },
+ " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
{ " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":" },
+ " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
{ " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":" } },
+ " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
/* left_quote = "# " and right_quote = "\n" */
{ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n" },
+ "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
{ "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n" },
+ "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
{ "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n" } },
+ "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
/* left_quote = "\"'" and right_quote = "'\"" */
{ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"" },
+ "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
{ "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"" },
+ "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
{ "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"" } }
+ "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
};
static void
@@ -298,7 +302,7 @@ compare (char const *a, size_t la, char const *b, size_t lb)
static void
compare_strings (char *(func) (char const *, size_t *),
- struct result_strings *results)
+ struct result_strings *results, bool ascii_only)
{
size_t len;
char *p;
@@ -327,9 +331,12 @@ compare_strings (char *(func) (char const *, size_t *),
p = func (inputs.str6, &len);
compare (results->str6, strlen (results->str6), p, len);
- len = strlen (inputs.str7);
- p = func (inputs.str7, &len);
- compare (results->str7, strlen (results->str7), p, len);
+ len = strlen (inputs.str7a);
+ p = func (inputs.str7a, &len);
+ if (ascii_only)
+ compare (results->str7a, strlen (results->str7a), p, len);
+ else
+ compare (results->str7b, strlen (results->str7b), p, len);
}
static char *
@@ -374,42 +381,55 @@ int
main (int argc, char *argv[])
{
int i;
+ bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
set_program_name (argv[0]);
- /* This program part is hard-wired to the C locale since it does not call
- setlocale. */
+ /* This part of the program is hard-wired to the C locale since it
+ does not call setlocale. However, according to POSIX, the use of
+ 8-bit bytes in a character context in the C locale gives
+ unspecified results (that is, the C locale charset is allowed to
+ be unibyte with 8-bit bytes rejected [ASCII], unibyte with 8-bit
+ bytes being characters [often ISO-8859-1], or multibyte [often
+ UTF-8]). We assume that the latter two cases will be
+ indistinguishable in this test - that is, the LQ and RQ sequences
+ will pass through unchanged in either type of charset. So when
+ testing for quoting of str7, use the ascii_only flag to decide
+ what to expect for the 8-bit data being quoted. */
ASSERT (!isprint ('\033'));
for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
{
set_quoting_style (NULL, i);
- compare_strings (use_quotearg_buffer, &results_g[i].group1);
- compare_strings (use_quotearg, &results_g[i].group2);
+ compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only);
+ compare_strings (use_quotearg, &results_g[i].group2, ascii_only);
if (i == c_quoting_style)
- compare_strings (use_quote_double_quotes, &results_g[i].group2);
- compare_strings (use_quotearg_colon, &results_g[i].group3);
+ compare_strings (use_quote_double_quotes, &results_g[i].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only);
}
set_quoting_style (NULL, literal_quoting_style);
ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0);
- compare_strings (use_quotearg_buffer, &flag_results[0].group1);
- compare_strings (use_quotearg, &flag_results[0].group2);
- compare_strings (use_quotearg_colon, &flag_results[0].group3);
+ compare_strings (use_quotearg_buffer, &flag_results[0].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[0].group2, ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[0].group3, ascii_only);
set_quoting_style (NULL, c_quoting_style);
ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES)
== QA_ELIDE_NULL_BYTES);
- compare_strings (use_quotearg_buffer, &flag_results[1].group1);
- compare_strings (use_quotearg, &flag_results[1].group2);
- compare_strings (use_quote_double_quotes, &flag_results[1].group2);
- compare_strings (use_quotearg_colon, &flag_results[1].group3);
+ compare_strings (use_quotearg_buffer, &flag_results[1].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[1].group2, ascii_only);
+ compare_strings (use_quote_double_quotes, &flag_results[1].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[1].group3, ascii_only);
ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS)
== QA_ELIDE_OUTER_QUOTES);
- compare_strings (use_quotearg_buffer, &flag_results[2].group1);
- compare_strings (use_quotearg, &flag_results[2].group2);
- compare_strings (use_quote_double_quotes, &flag_results[2].group2);
- compare_strings (use_quotearg_colon, &flag_results[2].group3);
+ compare_strings (use_quotearg_buffer, &flag_results[2].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[2].group2, ascii_only);
+ compare_strings (use_quote_double_quotes, &flag_results[2].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[2].group3, ascii_only);
ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS);
@@ -417,9 +437,11 @@ main (int argc, char *argv[])
{
set_custom_quoting (NULL,
custom_quotes[i][0], custom_quotes[i][1]);
- compare_strings (use_quotearg_buffer, &custom_results[i].group1);
- compare_strings (use_quotearg, &custom_results[i].group2);
- compare_strings (use_quotearg_colon, &custom_results[i].group3);
+ compare_strings (use_quotearg_buffer, &custom_results[i].group1,
+ ascii_only);
+ compare_strings (use_quotearg, &custom_results[i].group2, ascii_only);
+ compare_strings (use_quotearg_colon, &custom_results[i].group3,
+ ascii_only);
}
#if ENABLE_NLS
@@ -444,14 +466,14 @@ main (int argc, char *argv[])
bindtextdomain ("test-quotearg", getenv ("LOCALEDIR"));
set_quoting_style (NULL, locale_quoting_style);
- compare_strings (use_quotearg_buffer, &locale_results[0].group1);
- compare_strings (use_quotearg, &locale_results[0].group2);
- compare_strings (use_quotearg_colon, &locale_results[0].group3);
+ compare_strings (use_quotearg_buffer, &locale_results[0].group1, false);
+ compare_strings (use_quotearg, &locale_results[0].group2, false);
+ compare_strings (use_quotearg_colon, &locale_results[0].group3, false);
set_quoting_style (NULL, clocale_quoting_style);
- compare_strings (use_quotearg_buffer, &locale_results[1].group1);
- compare_strings (use_quotearg, &locale_results[1].group2);
- compare_strings (use_quotearg_colon, &locale_results[1].group3);
+ compare_strings (use_quotearg_buffer, &locale_results[1].group1, false);
+ compare_strings (use_quotearg, &locale_results[1].group2, false);
+ compare_strings (use_quotearg_colon, &locale_results[1].group3, false);
}
}
#endif /* ENABLE_NLS */
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 4aaf2ab..6281e09 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -429,6 +429,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' \
@@ -447,6 +448,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' \
@@ -467,6 +469,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' \
@@ -737,6 +740,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/lib/gl/m4/stdio_h.m4 b/lib/gl/m4/stdio_h.m4
index 01af04d..ed828ea 100644
--- a/lib/gl/m4/stdio_h.m4
+++ b/lib/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/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4
index 16daed8..5aa39ae 100644
--- a/lib/gl/m4/unistd_h.m4
+++ b/lib/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/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 08a44b4..384010a 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/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 address@hidden@ || @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/lib/gl/unistd.in.h b/lib/gl/unistd.in.h
index 1e637a8..1319d10 100644
--- a/lib/gl/unistd.in.h
+++ b/lib/gl/unistd.in.h
@@ -49,7 +49,7 @@
#endif
/* Get getopt(), optarg, optind, opterr, optopt. */
-#if @GNULIB_UNISTD_H_GETOPT@
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
# include <getopt.h>
#endif
@@ -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 address@hidden@
+# if address@hidden@ || @REPLACE_LINKAT@
extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
int flag);
# endif
diff --git a/lib/maint.mk b/lib/maint.mk
index fe6b3ff..68bd8f9 100644
--- a/lib/maint.mk
+++ b/lib/maint.mk
@@ -696,11 +696,11 @@ no-submodule-changes:
: ; \
fi
-.PHONY: alpha beta major
-ALL_RECURSIVE_TARGETS += alpha beta major
-alpha beta major: $(local-check) writable-files no-submodule-changes
- test $@ = major \
- && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
+.PHONY: alpha beta stable
+ALL_RECURSIVE_TARGETS += alpha beta stable
+alpha beta stable: $(local-check) writable-files no-submodule-changes
+ test $@ = stable \
+ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|| :
$(MAKE) vc-diff-check
diff --git a/maint.mk b/maint.mk
index fe6b3ff..68bd8f9 100644
--- a/maint.mk
+++ b/maint.mk
@@ -696,11 +696,11 @@ no-submodule-changes:
: ; \
fi
-.PHONY: alpha beta major
-ALL_RECURSIVE_TARGETS += alpha beta major
-alpha beta major: $(local-check) writable-files no-submodule-changes
- test $@ = major \
- && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
+.PHONY: alpha beta stable
+ALL_RECURSIVE_TARGETS += alpha beta stable
+alpha beta stable: $(local-check) writable-files no-submodule-changes
+ test $@ = stable \
+ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|| :
$(MAKE) vc-diff-check
hooks/post-receive
--
GNU gsasl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gsasl branch, master, updated. gsasl-1-2-101-g6fbdb8b,
Simon Josefsson <=