diff options
Diffstat (limited to 'gl')
539 files changed, 3393 insertions, 1823 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index e5e0b6ad51..ed4c9fd5f3 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,7 +21,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=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp bind byteswap c-ctype close connect error extensions func getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto setsockopt shutdown snprintf socket sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r timespec u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp bind byteswap c-ctype close connect error extensions freeaddrinfo func getaddrinfo getnameinfo getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto setsockopt shutdown snprintf socket sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r timespec u64 unistd usleep valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings AUTOMAKE_OPTIONS = 1.5 gnits @@ -51,12 +51,15 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgnu_la_SOURCES = libgnu_la_LDFLAGS = $(AM_LDFLAGS) libgnu_la_LDFLAGS += -no-undefined +libgnu_la_LDFLAGS += $(GETADDRINFO_LIB) +libgnu_la_LDFLAGS += $(HOSTENT_LIB) libgnu_la_LDFLAGS += $(INET_NTOP_LIB) libgnu_la_LDFLAGS += $(INET_PTON_LIB) libgnu_la_LDFLAGS += $(LIBSOCKET) libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME) libgnu_la_LDFLAGS += $(LIB_SELECT) libgnu_la_LDFLAGS += $(LTLIBINTL) +libgnu_la_LDFLAGS += $(SERVENT_LIB) ## begin gnulib module accept @@ -450,6 +453,15 @@ EXTRA_libgnu_la_SOURCES += ftello.c ## end gnulib module ftello +## begin gnulib module getaddrinfo + + +EXTRA_DIST += gai_strerror.c getaddrinfo.c + +EXTRA_libgnu_la_SOURCES += gai_strerror.c getaddrinfo.c + +## end gnulib module getaddrinfo + ## begin gnulib module getdelim @@ -1598,6 +1610,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ @@ -1625,6 +1638,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ + -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ @@ -1642,6 +1656,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ @@ -2226,6 +2241,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ + -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ @@ -2238,11 +2254,12 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ + -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ @@ -2275,6 +2292,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ + -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ @@ -2287,6 +2305,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ + -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -2301,6 +2320,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ @@ -2337,6 +2357,15 @@ EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free ## end gnulib module useless-if-before-free +## begin gnulib module usleep + + +EXTRA_DIST += usleep.c + +EXTRA_libgnu_la_SOURCES += usleep.c + +## end gnulib module usleep + ## begin gnulib module vasnprintf diff --git a/gl/accept.c b/gl/accept.c index 01faf54209..8775aaee2d 100644 --- a/gl/accept.c +++ b/gl/accept.c @@ -1,6 +1,6 @@ /* accept.c --- wrappers for Windows accept function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/alloca.c b/gl/alloca.c index 06b12a7bff..ee0f018868 100644 --- a/gl/alloca.c +++ b/gl/alloca.c @@ -475,4 +475,4 @@ i00afunc (long address) # endif /* CRAY */ # endif /* no alloca */ -#endif /* not GCC version 3 */ +#endif /* not GCC 2 */ diff --git a/gl/alloca.in.h b/gl/alloca.in.h index 5b69c6c81a..ca9e7fe3c5 100644 --- a/gl/alloca.in.h +++ b/gl/alloca.in.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it diff --git a/gl/alphasort.c b/gl/alphasort.c index 25319dce82..636c74ac60 100644 --- a/gl/alphasort.c +++ b/gl/alphasort.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1997-1998, 2009-2011 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1997-1998, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it diff --git a/gl/argp-ba.c b/gl/argp-ba.c index a03b134420..0b3d0bdb04 100644 --- a/gl/argp-ba.c +++ b/gl/argp-ba.c @@ -1,5 +1,5 @@ /* Default definition for ARGP_PROGRAM_BUG_ADDRESS. - Copyright (C) 1996-1997, 1999, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1996-1997, 1999, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -19,8 +19,8 @@ /* If set by the user program, it should point to string that is the bug-reporting address for the program. It will be printed by argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help - messages), embedded in a sentence that says something like `Report bugs to - ADDR.'. */ + messages), embedded in a sentence that says something like "Report bugs to + ADDR." */ const char *argp_program_bug_address /* This variable should be zero-initialized. On most systems, putting it into BSS is sufficient. Not so on MacOS X 10.3 and 10.4, see diff --git a/gl/argp-eexst.c b/gl/argp-eexst.c index 1082a39289..dcb10a6f70 100644 --- a/gl/argp-eexst.c +++ b/gl/argp-eexst.c @@ -1,5 +1,5 @@ /* Default definition for ARGP_ERR_EXIT_STATUS - Copyright (C) 1997, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. diff --git a/gl/argp-fmtstream.c b/gl/argp-fmtstream.c index c308eb6918..70e3eb8627 100644 --- a/gl/argp-fmtstream.c +++ b/gl/argp-fmtstream.c @@ -1,5 +1,5 @@ /* Word-wrapping and line-truncating streams - Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2011 Free Software + Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* This package emulates glibc `line_wrap_stream' semantics for systems that +/* This package emulates glibc 'line_wrap_stream' semantics for systems that don't have that. */ #ifdef HAVE_CONFIG_H diff --git a/gl/argp-fmtstream.h b/gl/argp-fmtstream.h index f6642540c7..a891c3dc0b 100644 --- a/gl/argp-fmtstream.h +++ b/gl/argp-fmtstream.h @@ -1,5 +1,5 @@ /* Word-wrapping and line-truncating streams. - Copyright (C) 1997, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1997, 2006-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* This package emulates glibc `line_wrap_stream' semantics for systems that +/* This package emulates glibc 'line_wrap_stream' semantics for systems that don't have that. If the system does have it, it is just a wrapper for that. This header file is only used internally while compiling argp, and shouldn't be installed. */ diff --git a/gl/argp-fs-xinl.c b/gl/argp-fs-xinl.c index 8dd679c8a0..b030e589f6 100644 --- a/gl/argp-fs-xinl.c +++ b/gl/argp-fs-xinl.c @@ -1,5 +1,5 @@ /* Real definitions for extern inline functions in argp-fmtstream.h - Copyright (C) 1997, 2003-2004, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997, 2003-2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. diff --git a/gl/argp-help.c b/gl/argp-help.c index 0cc5838583..6d2903e507 100644 --- a/gl/argp-help.c +++ b/gl/argp-help.c @@ -1,5 +1,5 @@ /* Hierarchial argument parsing help output - Copyright (C) 1995-2005, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -56,7 +56,7 @@ /* User-selectable (using an environment variable) formatting parameters. - These may be specified in an environment variable called `ARGP_HELP_FMT', + These may be specified in an environment variable called 'ARGP_HELP_FMT', with a contents like: VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2 Where VALn must be a positive integer. The list of variables is in the UPARAM_NAMES vector, below. */ @@ -73,13 +73,13 @@ #define RMARGIN 79 /* right margin used for wrapping */ /* User-selectable (using an environment variable) formatting parameters. - They must all be of type `int' for the parsing code to work. */ + They must all be of type 'int' for the parsing code to work. */ struct uparams { /* If true, arguments for an option are shown with both short and long - options, even when a given option has both, e.g. `-x ARG, --longx=ARG'. + options, even when a given option has both, e.g. '-x ARG, --longx=ARG'. If false, then if an option has both, the argument is only shown with - the long one, e.g., `-x, --longx=ARG', and a message indicating that + the long one, e.g., '-x, --longx=ARG', and a message indicating that this really means both is printed below the options. */ int dup_args; @@ -111,7 +111,7 @@ static struct uparams uparams = { struct uparam_name { const char *name; /* User name. */ - int is_bool; /* Whether it's `boolean'. */ + int is_bool; /* Whether it's 'boolean'. */ size_t uparams_offs; /* Location of the (int) field in UPARAMS. */ }; @@ -728,7 +728,7 @@ canon_doc_option (const char **name) /* Skip initial whitespace. */ while (isspace ((unsigned char) **name)) (*name)++; - /* Decide whether this looks like an option (leading `-') or not. */ + /* Decide whether this looks like an option (leading '-') or not. */ non_opt = (**name != '-'); /* Skip until part of name used for sorting. */ while (**name && !isalnum ((unsigned char) **name)) @@ -755,7 +755,7 @@ hol_entry_cmp (const struct hol_entry *entry1, /* The entries are not within the same cluster, so we can't compare them directly, we have to use the appropiate clustering level too. */ if (! entry1->cluster) - /* ENTRY1 is at the `base level', not in a cluster, so we have to + /* ENTRY1 is at the "base level", not in a cluster, so we have to compare it's group number with that of the base cluster in which ENTRY2 resides. Note that if they're in the same group, the clustered option always comes laster. */ @@ -785,7 +785,7 @@ hol_entry_cmp (const struct hol_entry *entry1, doc2 = canon_doc_option (&long2); if (doc1 != doc2) - /* `documentation' options always follow normal options (or + /* "documentation" options always follow normal options (or documentation options that *look* like normal options). */ return doc1 - doc2; else if (!short1 && !short2 && long1 && long2) @@ -891,7 +891,8 @@ hol_append (struct hol *hol, struct hol *more) /* Fix up the short options pointers from HOL. */ for (e = entries, left = hol->num_entries; left > 0; e++, left--) - e->short_options += (short_options - hol->short_options); + e->short_options = + short_options + (e->short_options - hol->short_options); /* Now add the short options from MORE, fixing up its entries too. */ @@ -1144,7 +1145,7 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state, /* Now, long options. */ if (odoc (real)) - /* A `documentation' option. */ + /* A "documentation" option. */ { __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col); for (opt = real, num = entry->num; num > 0; opt++, num--) @@ -1438,7 +1439,7 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state, const char *cp = fdoc; nl = __strchrnul (cp, '\n'); if (*nl != '\0') - /* This is a `multi-level' args doc; advance to the correct position + /* This is a "multi-level" args doc; advance to the correct position as determined by our state in LEVELS, and update LEVELS. */ { int i; @@ -1479,9 +1480,9 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state, } /* Print the documentation for ARGP to STREAM; if POST is false, then - everything preceeding a `\v' character in the documentation strings (or + everything preceeding a '\v' character in the documentation strings (or the whole string, for those with none) is printed, otherwise, everything - following the `\v' character (nothing for strings without). Each separate + following the '\v' character (nothing for strings without). Each separate bit of documentation is separated a blank line, and if PRE_BLANK is true, then the first is as well. If FIRST_ONLY is true, only the first occurrence is output. Returns true if anything was output. */ @@ -1579,7 +1580,7 @@ argp_doc (const struct argp *argp, const struct argp_state *state, /* Output a usage message for ARGP to STREAM. If called from argp_state_help, STATE is the relevent parsing state. FLAGS are from the - set ARGP_HELP_*. NAME is what to use wherever a `program name' is + set ARGP_HELP_*. NAME is what to use wherever a "program name" is needed. */ static void _help (const struct argp *argp, const struct argp_state *state, FILE *stream, @@ -1620,7 +1621,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream, } if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE)) - /* Print a short `Usage:' message. */ + /* Print a short "Usage:" message. */ { int first_pattern = 1, more_patterns; size_t num_pattern_levels = argp_args_levels (argp); @@ -1680,7 +1681,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream, if (flags & ARGP_HELP_SEE) { __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\ -Try `%s --help' or `%s --usage' for more information.\n"), +Try '%s --help' or '%s --usage' for more information.\n"), name, name); anything = 1; } @@ -1723,7 +1724,7 @@ Try `%s --help' or `%s --usage' for more information.\n"), } /* Output a usage message for ARGP to STREAM. FLAGS are from the set - ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */ + ARGP_HELP_*. NAME is what to use wherever a "program name" is needed. */ void __argp_help (const struct argp *argp, FILE *stream, unsigned flags, char *name) { @@ -1781,7 +1782,7 @@ weak_alias (__argp_state_help, argp_state_help) #endif /* If appropriate, print the printf string FMT and following args, preceded - by the program name and `:', to stderr, and followed by a `Try ... --help' + by the program name and ':', to stderr, and followed by a "Try ... --help" message, then exit (1). */ void __argp_error (const struct argp_state *state, const char *fmt, ...) diff --git a/gl/argp-namefrob.h b/gl/argp-namefrob.h index 5f6b020233..a6df978af6 100644 --- a/gl/argp-namefrob.h +++ b/gl/argp-namefrob.h @@ -1,5 +1,5 @@ /* Name frobnication for compiling argp outside of glibc - Copyright (C) 1997, 2003, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997, 2003, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. diff --git a/gl/argp-parse.c b/gl/argp-parse.c index 64360beac0..39b8336f32 100644 --- a/gl/argp-parse.c +++ b/gl/argp-parse.c @@ -1,5 +1,5 @@ /* Hierarchial argument parsing, layered over getopt - Copyright (C) 1995-2000, 2002-2004, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2002-2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -187,7 +187,7 @@ find_long_option (struct option *long_options, const char *name) } -/* The state of a `group' during parsing. Each group corresponds to a +/* The state of a "group" during parsing. Each group corresponds to a particular argp structure from the tree of such descending from the top level argp passed to argp_parse. */ struct group @@ -439,7 +439,7 @@ calc_sizes (const struct argp *argp, struct parser_sizes *szs) int num_opts = 0; while (!__option_is_end (opt++)) num_opts++; - szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */ + szs->short_len += num_opts * 3; /* opt + up to 2 ':'s */ szs->long_len += num_opts; } } @@ -781,7 +781,7 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey) if (parser->state.quoted && parser->state.next < parser->state.quoted) /* The next argument pointer has been moved to before the quoted - region, so pretend we never saw the quoting `--', and give getopt + region, so pretend we never saw the quoting "--", and give getopt another chance. If the user hasn't removed it, getopt will just process it again. */ parser->state.quoted = 0; @@ -813,7 +813,7 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey) && strcmp (parser->state.argv[parser->state.next - 1], QUOTE) == 0) /* Not only is this the end of the options, but it's a - `quoted' region, which may have args that *look* like + "quoted" region, which may have args that *look* like options, so we definitely shouldn't try to use getopt past here, whatever happens. */ parser->state.quoted = parser->state.next; diff --git a/gl/argp-pin.c b/gl/argp-pin.c index c966756883..e50dad81a1 100644 --- a/gl/argp-pin.c +++ b/gl/argp-pin.c @@ -1,5 +1,5 @@ /* Full and short program names for argp module - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/argp-pv.c b/gl/argp-pv.c index 7a8cba7f53..1d5a010c9b 100644 --- a/gl/argp-pv.c +++ b/gl/argp-pv.c @@ -1,5 +1,5 @@ /* Default definition for ARGP_PROGRAM_VERSION. - Copyright (C) 1996-1997, 1999, 2006, 2009-2011 Free Software Foundation, + Copyright (C) 1996-1997, 1999, 2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. diff --git a/gl/argp-pvh.c b/gl/argp-pvh.c index 04f6603f07..5c858b3b4f 100644 --- a/gl/argp-pvh.c +++ b/gl/argp-pvh.c @@ -1,5 +1,5 @@ /* Default definition for ARGP_PROGRAM_VERSION_HOOK. - Copyright (C) 1996-1997, 1999, 2004, 2009-2011 Free Software Foundation, + Copyright (C) 1996-1997, 1999, 2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. diff --git a/gl/argp-xinl.c b/gl/argp-xinl.c index 5b1f6fba67..7d45fcb62a 100644 --- a/gl/argp-xinl.c +++ b/gl/argp-xinl.c @@ -1,5 +1,5 @@ /* Real definitions for extern inline functions in argp.h - Copyright (C) 1997-1998, 2004, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -1,5 +1,5 @@ /* Hierarchial argument parsing, layered over getopt. - Copyright (C) 1995-1999, 2003-2011 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -94,7 +94,7 @@ struct argp_option /* The doc string for this option. If both NAME and KEY are 0, This string will be printed outdented from the normal option column, making it useful as a group header (it will be the first thing printed in its - group); in this usage, it's conventional to end the string with a `:'. + group); in this usage, it's conventional to end the string with a ':'. Write the initial value as N_("TEXT") if you want xgettext to collect it into a POT file. */ @@ -124,21 +124,21 @@ struct argp_option /* This option isn't actually an option (and so should be ignored by the actual option parser), but rather an arbitrary piece of documentation that should be displayed in much the same manner as the options. If this flag - is set, then the option NAME field is displayed unmodified (e.g., no `--' + is set, then the option NAME field is displayed unmodified (e.g., no '--' prefix is added) at the left-margin (where a *short* option would normally be displayed), and the documentation string in the normal place. The NAME field will be translated using gettext, unless OPTION_NO_TRANS is set (see below). For purposes of sorting, any leading whitespace and punctuation is - ignored, except that if the first non-whitespace character is not `-', this + ignored, except that if the first non-whitespace character is not '-', this entry is displayed after all options (and OPTION_DOC entries with a leading - `-') in the same group. */ + '-') in the same group. */ #define OPTION_DOC 0x8 -/* This option shouldn't be included in `long' usage messages (but is still +/* This option shouldn't be included in "long" usage messages (but is still included in help messages). This is mainly intended for options that are completely documented in an argp's ARGS_DOC field, in which case including the option in the generic usage list would be redundant. For instance, - if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to + if ARGS_DOC is "FOO BAR\n-x BLAH", and the '-x' option's purpose is to distinguish these two cases, -x should probably be marked OPTION_NO_USAGE. */ #define OPTION_NO_USAGE 0x10 @@ -167,7 +167,7 @@ typedef error_t (*argp_parser_t) (int key, char *arg, ARGP_ERR_UNKNOWN should be returned if they aren't understood. The sequence of keys to a parsing function is either (where each - uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key): + uppercased word should be prefixed by 'ARGP_KEY_' and opt is a user key): INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed @@ -238,15 +238,15 @@ struct argp argp_parser_t parser; /* A string describing what other arguments are wanted by this program. It - is only used by argp_usage to print the `Usage:' message. If it + is only used by argp_usage to print the "Usage:" message. If it contains newlines, the strings separated by them are considered alternative usage patterns, and printed on separate lines (lines after - the first are prefix by ` or: ' instead of `Usage:'). */ + the first are prefix by " or: " instead of "Usage:"). */ const char *args_doc; /* If non-NULL, a string containing extra text to be printed before and after the options in a long help message (separated by a vertical tab - `\v' character). + '\v' character). Write the initial value as N_("BEFORE-TEXT") "\v" N_("AFTER-TEXT") if you want xgettext to collect the two pieces of text into a POT file. */ const char *doc; @@ -265,7 +265,7 @@ struct argp defines, below, describing which other help text TEXT is. The function should return either TEXT, if it should be used as-is, a replacement string, which should be malloced, and will be freed by argp, or NULL, - meaning `print nothing'. The value for TEXT is *after* any translation + meaning "print nothing". The value for TEXT is *after* any translation has been done, so if any of the replacement text also needs translation, that should be done by the filter function. INPUT is either the input supplied to argp_parse, or NULL, if argp_help was called directly. */ @@ -304,7 +304,7 @@ struct argp_child printing a header string, use a value of "". */ const char *header; - /* Where to group the child options relative to the other (`consolidated') + /* Where to group the child options relative to the other ("consolidated") options in the parent argp; the values are the same as the GROUP field in argp_option structs, but all child-groupings follow parent options at a particular group level. If both this field and HEADER are zero, then @@ -337,7 +337,7 @@ struct argp_state unsigned arg_num; /* If non-zero, the index in ARGV of the first argument following a special - `--' argument (which prevents anything following being interpreted as an + '--' argument (which prevents anything following being interpreted as an option). Only set once argument parsing has proceeded past this point. */ int quoted; @@ -399,7 +399,7 @@ struct argp_state /* Don't exit on errors (they may still result in error messages). */ #define ARGP_NO_EXIT 0x20 -/* Use the gnu getopt `long-only' rules for parsing arguments. */ +/* Use the gnu getopt "long-only" rules for parsing arguments. */ #define ARGP_LONG_ONLY 0x40 /* Turns off any message-printing/exiting options. */ @@ -456,7 +456,7 @@ extern void (*argp_program_version_hook) (FILE *__restrict __stream, the bug-reporting address for the program. It will be printed by argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help messages), embedded in a sentence that says something like - `Report bugs to ADDR.'. */ + "Report bugs to ADDR." */ extern const char *argp_program_bug_address; /* The exit status that argp will use when exiting due to a parsing error. @@ -467,7 +467,7 @@ extern error_t argp_err_exit_status; /* Flags for argp_help. */ #define ARGP_HELP_USAGE 0x01 /* a Usage: message. */ #define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */ -#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */ +#define ARGP_HELP_SEE 0x04 /* a "Try ... for more help" message. */ #define ARGP_HELP_LONG 0x08 /* a long help message. */ #define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */ #define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */ @@ -526,7 +526,7 @@ extern void __argp_usage (const struct argp_state *__state); #endif /* If appropriate, print the printf string FMT and following args, preceded - by the program name and `:', to stderr, and followed by a `Try ... --help' + by the program name and ':', to stderr, and followed by a "Try ... --help" message, then exit (1). */ extern void argp_error (const struct argp_state *__restrict __state, const char *__restrict __fmt, ...) diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h index 5264853b59..91b1008b32 100644 --- a/gl/arpa_inet.in.h +++ b/gl/arpa_inet.in.h @@ -1,6 +1,6 @@ /* A GNU-like <arpa/inet.h>. - Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/asnprintf.c b/gl/asnprintf.c index e4fd95c6ee..416a586ef4 100644 --- a/gl/asnprintf.c +++ b/gl/asnprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/asprintf.c b/gl/asprintf.c index 2f1312699d..b8b405f34e 100644 --- a/gl/asprintf.c +++ b/gl/asprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2007, 2009-2011 Free Software Foundation, + Copyright (C) 1999, 2002, 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/basename-lgpl.c b/gl/basename-lgpl.c index 529bc35d72..43ef8c211b 100644 --- a/gl/basename-lgpl.c +++ b/gl/basename-lgpl.c @@ -1,6 +1,6 @@ /* basename.c -- return the last element in a file name - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -1,6 +1,6 @@ /* bind.c --- wrappers for Windows bind function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h index 6114916019..e356699a4d 100644 --- a/gl/byteswap.in.h +++ b/gl/byteswap.in.h @@ -1,5 +1,5 @@ /* byteswap.h - Byte swapping - Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gl/c-ctype.c b/gl/c-ctype.c index 0fb42953ab..6ca7992038 100644 --- a/gl/c-ctype.c +++ b/gl/c-ctype.c @@ -1,6 +1,6 @@ /* Character handling in C locale. - Copyright 2000-2003, 2006, 2009-2011 Free Software Foundation, Inc. + Copyright 2000-2003, 2006, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/c-ctype.h b/gl/c-ctype.h index 57e71ee02c..a857748541 100644 --- a/gl/c-ctype.h +++ b/gl/c-ctype.h @@ -5,7 +5,7 @@ <ctype.h> functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -118,23 +118,23 @@ extern "C" { if (c_isalpha (*s)) ... */ -extern bool c_isascii (int c); /* not locale dependent */ - -extern bool c_isalnum (int c); -extern bool c_isalpha (int c); -extern bool c_isblank (int c); -extern bool c_iscntrl (int c); -extern bool c_isdigit (int c); -extern bool c_islower (int c); -extern bool c_isgraph (int c); -extern bool c_isprint (int c); -extern bool c_ispunct (int c); -extern bool c_isspace (int c); -extern bool c_isupper (int c); -extern bool c_isxdigit (int c); - -extern int c_tolower (int c); -extern int c_toupper (int c); +extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */ + +extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST; +extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST; +extern bool c_islower (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST; +extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST; + +extern int c_tolower (int c) _GL_ATTRIBUTE_CONST; +extern int c_toupper (int c) _GL_ATTRIBUTE_CONST; #if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS diff --git a/gl/close.c b/gl/close.c index c2197fe0a6..4b7accbc96 100644 --- a/gl/close.c +++ b/gl/close.c @@ -1,5 +1,5 @@ /* close replacement. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/closedir.c b/gl/closedir.c index 0fdce18054..df31e86b4e 100644 --- a/gl/closedir.c +++ b/gl/closedir.c @@ -1,5 +1,5 @@ /* Stop reading the entries of a directory. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/connect.c b/gl/connect.c index afd13b9f8d..939b399afe 100644 --- a/gl/connect.c +++ b/gl/connect.c @@ -1,6 +1,6 @@ /* connect.c --- wrappers for Windows connect function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/dirent-private.h b/gl/dirent-private.h index 74632ff39b..b60203c4b9 100644 --- a/gl/dirent-private.h +++ b/gl/dirent-private.h @@ -1,5 +1,5 @@ /* Private details of the DIR type. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/dirent.in.h b/gl/dirent.in.h index cbcf841df2..808b360856 100644 --- a/gl/dirent.in.h +++ b/gl/dirent.in.h @@ -1,5 +1,5 @@ /* A GNU-like <dirent.h>. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c index f5b0c0ff01..2895cbcb28 100644 --- a/gl/dirname-lgpl.c +++ b/gl/dirname-lgpl.c @@ -1,6 +1,6 @@ /* dirname.c -- return all but the last element in a file name - Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -25,7 +25,7 @@ /* Return the length of the prefix of FILE that will be used by dir_name. If FILE is in the working directory, this returns zero - even though `dir_name (FILE)' will return ".". Works properly even + even though 'dir_name (FILE)' will return ".". Works properly even if there are trailing slashes (by effectively ignoring them). */ size_t @@ -53,9 +53,9 @@ dir_len (char const *file) } -/* In general, we can't use the builtin `dirname' function if available, +/* In general, we can't use the builtin 'dirname' function if available, since it has different meanings in different environments. - In some environments the builtin `dirname' modifies its argument. + In some environments the builtin 'dirname' modifies its argument. Return the leading directories part of FILE, allocated with malloc. Works properly even if there are trailing slashes (by effectively diff --git a/gl/dirname.h b/gl/dirname.h index 2ef9882445..51a685c3a4 100644 --- a/gl/dirname.h +++ b/gl/dirname.h @@ -1,6 +1,6 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003-2006, 2009-2011 Free Software Foundation, + Copyright (C) 1998, 2001, 2003-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -37,9 +37,9 @@ char *dir_name (char const *file); # endif char *mdir_name (char const *file); -size_t base_len (char const *file); -size_t dir_len (char const *file); -char *last_component (char const *file); +size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; +size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; +char *last_component (char const *file) _GL_ATTRIBUTE_PURE; bool strip_trailing_slashes (char *file); diff --git a/gl/dosname.h b/gl/dosname.h index acdd03b156..0468ce4dc8 100644 --- a/gl/dosname.h +++ b/gl/dosname.h @@ -1,6 +1,6 @@ /* File names on MS-DOS/Windows systems. - Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/errno.in.h b/gl/errno.in.h index b6014b43d5..5271bcdba5 100644 --- a/gl/errno.in.h +++ b/gl/errno.in.h @@ -1,6 +1,6 @@ /* A POSIX-like <errno.h>. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/error.c b/gl/error.c index 5ebe8bff22..dc8c65fa7f 100644 --- a/gl/error.c +++ b/gl/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -54,7 +54,7 @@ function without parameters instead. */ void (*error_print_progname) (void); -/* This variable is incremented each time `error' is called. */ +/* This variable is incremented each time 'error' is called. */ unsigned int error_message_count; #ifdef _LIBC @@ -65,7 +65,7 @@ unsigned int error_message_count; # include <limits.h> # include <libio/libioP.h> -/* In GNU libc we want do not want to use the common name `error' directly. +/* In GNU libc we want do not want to use the common name 'error' directly. Instead make it a weak alias. */ extern void __error (int status, int errnum, const char *message, ...) __attribute__ ((__format__ (__printf__, 3, 4))); @@ -89,7 +89,7 @@ extern void __error_at_line (int status, int errnum, const char *file_name, # include <unistd.h> # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ @@ -125,9 +125,10 @@ static inline int is_open (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32: The initial state of unassigned standard file descriptors is - that they are open but point to an INVALID_HANDLE_VALUE. There is no - fcntl, and the gnulib replacement fcntl does not support F_GETFL. */ + /* On native Windows: The initial state of unassigned standard file + descriptors is that they are open but point to an INVALID_HANDLE_VALUE. + There is no fcntl, and the gnulib replacement fcntl does not support + F_GETFL. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; # else # ifndef F_GETFL diff --git a/gl/error.h b/gl/error.h index 80f81bcef2..9c2cb8bc6a 100644 --- a/gl/error.h +++ b/gl/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2011 Free Software Foundation, + Copyright (C) 1995-1997, 2003, 2006, 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -35,9 +35,9 @@ extern "C" { #endif -/* Print a message with `fprintf (stderr, FORMAT, ...)'; +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). - If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ extern void error (int __status, int __errnum, const char *__format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); @@ -51,7 +51,7 @@ extern void error_at_line (int __status, int __errnum, const char *__fname, function without parameters instead. */ extern void (*error_print_progname) (void); -/* This variable is incremented each time `error' is called. */ +/* This variable is incremented each time 'error' is called. */ extern unsigned int error_message_count; /* Sometimes we want to have at most one error per line. This diff --git a/gl/fd-hook.c b/gl/fd-hook.c index b58300d9b0..8f4ffe2a8d 100644 --- a/gl/fd-hook.c +++ b/gl/fd-hook.c @@ -1,5 +1,5 @@ /* Hook for making making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. This program is free software: you can redistribute it and/or modify it diff --git a/gl/fd-hook.h b/gl/fd-hook.h index ada4c87348..721e9ad931 100644 --- a/gl/fd-hook.h +++ b/gl/fd-hook.h @@ -1,5 +1,5 @@ /* Hook for making making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/gl/filename.h b/gl/filename.h index 7827c11292..7b89d0d06b 100644 --- a/gl/filename.h +++ b/gl/filename.h @@ -1,5 +1,5 @@ /* Basic filename support macros. - Copyright (C) 2001-2004, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ extern "C" { IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ diff --git a/gl/float+.h b/gl/float+.h index 2e844890c9..c294350ba0 100644 --- a/gl/float+.h +++ b/gl/float+.h @@ -1,5 +1,5 @@ /* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. This program is free software; you can redistribute it and/or modify diff --git a/gl/float.c b/gl/float.c index b05b40c2df..ea31866548 100644 --- a/gl/float.c +++ b/gl/float.c @@ -1,5 +1,5 @@ /* Auxiliary definitions for <float.h>. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. This program is free software: you can redistribute it and/or modify diff --git a/gl/float.in.h b/gl/float.in.h index d5b22584f0..b4205103be 100644 --- a/gl/float.in.h +++ b/gl/float.in.h @@ -1,6 +1,6 @@ /* A correct <float.h>. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/fpucw.h b/gl/fpucw.h index 07403bf72b..a62c51daba 100644 --- a/gl/fpucw.h +++ b/gl/fpucw.h @@ -1,5 +1,5 @@ /* Manipulating the FPU control word. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. This program is free software: you can redistribute it and/or modify diff --git a/gl/frexp.c b/gl/frexp.c index 26bdec9a71..4f5d0c03e8 100644 --- a/gl/frexp.c +++ b/gl/frexp.c @@ -1,5 +1,5 @@ /* Split a double into fraction and mantissa. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/frexpl.c b/gl/frexpl.c index c468937ae2..b74ceeb56f 100644 --- a/gl/frexpl.c +++ b/gl/frexpl.c @@ -1,5 +1,5 @@ /* Split a 'long double' into fraction and mantissa. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/fseek.c b/gl/fseek.c index bcb76d8bc7..20f5e2c972 100644 --- a/gl/fseek.c +++ b/gl/fseek.c @@ -1,5 +1,5 @@ /* An fseek() function that, together with fflush(), is POSIX compliant. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/fseeko.c b/gl/fseeko.c index 87d6638d93..eae1b72683 100644 --- a/gl/fseeko.c +++ b/gl/fseeko.c @@ -1,5 +1,5 @@ /* An fseeko() function that, together with fflush(), is POSIX compliant. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/fseterr.c b/gl/fseterr.c index eaad702c81..30b41e11ea 100644 --- a/gl/fseterr.c +++ b/gl/fseterr.c @@ -1,5 +1,5 @@ /* Set the error indicator of a stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/fseterr.h b/gl/fseterr.h index e4b061b894..b3930c5a88 100644 --- a/gl/fseterr.h +++ b/gl/fseterr.h @@ -1,5 +1,5 @@ /* Set the error indicator of a stream. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/fstat.c b/gl/fstat.c index db5b17c1ed..4918495bc7 100644 --- a/gl/fstat.c +++ b/gl/fstat.c @@ -1,5 +1,5 @@ /* fstat() replacement. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/ftell.c b/gl/ftell.c index 74ec986e27..817e9ff068 100644 --- a/gl/ftell.c +++ b/gl/ftell.c @@ -1,5 +1,5 @@ /* An ftell() function that works around platform bugs. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/ftello.c b/gl/ftello.c index fbdc44f2ea..1beb202968 100644 --- a/gl/ftello.c +++ b/gl/ftello.c @@ -1,5 +1,5 @@ /* An ftello() function that works around platform bugs. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c new file mode 100644 index 0000000000..b846e48d79 --- /dev/null +++ b/gl/gai_strerror.c @@ -0,0 +1,93 @@ +/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2012 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _LIBC +# include <config.h> +#endif + +#include <stdio.h> +#include <netdb.h> + +#ifdef _LIBC +# include <libintl.h> +#else +# include "gettext.h" +# define _(String) gettext (String) +# define N_(String) String +#endif + +#if HAVE_DECL_GAI_STRERROR + +# include <sys/socket.h> +# undef gai_strerror +# if HAVE_DECL_GAI_STRERRORA +# define gai_strerror gai_strerrorA +# endif + +const char * +rpl_gai_strerror (int code) +{ + return gai_strerror (code); +} + +#else /* !HAVE_DECL_GAI_STRERROR */ + +static struct + { + int code; + const char *msg; + } +values[] = + { + { EAI_ADDRFAMILY, N_("Address family for hostname not supported") }, + { EAI_AGAIN, N_("Temporary failure in name resolution") }, + { EAI_BADFLAGS, N_("Bad value for ai_flags") }, + { EAI_FAIL, N_("Non-recoverable failure in name resolution") }, + { EAI_FAMILY, N_("ai_family not supported") }, + { EAI_MEMORY, N_("Memory allocation failure") }, + { EAI_NODATA, N_("No address associated with hostname") }, + { EAI_NONAME, N_("Name or service not known") }, + { EAI_SERVICE, N_("Servname not supported for ai_socktype") }, + { EAI_SOCKTYPE, N_("ai_socktype not supported") }, + { EAI_SYSTEM, N_("System error") }, + { EAI_OVERFLOW, N_("Argument buffer too small") }, +#ifdef EAI_INPROGRESS + { EAI_INPROGRESS, N_("Processing request in progress") }, + { EAI_CANCELED, N_("Request canceled") }, + { EAI_NOTCANCELED, N_("Request not canceled") }, + { EAI_ALLDONE, N_("All requests done") }, + { EAI_INTR, N_("Interrupted by a signal") }, + { EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") } +#endif + }; + +const char * +gai_strerror (int code) +{ + size_t i; + for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i) + if (values[i].code == code) + return _(values[i].msg); + + return _("Unknown error"); +} +# ifdef _LIBC +libc_hidden_def (gai_strerror) +# endif +#endif /* !HAVE_DECL_GAI_STRERROR */ diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c new file mode 100644 index 0000000000..c53896718f --- /dev/null +++ b/gl/getaddrinfo.c @@ -0,0 +1,444 @@ +/* Get address information (partial implementation). + Copyright (C) 1997, 2001-2002, 2004-2012 Free Software Foundation, Inc. + Contributed by Simon Josefsson <simon@josefsson.org>. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include <config.h> + +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the sa == NULL test below. */ +#define _GL_ARG_NONNULL(params) + +#include <netdb.h> + +#if HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif + +/* Get inet_ntop. */ +#include <arpa/inet.h> + +/* Get calloc. */ +#include <stdlib.h> + +/* Get memcpy, strdup. */ +#include <string.h> + +/* Get snprintf. */ +#include <stdio.h> + +#include <stdbool.h> + +#include "gettext.h" +#define _(String) gettext (String) +#define N_(String) String + +/* BeOS has AF_INET, but not PF_INET. */ +#ifndef PF_INET +# define PF_INET AF_INET +#endif +/* BeOS also lacks PF_UNSPEC. */ +#ifndef PF_UNSPEC +# define PF_UNSPEC 0 +#endif + +#if defined _WIN32 || defined __WIN32__ +# define WINDOWS_NATIVE +#endif + +/* gl_sockets_startup */ +#include "sockets.h" + +#ifdef WINDOWS_NATIVE +typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, + const struct addrinfo*, + struct addrinfo**); +typedef void (WSAAPI *freeaddrinfo_func) (struct addrinfo*); +typedef int (WSAAPI *getnameinfo_func) (const struct sockaddr*, + socklen_t, char*, DWORD, + char*, DWORD, int); + +static getaddrinfo_func getaddrinfo_ptr = NULL; +static freeaddrinfo_func freeaddrinfo_ptr = NULL; +static getnameinfo_func getnameinfo_ptr = NULL; + +static int +use_win32_p (void) +{ + static int done = 0; + HMODULE h; + + if (done) + return getaddrinfo_ptr ? 1 : 0; + + done = 1; + + h = GetModuleHandle ("ws2_32.dll"); + + if (h) + { + getaddrinfo_ptr = (getaddrinfo_func) GetProcAddress (h, "getaddrinfo"); + freeaddrinfo_ptr = (freeaddrinfo_func) GetProcAddress (h, "freeaddrinfo"); + getnameinfo_ptr = (getnameinfo_func) GetProcAddress (h, "getnameinfo"); + } + + /* If either is missing, something is odd. */ + if (!getaddrinfo_ptr || !freeaddrinfo_ptr || !getnameinfo_ptr) + { + getaddrinfo_ptr = NULL; + freeaddrinfo_ptr = NULL; + getnameinfo_ptr = NULL; + return 0; + } + + gl_sockets_startup (SOCKETS_1_1); + + return 1; +} +#endif + +static inline bool +validate_family (int family) +{ + /* FIXME: Support more families. */ +#if HAVE_IPV4 + if (family == PF_INET) + return true; +#endif +#if HAVE_IPV6 + if (family == PF_INET6) + return true; +#endif + if (family == PF_UNSPEC) + return true; + return false; +} + +/* Translate name of a service location and/or a service name to set of + socket addresses. */ +int +getaddrinfo (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res) +{ + struct addrinfo *tmp; + int port = 0; + struct hostent *he; + void *storage; + size_t size; +#if HAVE_IPV6 + struct v6_pair { + struct addrinfo addrinfo; + struct sockaddr_in6 sockaddr_in6; + }; +#endif +#if HAVE_IPV4 + struct v4_pair { + struct addrinfo addrinfo; + struct sockaddr_in sockaddr_in; + }; +#endif + +#ifdef WINDOWS_NATIVE + if (use_win32_p ()) + return getaddrinfo_ptr (nodename, servname, hints, res); +#endif + + if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE))) + /* FIXME: Support more flags. */ + return EAI_BADFLAGS; + + if (hints && !validate_family (hints->ai_family)) + return EAI_FAMILY; + + if (hints && + hints->ai_socktype != SOCK_STREAM && hints->ai_socktype != SOCK_DGRAM) + /* FIXME: Support other socktype. */ + return EAI_SOCKTYPE; /* FIXME: Better return code? */ + + if (!nodename) + { + if (!(hints->ai_flags & AI_PASSIVE)) + return EAI_NONAME; + +#ifdef HAVE_IPV6 + nodename = (hints->ai_family == AF_INET6) ? "::" : "0.0.0.0"; +#else + nodename = "0.0.0.0"; +#endif + } + + if (servname) + { + struct servent *se = NULL; + const char *proto = + (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp"; + + if (hints == NULL || !(hints->ai_flags & AI_NUMERICSERV)) + /* FIXME: Use getservbyname_r if available. */ + se = getservbyname (servname, proto); + + if (!se) + { + char *c; + if (!(*servname >= '0' && *servname <= '9')) + return EAI_NONAME; + port = strtoul (servname, &c, 10); + if (*c || port > 0xffff) + return EAI_NONAME; + port = htons (port); + } + else + port = se->s_port; + } + + /* FIXME: Use gethostbyname_r if available. */ + he = gethostbyname (nodename); + if (!he || he->h_addr_list[0] == NULL) + return EAI_NONAME; + + switch (he->h_addrtype) + { +#if HAVE_IPV6 + case PF_INET6: + size = sizeof (struct v6_pair); + break; +#endif + +#if HAVE_IPV4 + case PF_INET: + size = sizeof (struct v4_pair); + break; +#endif + + default: + return EAI_NODATA; + } + + storage = calloc (1, size); + if (!storage) + return EAI_MEMORY; + + switch (he->h_addrtype) + { +#if HAVE_IPV6 + case PF_INET6: + { + struct v6_pair *p = storage; + struct sockaddr_in6 *sinp = &p->sockaddr_in6; + tmp = &p->addrinfo; + + if (port) + sinp->sin6_port = port; + + if (he->h_length != sizeof (sinp->sin6_addr)) + { + free (storage); + return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */ + } + + memcpy (&sinp->sin6_addr, he->h_addr_list[0], sizeof sinp->sin6_addr); + + tmp->ai_addr = (struct sockaddr *) sinp; + tmp->ai_addrlen = sizeof *sinp; + } + break; +#endif + +#if HAVE_IPV4 + case PF_INET: + { + struct v4_pair *p = storage; + struct sockaddr_in *sinp = &p->sockaddr_in; + tmp = &p->addrinfo; + + if (port) + sinp->sin_port = port; + + if (he->h_length != sizeof (sinp->sin_addr)) + { + free (storage); + return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */ + } + + memcpy (&sinp->sin_addr, he->h_addr_list[0], sizeof sinp->sin_addr); + + tmp->ai_addr = (struct sockaddr *) sinp; + tmp->ai_addrlen = sizeof *sinp; + } + break; +#endif + + default: + free (storage); + return EAI_NODATA; + } + + if (hints && hints->ai_flags & AI_CANONNAME) + { + const char *cn; + if (he->h_name) + cn = he->h_name; + else + cn = nodename; + + tmp->ai_canonname = strdup (cn); + if (!tmp->ai_canonname) + { + free (storage); + return EAI_MEMORY; + } + } + + tmp->ai_protocol = (hints) ? hints->ai_protocol : 0; + tmp->ai_socktype = (hints) ? hints->ai_socktype : 0; + tmp->ai_addr->sa_family = he->h_addrtype; + tmp->ai_family = he->h_addrtype; + +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + switch (he->h_addrtype) + { +#if HAVE_IPV4 + case AF_INET: + tmp->ai_addr->sa_len = sizeof (struct sockaddr_in); + break; +#endif +#if HAVE_IPV6 + case AF_INET6: + tmp->ai_addr->sa_len = sizeof (struct sockaddr_in6); + break; +#endif + } +#endif + + /* FIXME: If more than one address, create linked list of addrinfo's. */ + + *res = tmp; + + return 0; +} + +/* Free 'addrinfo' structure AI including associated storage. */ +void +freeaddrinfo (struct addrinfo *ai) +{ +#ifdef WINDOWS_NATIVE + if (use_win32_p ()) + { + freeaddrinfo_ptr (ai); + return; + } +#endif + + while (ai) + { + struct addrinfo *cur; + + cur = ai; + ai = ai->ai_next; + + free (cur->ai_canonname); + free (cur); + } +} + +int +getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags) +{ +#ifdef WINDOWS_NATIVE + if (use_win32_p ()) + return getnameinfo_ptr (sa, salen, node, nodelen, + service, servicelen, flags); +#endif + + /* FIXME: Support other flags. */ + if ((node && nodelen > 0 && !(flags & NI_NUMERICHOST)) || + (service && servicelen > 0 && !(flags & NI_NUMERICHOST)) || + (flags & ~(NI_NUMERICHOST|NI_NUMERICSERV))) + return EAI_BADFLAGS; + + if (sa == NULL || salen < sizeof (sa->sa_family)) + return EAI_FAMILY; + + switch (sa->sa_family) + { +#if HAVE_IPV4 + case AF_INET: + if (salen < sizeof (struct sockaddr_in)) + return EAI_FAMILY; + break; +#endif +#if HAVE_IPV6 + case AF_INET6: + if (salen < sizeof (struct sockaddr_in6)) + return EAI_FAMILY; + break; +#endif + default: + return EAI_FAMILY; + } + + if (node && nodelen > 0 && flags & NI_NUMERICHOST) + { + switch (sa->sa_family) + { +#if HAVE_IPV4 + case AF_INET: + if (!inet_ntop (AF_INET, + &(((const struct sockaddr_in *) sa)->sin_addr), + node, nodelen)) + return EAI_SYSTEM; + break; +#endif + +#if HAVE_IPV6 + case AF_INET6: + if (!inet_ntop (AF_INET6, + &(((const struct sockaddr_in6 *) sa)->sin6_addr), + node, nodelen)) + return EAI_SYSTEM; + break; +#endif + + default: + return EAI_FAMILY; + } + } + + if (service && servicelen > 0 && flags & NI_NUMERICSERV) + switch (sa->sa_family) + { +#if HAVE_IPV4 + case AF_INET: +#endif +#if HAVE_IPV6 + case AF_INET6: +#endif + { + unsigned short int port + = ntohs (((const struct sockaddr_in *) sa)->sin_port); + if (servicelen <= snprintf (service, servicelen, "%u", port)) + return EAI_OVERFLOW; + } + break; + } + + return 0; +} diff --git a/gl/getdelim.c b/gl/getdelim.c index 14a8bce818..d80c5833b6 100644 --- a/gl/getdelim.c +++ b/gl/getdelim.c @@ -1,5 +1,5 @@ /* getdelim.c --- Implementation of replacement getdelim function. - Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2011 Free Software + Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or diff --git a/gl/getline.c b/gl/getline.c index e6e918724d..ab64d80b56 100644 --- a/gl/getline.c +++ b/gl/getline.c @@ -1,5 +1,5 @@ /* getline.c --- Implementation of replacement getline function. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/gl/getopt.c b/gl/getopt.c index 7c9f704061..4342a34104 100644 --- a/gl/getopt.c +++ b/gl/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software + Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -41,15 +41,15 @@ # include <wchar.h> #endif -/* This version of `getopt' appears to the caller like standard Unix `getopt' +/* This version of 'getopt' appears to the caller like standard Unix 'getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. - As `getopt_long' works, it permutes the elements of ARGV so that, + As 'getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. - Using `getopt' or setting the environment variable POSIXLY_CORRECT + Using 'getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. @@ -58,24 +58,24 @@ #include "getopt_int.h" -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, + Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller - and for communication between successive calls to `getopt'. + and for communication between successive calls to 'getopt'. - On entry to `getopt', zero means this is the first call; initialize. + On entry to 'getopt', zero means this is the first call; initialize. - When `getopt' returns -1, this is the index of the first of the + When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. - Otherwise, `optind' communicates from one call to the next + Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ @@ -137,7 +137,7 @@ extern char *__getopt_nonoption_flags; The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. - `first_nonopt' and `last_nonopt' are relocated so that they describe + 'first_nonopt' and 'last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void @@ -154,7 +154,7 @@ exchange (char **argv, struct _getopt_data *d) but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS - /* First make sure the handling of the `__getopt_nonoption_flags' + /* First make sure the handling of the '__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) @@ -291,48 +291,48 @@ _getopt_initialize (int argc _GL_UNUSED, If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' + (aside from the initial '-') are option characters. If 'getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can + If 'getopt' finds another option character, it returns that character, + updating 'optind' and 'nextchar' so that the next call to 'getopt' can resume the scan with the following option character or ARGV-element. - If there are no more option characters, `getopt' returns -1. - Then `optind' is the index in ARGV of the first ARGV-element + If there are no more option characters, 'getopt' returns -1. + Then 'optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to + return '?' after printing an error message. If you set 'opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg'. Two colons mean an option that + ARGV-element, is returned in 'optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg', otherwise `optarg' is set to zero. + it is returned in 'optarg', otherwise 'optarg' is set to zero. - If OPTSTRING starts with `-' or `+', it requests different methods of + If OPTSTRING starts with '-' or '+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - Long-named options begin with `--' instead of `-'. + Long-named options begin with '--' instead of '-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated - from the option name by a `=', or else the in next ARGV-element. - When `getopt' finds a long-named option, it returns 0 if that option's - `flag' field is nonzero, the value of the option's `val' field - if the `flag' field is zero. + from the option name by a '=', or else the in next ARGV-element. + When 'getopt' finds a long-named option, it returns 0 if that option's + 'flag' field is nonzero, the value of the option's 'val' field + if the 'flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. - LONGOPTS is a vector of `struct option' terminated by an + LONGOPTS is a vector of 'struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. @@ -409,7 +409,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, d->__last_nonopt = d->optind; } - /* The special ARGV-element `--' means premature end of options. + /* The special ARGV-element '--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ @@ -788,7 +788,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, char c = *d->__nextchar++; const char *temp = strchr (optstring, c); - /* Increment `optind' when we start to process its last character. */ + /* Increment 'optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; @@ -887,7 +887,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, return c; } else - /* We already incremented `d->optind' once; + /* We already incremented 'd->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; @@ -1114,7 +1114,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, c = '?'; } else - /* We already incremented `optind' once; + /* We already incremented 'optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; @@ -1177,7 +1177,7 @@ __posix_getopt (int argc, char *const *argv, const char *optstring) #ifdef TEST /* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ + the above definition of 'getopt'. */ int main (int argc, char **argv) diff --git a/gl/getopt.in.h b/gl/getopt.in.h index 0f3918ab77..06b6dfc50c 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-2007, 2009-2011 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -82,7 +82,7 @@ getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). - This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', + This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. @@ -128,29 +128,29 @@ extern "C" { #endif -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, + Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller - and for communication between successive calls to `getopt'. + and for communication between successive calls to 'getopt'. - On entry to `getopt', zero means this is the first call; initialize. + On entry to 'getopt', zero means this is the first call; initialize. - When `getopt' returns -1, this is the index of the first of the + When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. - Otherwise, `optind' communicates from one call to the next + Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; -/* Callers store zero here to inhibit the error message `getopt' prints +/* Callers store zero here to inhibit the error message 'getopt' prints for unrecognized options. */ extern int opterr; @@ -162,24 +162,24 @@ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is + of 'struct option' terminated by an element containing a name which is zero. - The field `has_arg' is: + The field 'has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but left unchanged if the option is not found. - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ # if !GNULIB_defined_struct_option struct option @@ -194,7 +194,7 @@ struct option # define GNULIB_defined_struct_option 1 # endif -/* Names for the values of the `has_arg' field of `struct option'. */ +/* Names for the values of the 'has_arg' field of 'struct option'. */ # define no_argument 0 # define required_argument 1 @@ -208,23 +208,23 @@ struct option Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options - missing arguments, `optopt' is set to the option letter, and '?' is + missing arguments, 'optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in `optarg'. + takes an argument, to be placed in 'optarg'. If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU `getopt'. + optional. This behavior is specific to the GNU 'getopt'. - The argument `--' causes premature termination of argument - scanning, explicitly telling `getopt' that there are no more + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more options. - If OPTS begins with `-', then non-option arguments are treated as + If OPTS begins with '-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU - `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) diff --git a/gl/getopt1.c b/gl/getopt1.c index 36568024cc..fb2a8f5a7b 100644 --- a/gl/getopt1.c +++ b/gl/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software + Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -141,11 +141,11 @@ main (int argc, char **argv) break; case 'c': - printf ("option c with value `%s'\n", optarg); + printf ("option c with value '%s'\n", optarg); break; case 'd': - printf ("option d with value `%s'\n", optarg); + printf ("option d with value '%s'\n", optarg); break; case '?': diff --git a/gl/getopt_int.h b/gl/getopt_int.h index 9f0c7131a1..2da020c995 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, 2009-2011 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -40,7 +40,7 @@ extern int _getopt_internal (int ___argc, char **___argv, stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character + variable POSIXLY_CORRECT, or using '+' as the first character of the list of option characters, or by calling getopt. PERMUTE is the default. We permute the contents of ARGV as we @@ -52,12 +52,12 @@ extern int _getopt_internal (int ___argc, char **___argv, written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option - with character code 1. Using `-' as the first character of the + with character code 1. Using '-' as the first character of the list of option characters selects this mode of operation. - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + The special argument '--' forces an end of option-scanning regardless + of the value of 'ordering'. In the case of RETURN_IN_ORDER, only + '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ enum __ord { @@ -99,8 +99,8 @@ struct _getopt_data /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first - of them; `last_nonopt' is the index after the last of them. */ + been skipped. 'first_nonopt' is the index in ARGV of the first + of them; 'last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; diff --git a/gl/getpass.c b/gl/getpass.c index 90392f9069..25f1e181e3 100644 --- a/gl/getpass.c +++ b/gl/getpass.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +/* Copyright (C) 1992-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/getpass.h b/gl/getpass.h index f1e67b5aa6..0d923c6bc5 100644 --- a/gl/getpass.h +++ b/gl/getpass.h @@ -1,5 +1,5 @@ /* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin. - Copyright (C) 2004, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2009-2012 Free Software Foundation, Inc. Contributed by Simon Josefsson <jas@extundo.com>, 2004. This program is free software; you can redistribute it and/or modify diff --git a/gl/getpeername.c b/gl/getpeername.c index abe5a40b67..01493aac94 100644 --- a/gl/getpeername.c +++ b/gl/getpeername.c @@ -1,6 +1,6 @@ /* getpeername.c --- wrappers for Windows getpeername function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/getsubopt.c b/gl/getsubopt.c index ab74d03d9d..105ceed5cc 100644 --- a/gl/getsubopt.c +++ b/gl/getsubopt.c @@ -1,5 +1,5 @@ /* Parse comma separated list into words. - Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2011 Free Software + Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/gl/gettext.h b/gl/gettext.h index 792e506f9d..050134a3ce 100644 --- a/gl/gettext.h +++ b/gl/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/gettime.c b/gl/gettime.c index 6dbb4574c6..8075bfaf99 100644 --- a/gl/gettime.c +++ b/gl/gettime.c @@ -1,6 +1,6 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2002, 2004-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/gettimeofday.c b/gl/gettimeofday.c index adfb51f049..3c0fdd9572 100644 --- a/gl/gettimeofday.c +++ b/gl/gettimeofday.c @@ -1,6 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c index c11b1e0c81..eeffcbe46a 100644 --- a/gl/inet_ntop.c +++ b/gl/inet_ntop.c @@ -1,6 +1,6 @@ /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form - Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -74,7 +74,7 @@ static const char *inet_ntop6 (const unsigned char *src, char *dst, socklen_t si * inet_ntop(af, src, dst, size) * convert a network format address to presentation format. * return: - * pointer to presentation format address (`dst'), or NULL (see errno). + * pointer to presentation format address ('dst'), or NULL (see errno). * author: * Paul Vixie, 1996. */ @@ -105,7 +105,7 @@ inet_ntop (int af, const void *restrict src, * inet_ntop4(src, dst, size) * format an IPv4 address * return: - * `dst' (as a const) + * 'dst' (as a const) * notes: * (1) uses no statics * (2) takes a u_char* not an in_addr as input diff --git a/gl/inet_pton.c b/gl/inet_pton.c index cb1a872e9b..40963650dc 100644 --- a/gl/inet_pton.c +++ b/gl/inet_pton.c @@ -1,6 +1,6 @@ /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form - Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -73,8 +73,8 @@ static int inet_pton6 (const char *src, unsigned char *dst); * to network format (which is usually some kind of binary format). * return: * 1 if the address was valid for the specified address family - * 0 if the address wasn't valid (`dst' is untouched in this case) - * -1 if some other error occurred (`dst' is untouched in this case, too) + * 0 if the address wasn't valid ('dst' is untouched in this case) + * -1 if some other error occurred ('dst' is untouched in this case, too) * author: * Paul Vixie, 1996. */ @@ -103,9 +103,9 @@ inet_pton (int af, const char *restrict src, void *restrict dst) * like inet_aton() but without all the hexadecimal, octal (with the * exception of 0) and shorthand. * return: - * 1 if `src' is a valid dotted quad, else 0. + * 1 if 'src' is a valid dotted quad, else 0. * notice: - * does not touch `dst' unless it's returning 1. + * does not touch 'dst' unless it's returning 1. * author: * Paul Vixie, 1996. */ @@ -159,9 +159,9 @@ inet_pton4 (const char *restrict src, unsigned char *restrict dst) * inet_pton6(src, dst) * convert presentation level address to network order binary form. * return: - * 1 if `src' is a valid [RFC1884 2.2] address, else 0. + * 1 if 'src' is a valid [RFC1884 2.2] address, else 0. * notice: - * (1) does not touch `dst' unless it's returning 1. + * (1) does not touch 'dst' unless it's returning 1. * (2) :: in a full address is silently ignored. * credit: * inspired by Mark Andrews. diff --git a/gl/intprops.h b/gl/intprops.h index 1f6a539c18..2485c78d4b 100644 --- a/gl/intprops.h +++ b/gl/intprops.h @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2005, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/isnan.c b/gl/isnan.c index 1d0754c93c..a5a7d92c03 100644 --- a/gl/isnan.c +++ b/gl/isnan.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ /* Specification. */ #ifdef USE_LONG_DOUBLE /* Specification found in math.h or isnanl-nolibm.h. */ -extern int rpl_isnanl (long double x); +extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; #elif ! defined USE_FLOAT /* Specification found in math.h or isnand-nolibm.h. */ extern int rpl_isnand (double x); diff --git a/gl/isnand-nolibm.h b/gl/isnand-nolibm.h index 4c49c32e49..56fb27094c 100644 --- a/gl/isnand-nolibm.h +++ b/gl/isnand-nolibm.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/isnand.c b/gl/isnand.c index c47ff25c18..ef815f3c95 100644 --- a/gl/isnand.c +++ b/gl/isnand.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/isnanf-nolibm.h b/gl/isnanf-nolibm.h index 1a1cbf94fb..52703870a2 100644 --- a/gl/isnanf-nolibm.h +++ b/gl/isnanf-nolibm.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/isnanf.c b/gl/isnanf.c index adb7059e49..0816704bc3 100644 --- a/gl/isnanf.c +++ b/gl/isnanf.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/isnanl-nolibm.h b/gl/isnanl-nolibm.h index bf14228d29..58d963dbc3 100644 --- a/gl/isnanl-nolibm.h +++ b/gl/isnanl-nolibm.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/isnanl.c b/gl/isnanl.c index 1482fb24aa..597ac2a8fe 100644 --- a/gl/isnanl.c +++ b/gl/isnanl.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/itold.c b/gl/itold.c index 0236f33983..95ff7e1785 100644 --- a/gl/itold.c +++ b/gl/itold.c @@ -1,5 +1,5 @@ /* Replacement for 'int' to 'long double' conversion routine. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. This program is free software: you can redistribute it and/or modify diff --git a/gl/listen.c b/gl/listen.c index b7d070e64b..a1b2ab7f6d 100644 --- a/gl/listen.c +++ b/gl/listen.c @@ -1,6 +1,6 @@ /* listen.c --- wrappers for Windows listen function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/lseek.c b/gl/lseek.c index 8c9834f890..543367888f 100644 --- a/gl/lseek.c +++ b/gl/lseek.c @@ -1,5 +1,5 @@ /* An lseek() function that detects pipes. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4 index 7feed46694..d978cb898c 100644 --- a/gl/m4/00gnulib.m4 +++ b/gl/m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4 index a8744a844f..656924be88 100644 --- a/gl/m4/alloca.m4 +++ b/gl/m4/alloca.m4 @@ -1,5 +1,5 @@ -# alloca.m4 serial 13 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation, +# alloca.m4 serial 14 +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -53,8 +53,8 @@ m4_version_prereq([2.69], [] ,[ # _AC_LIBOBJ_ALLOCA # ----------------- -# Set up the LIBOBJ replacement of `alloca'. Well, not exactly -# AC_LIBOBJ since we actually set the output variable `ALLOCA'. +# Set up the LIBOBJ replacement of 'alloca'. Well, not exactly +# AC_LIBOBJ since we actually set the output variable 'ALLOCA'. # Nevertheless, for Automake, AC_LIBSOURCES it. m4_define([_AC_LIBOBJ_ALLOCA], [# The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -63,9 +63,9 @@ m4_define([_AC_LIBOBJ_ALLOCA], # use ar to extract alloca.o from them instead of compiling alloca.c. AC_LIBSOURCES(alloca.c) AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl -AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.]) +AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.]) -AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray, +AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray, [AC_EGREP_CPP(webecray, [#if defined CRAY && ! defined CRAY2 webecray @@ -77,10 +77,10 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, - [Define to one of `_getb67', `GETB67', - `getb67' for Cray-2 and Cray-YMP + [Define to one of '_getb67', 'GETB67', + 'getb67' for Cray-2 and Cray-YMP systems. This function is required for - `alloca.c' support on those systems.]) + 'alloca.c' support on those systems.]) break]) done fi diff --git a/gl/m4/alphasort.m4 b/gl/m4/alphasort.m4 index e59aa74e01..6ca985ea9c 100644 --- a/gl/m4/alphasort.m4 +++ b/gl/m4/alphasort.m4 @@ -1,5 +1,5 @@ # alphasort.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/argp.m4 b/gl/m4/argp.m4 index a9963ee6d6..87c7da68a9 100644 --- a/gl/m4/argp.m4 +++ b/gl/m4/argp.m4 @@ -1,5 +1,5 @@ # argp.m4 serial 13 -dnl Copyright (C) 2003-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 index 1df740113c..36915d12ea 100644 --- a/gl/m4/arpa_inet_h.m4 +++ b/gl/m4/arpa_inet_h.m4 @@ -1,5 +1,5 @@ # arpa_inet_h.m4 serial 13 -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4 index 2d4de4659f..f3b7ec97d0 100644 --- a/gl/m4/byteswap.m4 +++ b/gl/m4/byteswap.m4 @@ -1,5 +1,5 @@ # byteswap.m4 serial 4 -dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4 index 3c085129c1..0bec0ef860 100644 --- a/gl/m4/clock_time.m4 +++ b/gl/m4/clock_time.m4 @@ -1,5 +1,5 @@ # clock_time.m4 serial 10 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/close.m4 b/gl/m4/close.m4 index f860a320c1..379e70d83e 100644 --- a/gl/m4/close.m4 +++ b/gl/m4/close.m4 @@ -1,5 +1,5 @@ # close.m4 serial 8 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4 index 1b7912a30b..8a2fba4b83 100644 --- a/gl/m4/closedir.m4 +++ b/gl/m4/closedir.m4 @@ -1,5 +1,5 @@ -# closedir.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +# closedir.m4 serial 2 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,7 +17,9 @@ AC_DEFUN([gl_FUNC_CLOSEDIR], m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then - REPLACE_CLOSEDIR=1 + if test $HAVE_CLOSEDIR = 1; then + REPLACE_CLOSEDIR=1 + fi fi ]) ]) diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4 index da73552231..cf53d24167 100644 --- a/gl/m4/codeset.m4 +++ b/gl/m4/codeset.m4 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4 index ab45170b99..f6c0fa7ba3 100644 --- a/gl/m4/dirent_h.m4 +++ b/gl/m4/dirent_h.m4 @@ -1,5 +1,5 @@ # dirent_h.m4 serial 16 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/dirname.m4 b/gl/m4/dirname.m4 index dcec7e4899..65639ec89e 100644 --- a/gl/m4/dirname.m4 +++ b/gl/m4/dirname.m4 @@ -1,5 +1,5 @@ #serial 10 -*- autoconf -*- -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4 index 16a4e3ec9e..1e03751375 100644 --- a/gl/m4/double-slash-root.m4 +++ b/gl/m4/double-slash-root.m4 @@ -1,5 +1,5 @@ # double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4 index cd9d254b44..dec27faeeb 100644 --- a/gl/m4/dup2.m4 +++ b/gl/m4/dup2.m4 @@ -1,5 +1,5 @@ -#serial 16 -dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. +#serial 17 +dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -67,7 +67,9 @@ AC_DEFUN([gl_FUNC_DUP2], m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then - REPLACE_DUP2=1 + if test $HAVE_DUP2 = 1; then + REPLACE_DUP2=1 + fi fi ]) ]) diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4 index 3006c4848f..75f17e2f10 100644 --- a/gl/m4/eealloc.m4 +++ b/gl/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 serial 2 -dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4 index 6c7982f9bb..8eb57c9d99 100644 --- a/gl/m4/environ.m4 +++ b/gl/m4/environ.m4 @@ -1,5 +1,5 @@ # environ.m4 serial 6 -dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4 index 560adbafed..4f0bb83597 100644 --- a/gl/m4/errno_h.m4 +++ b/gl/m4/errno_h.m4 @@ -1,5 +1,5 @@ # errno_h.m4 serial 10 -dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/error.m4 b/gl/m4/error.m4 index e7022fe460..5d9c70a475 100644 --- a/gl/m4/error.m4 +++ b/gl/m4/error.m4 @@ -1,6 +1,6 @@ #serial 14 -# Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 1996-1998, 2001-2004, 2009-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4 index 7e91924dac..48df999ab5 100644 --- a/gl/m4/exponentd.m4 +++ b/gl/m4/exponentd.m4 @@ -1,5 +1,5 @@ # exponentd.m4 serial 2 -dnl Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/exponentf.m4 b/gl/m4/exponentf.m4 index 3a00840ea4..94d11679fa 100644 --- a/gl/m4/exponentf.m4 +++ b/gl/m4/exponentf.m4 @@ -1,5 +1,5 @@ # exponentf.m4 serial 2 -dnl Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/exponentl.m4 b/gl/m4/exponentl.m4 index 2e706b2c19..a7cd13bc99 100644 --- a/gl/m4/exponentl.m4 +++ b/gl/m4/exponentl.m4 @@ -1,5 +1,5 @@ # exponentl.m4 serial 3 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 index 22156e068c..0bfaef6f90 100644 --- a/gl/m4/extensions.m4 +++ b/gl/m4/extensions.m4 @@ -1,7 +1,7 @@ -# serial 10 -*- Autoconf -*- +# serial 11 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -43,7 +43,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], - [Define to 1 if you need to in order for `stat' and other + [Define to 1 if you need to in order for 'stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4 index bee6edc114..9862741f39 100644 --- a/gl/m4/fcntl-o.m4 +++ b/gl/m4/fcntl-o.m4 @@ -1,5 +1,5 @@ # fcntl-o.m4 serial 4 -dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4 index 03a41e6709..cac28aeb28 100644 --- a/gl/m4/fcntl_h.m4 +++ b/gl/m4/fcntl_h.m4 @@ -1,6 +1,6 @@ # serial 15 # Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fdopen.m4 b/gl/m4/fdopen.m4 index 8cae2fc273..9ca9d2aca6 100644 --- a/gl/m4/fdopen.m4 +++ b/gl/m4/fdopen.m4 @@ -1,5 +1,5 @@ # fdopen.m4 serial 2 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4 index 0420e06921..51c9c7b35c 100644 --- a/gl/m4/float_h.m4 +++ b/gl/m4/float_h.m4 @@ -1,5 +1,5 @@ # float_h.m4 serial 9 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fpieee.m4 b/gl/m4/fpieee.m4 index 78728762de..93b8d90473 100644 --- a/gl/m4/fpieee.m4 +++ b/gl/m4/fpieee.m4 @@ -1,5 +1,5 @@ # fpieee.m4 serial 1 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/frexp.m4 b/gl/m4/frexp.m4 index b0bdd106b0..4162195e53 100644 --- a/gl/m4/frexp.m4 +++ b/gl/m4/frexp.m4 @@ -1,5 +1,5 @@ # frexp.m4 serial 13 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/frexpl.m4 b/gl/m4/frexpl.m4 index 91f2a357b6..8e71420a30 100644 --- a/gl/m4/frexpl.m4 +++ b/gl/m4/frexpl.m4 @@ -1,5 +1,5 @@ # frexpl.m4 serial 18 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4 index 135a22bdc8..d9cd70a948 100644 --- a/gl/m4/fseek.m4 +++ b/gl/m4/fseek.m4 @@ -1,5 +1,5 @@ # fseek.m4 serial 4 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4 index 391948d4e3..be5bb35edd 100644 --- a/gl/m4/fseeko.m4 +++ b/gl/m4/fseeko.m4 @@ -1,5 +1,5 @@ # fseeko.m4 serial 15 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4 index 0daea88b86..e3f8f3e2ee 100644 --- a/gl/m4/fstat.m4 +++ b/gl/m4/fstat.m4 @@ -1,5 +1,5 @@ # fstat.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4 index c529c50302..ed8d014649 100644 --- a/gl/m4/ftell.m4 +++ b/gl/m4/ftell.m4 @@ -1,5 +1,5 @@ # ftell.m4 serial 3 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 index 10cf4291bf..42be83e5a9 100644 --- a/gl/m4/ftello.m4 +++ b/gl/m4/ftello.m4 @@ -1,5 +1,5 @@ # ftello.m4 serial 10 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ftruncate.m4 b/gl/m4/ftruncate.m4 index 4a47ba4297..1007f34120 100644 --- a/gl/m4/ftruncate.m4 +++ b/gl/m4/ftruncate.m4 @@ -2,7 +2,7 @@ # See if we need to emulate a missing ftruncate function using chsize. -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/func.m4 b/gl/m4/func.m4 index dcd2d4f0d1..13c204d41b 100644 --- a/gl/m4/func.m4 +++ b/gl/m4/func.m4 @@ -1,5 +1,5 @@ # func.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4 new file mode 100644 index 0000000000..9cd3e675ec --- /dev/null +++ b/gl/m4/getaddrinfo.m4 @@ -0,0 +1,210 @@ +# getaddrinfo.m4 serial 29 +dnl Copyright (C) 2004-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_GETADDRINFO], +[ + AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H + AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) + GETADDRINFO_LIB= + gai_saved_LIBS="$LIBS" + + dnl Where is getaddrinfo()? + dnl - On Solaris, it is in libsocket. + dnl - On Haiku, it is in libnetwork. + dnl - On BeOS, it is in libnet. + dnl - On native Windows, it is in ws2_32.dll. + dnl - Otherwise it is in libc. + AC_SEARCH_LIBS([getaddrinfo], [socket network net], + [if test "$ac_cv_search_getaddrinfo" != "none required"; then + GETADDRINFO_LIB="$ac_cv_search_getaddrinfo" + fi]) + LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" + + HAVE_GETADDRINFO=1 + AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#include <stddef.h> +]], [[getaddrinfo("", "", NULL, NULL);]])], + [gl_cv_func_getaddrinfo=yes], + [gl_cv_func_getaddrinfo=no])]) + if test $gl_cv_func_getaddrinfo = no; then + AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32], + gl_cv_w32_getaddrinfo, [ + gl_cv_w32_getaddrinfo=no + am_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +#include <stddef.h> +]], [[getaddrinfo(NULL, NULL, NULL, NULL);]])], [gl_cv_w32_getaddrinfo=yes]) + LIBS="$am_save_LIBS" + ]) + if test "$gl_cv_w32_getaddrinfo" = "yes"; then + GETADDRINFO_LIB="-lws2_32" + LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" + else + HAVE_GETADDRINFO=0 + fi + fi + + # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an + # inline function declared in ws2tcpip.h, so we need to get that + # header included somehow. + AC_CHECK_DECLS([gai_strerror], [], [], [[ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +#include <stddef.h> +]]) + if test $ac_cv_have_decl_gai_strerror = yes; then + AC_CHECK_DECLS([gai_strerrorA], [], [], [[ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +#include <stddef.h> +]]) + dnl check for correct signature + AC_CACHE_CHECK([for gai_strerror with POSIX signature], + [gl_cv_func_gai_strerror_posix_signature], [ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +#include <stddef.h> +extern +#ifdef __cplusplus +"C" +#endif +const char *gai_strerror(int);]])], + [gl_cv_func_gai_strerror_posix_signature=yes], + [gl_cv_func_gai_strerror_posix_signature=no])]) + if test $gl_cv_func_gai_strerror_posix_signature = no; then + REPLACE_GAI_STRERROR=1 + fi + fi + + LIBS="$gai_saved_LIBS" + + gl_PREREQ_GETADDRINFO + + AC_SUBST([GETADDRINFO_LIB]) +]) + +# Prerequisites of lib/netdb.in.h and lib/getaddrinfo.c. +AC_DEFUN([gl_PREREQ_GETADDRINFO], [ + AC_REQUIRE([gl_NETDB_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB + AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB + AC_REQUIRE([gl_FUNC_INET_NTOP]) dnl for INET_NTOP_LIB + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_SOCKET_FAMILIES]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl Including sys/socket.h is wrong for Windows, but Windows does not + dnl have sa_len so the result is correct anyway. + AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [ +#include <sys/types.h> +#include <sys/socket.h> +]) + + AC_CHECK_HEADERS_ONCE([netinet/in.h]) + + AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, getnameinfo],,,[[ + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +]]) + if test $ac_cv_have_decl_getaddrinfo = no; then + HAVE_DECL_GETADDRINFO=0 + fi + if test $ac_cv_have_decl_freeaddrinfo = no; then + HAVE_DECL_FREEADDRINFO=0 + fi + if test $ac_cv_have_decl_gai_strerror = no; then + HAVE_DECL_GAI_STRERROR=0 + fi + if test $ac_cv_have_decl_getnameinfo = no; then + HAVE_DECL_GETNAMEINFO=0 + fi + + AC_CHECK_TYPES([struct addrinfo],,,[ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +]) + if test $ac_cv_type_struct_addrinfo = no; then + HAVE_STRUCT_ADDRINFO=0 + fi + + dnl Append $HOSTENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates. + case " $GETADDRINFO_LIB " in + *" $HOSTENT_LIB "*) ;; + *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;; + esac + + dnl Append $SERVENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates. + case " $GETADDRINFO_LIB " in + *" $SERVENT_LIB "*) ;; + *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;; + esac + + dnl Append $INET_NTOP_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates. + case " $GETADDRINFO_LIB " in + *" $INET_NTOP_LIB "*) ;; + *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;; + esac +]) diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4 index f828cf340b..ccb1f47bd3 100644 --- a/gl/m4/getcwd.m4 +++ b/gl/m4/getcwd.m4 @@ -1,12 +1,12 @@ # getcwd.m4 - check for working getcwd that is compatible with glibc -# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. -# serial 9 +# serial 11 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ @@ -108,20 +108,43 @@ AC_DEFUN([gl_FUNC_GETCWD], AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles gl_abort_bug=no - case $gl_cv_func_getcwd_null,$host_os in - *,mingw*) - gl_cv_func_getcwd_path_max=yes;; - yes,*) - gl_FUNC_GETCWD_PATH_MAX - gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);; + case "$host_os" in + mingw*) + gl_cv_func_getcwd_path_max=yes + ;; + *) + gl_FUNC_GETCWD_PATH_MAX + case "$gl_cv_func_getcwd_null" in + *yes) + gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]) + ;; + esac + ;; esac - - case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature$gl_cv_func_getcwd_path_max,$gl_abort_bug in - *yes,yes,yes,no) ;; - *) - dnl Full replacement lib/getcwd.c, overrides LGPL replacement. - REPLACE_GETCWD=1;; + dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD + dnl if appropriate. + case "$gl_cv_func_getcwd_path_max" in + "no, it has the AIX bug") ;; + *) + AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1], + [Define to 1 if getcwd minimally works, that is, its result can be + trusted when it succeeds.]) + ;; + esac + case "$gl_cv_func_getcwd_path_max" in + "no, but it is partly working") + AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1], + [Define to 1 if getcwd works, except it sometimes fails when it + shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]) + ;; esac + + if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ + || test $gl_cv_func_getcwd_posix_signature != yes \ + || test "$gl_cv_func_getcwd_path_max" != yes \ + || test $gl_abort_bug = yes; then + REPLACE_GETCWD=1 + fi ]) # Prerequisites of lib/getcwd.c, when full replacement is in effect. diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4 index 6a0f632c78..8bd3d3f862 100644 --- a/gl/m4/getdelim.m4 +++ b/gl/m4/getdelim.m4 @@ -1,6 +1,6 @@ # getdelim.m4 serial 9 -dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4 index 4c57797259..01f38cfb9c 100644 --- a/gl/m4/getline.m4 +++ b/gl/m4/getline.m4 @@ -1,6 +1,6 @@ # getline.m4 serial 25 -dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl dnl This file is free software; the Free Software Foundation diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4 index 047a3db022..2aea89595e 100644 --- a/gl/m4/getopt.m4 +++ b/gl/m4/getopt.m4 @@ -1,5 +1,5 @@ -# getopt.m4 serial 38 -dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. +# getopt.m4 serial 39 +dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -25,8 +25,6 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], if test $REPLACE_GETOPT = 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER - dnl Arrange for unistd.h to include getopt.h. - GNULIB_UNISTD_H_GETOPT=1 fi ]) diff --git a/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4 index f7ac1ef69d..156133aed6 100644 --- a/gl/m4/getpagesize.m4 +++ b/gl/m4/getpagesize.m4 @@ -1,5 +1,5 @@ # getpagesize.m4 serial 9 -dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4 index 13e55f6832..2a7e1600ef 100644 --- a/gl/m4/getpass.m4 +++ b/gl/m4/getpass.m4 @@ -1,5 +1,5 @@ # getpass.m4 serial 14 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/getsubopt.m4 b/gl/m4/getsubopt.m4 index 827d8c5626..55389414d1 100644 --- a/gl/m4/getsubopt.m4 +++ b/gl/m4/getsubopt.m4 @@ -1,5 +1,5 @@ # getsubopt.m4 serial 5 -dnl Copyright (C) 2004, 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4 index cab4dfc81a..5415f88ef0 100644 --- a/gl/m4/gettext.m4 +++ b/gl/m4/gettext.m4 @@ -1,5 +1,5 @@ # gettext.m4 serial 64 (gettext-0.18.2) -dnl Copyright (C) 1995-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -35,7 +35,7 @@ dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. +dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4 index f2122dccd9..7d03d1253b 100644 --- a/gl/m4/gettime.m4 +++ b/gl/m4/gettime.m4 @@ -1,5 +1,5 @@ # gettime.m4 serial 8 -dnl Copyright (C) 2002, 2004-2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4 index 47c1e1d316..2385e39579 100644 --- a/gl/m4/gettimeofday.m4 +++ b/gl/m4/gettimeofday.m4 @@ -1,6 +1,6 @@ # serial 17 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/glibc2.m4 b/gl/m4/glibc2.m4 index a5fe3cfc07..f4c4ad16ae 100644 --- a/gl/m4/glibc2.m4 +++ b/gl/m4/glibc2.m4 @@ -1,5 +1,5 @@ # glibc2.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/glibc21.m4 b/gl/m4/glibc21.m4 index bc81c110b8..c938fb1a0c 100644 --- a/gl/m4/glibc21.m4 +++ b/gl/m4/glibc21.m4 @@ -1,5 +1,5 @@ # glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 409b70b75d..74c1b399c2 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp bind byteswap c-ctype close connect error extensions func getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto setsockopt shutdown snprintf socket sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r timespec u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings +# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp bind byteswap c-ctype close connect error extensions freeaddrinfo func getaddrinfo getnameinfo getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto setsockopt shutdown snprintf socket sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r timespec u64 unistd usleep valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) @@ -43,7 +43,10 @@ gl_MODULES([ connect error extensions + freeaddrinfo func + getaddrinfo + getnameinfo getpass getsubopt gettext @@ -84,6 +87,7 @@ gl_MODULES([ timespec u64 unistd + usleep valgrind-tests vasprintf version-etc diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 7d83299959..ae4d25483c 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 31 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# gnulib-common.m4 serial 32 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,12 +13,12 @@ AC_DEFUN([gl_COMMON], [ ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], -[/* The _Noreturn keyword of draft C1X. */ +[/* The _Noreturn keyword of C11. */ #ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= _MSC_VER +# elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn @@ -224,7 +224,7 @@ m4_ifndef([AS_VAR_IF], # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>. -# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard. +# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ dnl Change that version number to the minimum Autoconf version that supports diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index fe23cdf615..fcf7b8da5b 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -113,6 +113,8 @@ AC_DEFUN([gl_EARLY], # Code from module func: # Code from module func-tests: # Code from module fwrite-tests: + # Code from module getaddrinfo: + # Code from module getaddrinfo-tests: # Code from module getcwd-lgpl: # Code from module getcwd-lgpl-tests: # Code from module getdelim: @@ -134,6 +136,7 @@ AC_DEFUN([gl_EARLY], # Code from module gettimeofday-tests: # Code from module gnumakefile: # Code from module havelib: + # Code from module hostent: # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: @@ -222,6 +225,7 @@ AC_DEFUN([gl_EARLY], # Code from module send-tests: # Code from module sendto: # Code from module sendto-tests: + # Code from module servent: # Code from module setenv: # Code from module setenv-tests: # Code from module setsockopt: @@ -303,6 +307,8 @@ AC_DEFUN([gl_EARLY], # Code from module sys_uio-tests: # Code from module sysexits: # Code from module sysexits-tests: + # Code from module test-framework-sh: + # Code from module test-framework-sh-tests: # Code from module thread: # Code from module thread-tests: # Code from module threadlib: @@ -318,6 +324,8 @@ AC_DEFUN([gl_EARLY], # Code from module unsetenv: # Code from module unsetenv-tests: # Code from module useless-if-before-free: + # Code from module usleep: + # Code from module usleep-tests: # Code from module valgrind-tests: # Code from module vasnprintf: # Code from module vasnprintf-tests: @@ -457,6 +465,14 @@ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then fi gl_STDIO_MODULE_INDICATOR([ftello]) gl_FUNC +gl_GETADDRINFO +if test $HAVE_GETADDRINFO = 0; then + AC_LIBOBJ([getaddrinfo]) +fi +if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then + AC_LIBOBJ([gai_strerror]) +fi +gl_NETDB_MODULE_INDICATOR([getaddrinfo]) gl_FUNC_GETDELIM if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then AC_LIBOBJ([getdelim]) @@ -474,14 +490,20 @@ if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=1 fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=1 fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_FUNC_GETPASS if test $HAVE_GETPASS = 0; then AC_LIBOBJ([getpass]) @@ -519,6 +541,7 @@ m4_if(m4_version_compare([2.61a.100], m4_defn([m4_PACKAGE_VERSION])), [1], [], [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], [GNUmakefile=$GNUmakefile])]) +gl_HOSTENT gl_FUNC_INET_NTOP if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then AC_LIBOBJ([inet_ntop]) @@ -660,6 +683,7 @@ if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([sendto]) fi gl_SYS_SOCKET_MODULE_INDICATOR([sendto]) +gl_SERVENT AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([setsockopt]) @@ -787,6 +811,11 @@ gl_TIME_MODULE_INDICATOR([time_r]) gl_TIMESPEC AC_REQUIRE([AC_C_INLINE]) gl_UNISTD_H +gl_FUNC_USLEEP +if test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1; then + AC_LIBOBJ([usleep]) +fi +gl_UNISTD_MODULE_INDICATOR([usleep]) gl_VALGRIND_TESTS gl_FUNC_VASNPRINTF gl_FUNC_VASPRINTF @@ -1138,6 +1167,8 @@ AC_DEFUN([gl_FILE_LIST], [ lib/fstat.c lib/ftell.c lib/ftello.c + lib/gai_strerror.c + lib/getaddrinfo.c lib/getdelim.c lib/getline.c lib/getopt.c @@ -1247,6 +1278,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/timespec.h lib/u64.h lib/unistd.in.h + lib/usleep.c lib/vasnprintf.c lib/vasnprintf.h lib/vasprintf.c @@ -1296,6 +1328,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/ftello.m4 m4/ftruncate.m4 m4/func.m4 + m4/getaddrinfo.m4 m4/getcwd.m4 m4/getdelim.m4 m4/getline.m4 @@ -1309,6 +1342,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/glibc2.m4 m4/glibc21.m4 m4/gnulib-common.m4 + m4/hostent.m4 m4/iconv.m4 m4/include_next.m4 m4/inet_ntop.m4 @@ -1373,6 +1407,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/realloc.m4 m4/scandir.m4 m4/select.m4 + m4/servent.m4 m4/setenv.m4 m4/signal_h.m4 m4/signbit.m4 @@ -1420,6 +1455,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/uintmax_t.m4 m4/ungetc.m4 m4/unistd_h.m4 + m4/usleep.m4 m4/valgrind-tests.m4 m4/vasnprintf.m4 m4/vasprintf.m4 @@ -1492,6 +1528,7 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-ftruncate.sh tests/test-func.c tests/test-fwrite.c + tests/test-getaddrinfo.c tests/test-getcwd-lgpl.c tests/test-getdelim.c tests/test-getline.c @@ -1503,6 +1540,7 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-ignore-value.c tests/test-inet_ntop.c tests/test-inet_pton.c + tests/test-init.sh tests/test-intprops.c tests/test-inttypes.c tests/test-ioctl.c @@ -1585,6 +1623,7 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-u64.c tests/test-unistd.c tests/test-unsetenv.c + tests/test-usleep.c tests/test-vasnprintf.c tests/test-vasprintf.c tests/test-vc-list-files-cvs.sh diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4 index ed41e9d415..a09ffc1d1a 100644 --- a/gl/m4/gnulib-tool.m4 +++ b/gl/m4/gnulib-tool.m4 @@ -1,5 +1,5 @@ # gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4 new file mode 100644 index 0000000000..51347755c6 --- /dev/null +++ b/gl/m4/hostent.m4 @@ -0,0 +1,49 @@ +# hostent.m4 serial 2 +dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_HOSTENT], +[ + dnl Where are gethostent(), sethostent(), endhostent(), gethostbyname(), + dnl gethostbyaddr() defined? + dnl - On Solaris, they are in libnsl. Ignore libxnet. + dnl - On Haiku, they are in libnetwork. + dnl - On BeOS, they are in libnet. + dnl - On native Windows, they are in ws2_32.dll. + dnl - Otherwise they are in libc. + AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + HOSTENT_LIB= + gl_saved_libs="$LIBS" + AC_SEARCH_LIBS([gethostbyname], [nsl network net], + [if test "$ac_cv_search_gethostbyname" != "none required"; then + HOSTENT_LIB="$ac_cv_search_gethostbyname" + fi]) + LIBS="$gl_saved_libs" + if test -z "$HOSTENT_LIB"; then + AC_CHECK_FUNCS([gethostbyname], , [ + AC_CACHE_CHECK([for gethostbyname in winsock2.h and -lws2_32], + [gl_cv_w32_gethostbyname], + [gl_cv_w32_gethostbyname=no + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#endif +#include <stddef.h> + ]], + [[gethostbyname(NULL);]])], + [gl_cv_w32_gethostbyname=yes]) + LIBS="$gl_save_LIBS" + ]) + if test "$gl_cv_w32_gethostbyname" = "yes"; then + HOSTENT_LIB="-lws2_32" + fi + ]) + fi + AC_SUBST([HOSTENT_LIB]) +]) diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4 index 98fcd64d31..6a47236c40 100644 --- a/gl/m4/iconv.m4 +++ b/gl/m4/iconv.m4 @@ -1,5 +1,5 @@ # iconv.m4 serial 18 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index 8a1fab66d1..a60a2614dc 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 23 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -143,7 +143,7 @@ choke me # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". -# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. +# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4 index 4936fa382f..1ebd960317 100644 --- a/gl/m4/inet_ntop.m4 +++ b/gl/m4/inet_ntop.m4 @@ -1,5 +1,5 @@ # inet_ntop.m4 serial 19 -dnl Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4 index e64da7b01e..e7b44e2829 100644 --- a/gl/m4/inet_pton.m4 +++ b/gl/m4/inet_pton.m4 @@ -1,5 +1,5 @@ # inet_pton.m4 serial 17 -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intdiv0.m4 b/gl/m4/intdiv0.m4 index 58e8a732bb..6d89aebed4 100644 --- a/gl/m4/intdiv0.m4 +++ b/gl/m4/intdiv0.m4 @@ -1,5 +1,5 @@ # intdiv0.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2002, 2007-2008, 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2007-2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intl.m4 b/gl/m4/intl.m4 index 96031eb952..d67e29c5de 100644 --- a/gl/m4/intl.m4 +++ b/gl/m4/intl.m4 @@ -1,5 +1,5 @@ -# intl.m4 serial 17b -dnl Copyright (C) 1995-2011 Free Software Foundation, Inc. +# intl.m4 serial 17c +dnl Copyright (C) 1995-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -296,5 +296,5 @@ AC_DEFUN([gt_CHECK_DECL], gt_value=0 fi AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) + [Define to 1 if you have the declaration of '$1', and to 0 if you don't.]) ]) diff --git a/gl/m4/intldir.m4 b/gl/m4/intldir.m4 index 31507d1520..b81de616ba 100644 --- a/gl/m4/intldir.m4 +++ b/gl/m4/intldir.m4 @@ -1,5 +1,5 @@ # intldir.m4 serial 2 (gettext-0.18) -dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intlmacosx.m4 b/gl/m4/intlmacosx.m4 index 51f8547771..dc2ddfedfc 100644 --- a/gl/m4/intlmacosx.m4 +++ b/gl/m4/intlmacosx.m4 @@ -1,5 +1,5 @@ # intlmacosx.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2004-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intmax.m4 b/gl/m4/intmax.m4 index 9d28921d66..e3b251fd76 100644 --- a/gl/m4/intmax.m4 +++ b/gl/m4/intmax.m4 @@ -1,5 +1,5 @@ # intmax.m4 serial 6 (gettext-0.18.2) -dnl Copyright (C) 2002-2005, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4 index 7341054b6f..c1a4a75d83 100644 --- a/gl/m4/intmax_t.m4 +++ b/gl/m4/intmax_t.m4 @@ -1,5 +1,5 @@ # intmax_t.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 1997-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/inttypes-pri.m4 b/gl/m4/inttypes-pri.m4 index e252b27e8c..977206fae8 100644 --- a/gl/m4/inttypes-pri.m4 +++ b/gl/m4/inttypes-pri.m4 @@ -1,5 +1,5 @@ # inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2002, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4 index cc027a417f..eec4f41d03 100644 --- a/gl/m4/inttypes.m4 +++ b/gl/m4/inttypes.m4 @@ -1,5 +1,5 @@ -# inttypes.m4 serial 24 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +# inttypes.m4 serial 26 +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -24,22 +24,6 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], AC_REQUIRE([gl_MULTIARCH]) - dnl Ensure that <stdint.h> defines the limit macros, since gnulib's - dnl <inttypes.h> relies on them. This macro is only needed when a - dnl C++ compiler is in use; it has no effect for a C compiler. - dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's - dnl <inttypes.h> is going to be created, and to avoid redefinition warnings - dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS. - AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1], - [Define to make the limit macros in <stdint.h> visible.]) - AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ], -[/* Ensure that <stdint.h> defines the limit macros, since gnulib's - <inttypes.h> relies on them. */ -#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -#endif -]) - dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include <inttypes.h> @@ -163,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS], HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) + REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4 index f10fd54f63..91c7bca62d 100644 --- a/gl/m4/inttypes_h.m4 +++ b/gl/m4/inttypes_h.m4 @@ -1,5 +1,5 @@ # inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4 index a1db8fc096..ec0b7289b3 100644 --- a/gl/m4/ioctl.m4 +++ b/gl/m4/ioctl.m4 @@ -1,5 +1,5 @@ # ioctl.m4 serial 4 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/isnand.m4 b/gl/m4/isnand.m4 index 48f1a48078..54b64a452d 100644 --- a/gl/m4/isnand.m4 +++ b/gl/m4/isnand.m4 @@ -1,5 +1,5 @@ # isnand.m4 serial 11 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/isnanf.m4 b/gl/m4/isnanf.m4 index 66ed954bed..97f638a934 100644 --- a/gl/m4/isnanf.m4 +++ b/gl/m4/isnanf.m4 @@ -1,5 +1,5 @@ # isnanf.m4 serial 14 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/isnanl.m4 b/gl/m4/isnanl.m4 index daabe2a4b0..81469ab8c8 100644 --- a/gl/m4/isnanl.m4 +++ b/gl/m4/isnanl.m4 @@ -1,5 +1,5 @@ # isnanl.m4 serial 17 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4 index d83fea1233..1369bbe525 100644 --- a/gl/m4/largefile.m4 +++ b/gl/m4/largefile.m4 @@ -1,6 +1,6 @@ # Enable large files on systems where this is not the default. -# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lcmessage.m4 b/gl/m4/lcmessage.m4 index baf41c5fda..4ed0eb6e4c 100644 --- a/gl/m4/lcmessage.m4 +++ b/gl/m4/lcmessage.m4 @@ -1,5 +1,5 @@ # lcmessage.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1995-2002, 2004-2005, 2008-2011 Free Software Foundation, +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/ld-output-def.m4 b/gl/m4/ld-output-def.m4 index 2169f51510..35116843b0 100644 --- a/gl/m4/ld-output-def.m4 +++ b/gl/m4/ld-output-def.m4 @@ -1,5 +1,5 @@ # ld-output-def.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ld-version-script.m4 b/gl/m4/ld-version-script.m4 index aec2f41c1e..fd8c043eac 100644 --- a/gl/m4/ld-version-script.m4 +++ b/gl/m4/ld-version-script.m4 @@ -1,5 +1,5 @@ # ld-version-script.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ldexpl.m4 b/gl/m4/ldexpl.m4 index f5d15fd672..9c9ec6705e 100644 --- a/gl/m4/ldexpl.m4 +++ b/gl/m4/ldexpl.m4 @@ -1,5 +1,5 @@ # ldexpl.m4 serial 14 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4 index ae003f7c59..4e1374d9bc 100644 --- a/gl/m4/lib-ld.m4 +++ b/gl/m4/lib-ld.m4 @@ -1,5 +1,5 @@ # lib-ld.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4 index e7c9ba9d3d..d11b4b4350 100644 --- a/gl/m4/lib-link.m4 +++ b/gl/m4/lib-link.m4 @@ -1,5 +1,5 @@ # lib-link.m4 serial 26 (gettext-0.18.2) -dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4 index 7e5f0bde03..007aa0532e 100644 --- a/gl/m4/lib-prefix.m4 +++ b/gl/m4/lib-prefix.m4 @@ -1,5 +1,5 @@ # lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4 index 96869454ca..c0a620600a 100644 --- a/gl/m4/lock.m4 +++ b/gl/m4/lock.m4 @@ -1,5 +1,5 @@ # lock.m4 serial 11 (gettext-0.18.2) -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4 index aed816cfa5..b9c65c756e 100644 --- a/gl/m4/longlong.m4 +++ b/gl/m4/longlong.m4 @@ -1,5 +1,5 @@ -# longlong.m4 serial 16 -dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc. +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT], fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `long long int'.]) + [Define to 1 if the system has the type 'long long int'.]) fi ]) @@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `unsigned long long int'.]) + [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4 index 73c40698c2..86db59ecdc 100644 --- a/gl/m4/lseek.m4 +++ b/gl/m4/lseek.m4 @@ -1,5 +1,5 @@ # lseek.m4 serial 8 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4 index fe161d4010..b83858bdb6 100644 --- a/gl/m4/lstat.m4 +++ b/gl/m4/lstat.m4 @@ -1,6 +1,6 @@ -# serial 23 +# serial 24 -# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -65,6 +65,6 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], ]) test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], - [Define to 1 if `lstat' dereferences a symlink specified + [Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash.]) ]) diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 index 87018ec87e..d3c39f5d96 100644 --- a/gl/m4/malloc.m4 +++ b/gl/m4/malloc.m4 @@ -1,5 +1,5 @@ # malloc.m4 serial 13 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4 index aec43f5877..7841979f3c 100644 --- a/gl/m4/malloca.m4 +++ b/gl/m4/malloca.m4 @@ -1,5 +1,5 @@ # malloca.m4 serial 1 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4 index 67db064a9f..fd0e3722d3 100644 --- a/gl/m4/manywarnings.m4 +++ b/gl/m4/manywarnings.m4 @@ -1,5 +1,5 @@ -# manywarnings.m4 serial 1 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# manywarnings.m4 serial 3 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -30,9 +30,9 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT], # gl_MANYWARN_ALL_GCC(VARIABLE) # ----------------------------- -# Add all documented GCC (currently as per version 4.4) warning -# parameters to variable VARIABLE. Note that you need to test them -# using gl_WARN_ADD if you want to make sure your gcc understands it. +# Add all documented GCC warning parameters to variable VARIABLE. +# Note that you need to test them using gl_WARN_ADD if you want to +# make sure your gcc understands it. AC_DEFUN([gl_MANYWARN_ALL_GCC], [ dnl First, check if -Wno-missing-field-initializers is needed. @@ -148,6 +148,32 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done + # More warnings from gcc 4.6.2 --help=warnings. + for gl_manywarn_item in \ + -Wabi \ + -Wcpp \ + -Wdeprecated \ + -Wdeprecated-declarations \ + -Wdiv-by-zero \ + -Wdouble-promotion \ + -Wendif-labels \ + -Wextra \ + -Wformat-contains-nul \ + -Wformat-extra-args \ + -Wformat-zero-length \ + -Wformat=2 \ + -Wmultichar \ + -Wnormalized=nfc \ + -Woverflow \ + -Wpointer-to-int-cast \ + -Wpragmas \ + -Wsuggest-attribute=const \ + -Wsuggest-attribute=noreturn \ + -Wsuggest-attribute=pure \ + -Wtrampolines \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done # Disable the missing-field-initializers warning if needed if test "$gl_cv_cc_nomfi_needed" = yes; then diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4 index e58a9e908c..5d7d52bbab 100644 --- a/gl/m4/math_h.m4 +++ b/gl/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 serial 56 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4 index f6dc3e712b..004029450f 100644 --- a/gl/m4/memchr.m4 +++ b/gl/m4/memchr.m4 @@ -1,5 +1,5 @@ # memchr.m4 serial 12 -dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/memmem.m4 b/gl/m4/memmem.m4 index e912205cd0..eebe94c24e 100644 --- a/gl/m4/memmem.m4 +++ b/gl/m4/memmem.m4 @@ -1,5 +1,5 @@ # memmem.m4 serial 23 -dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4 index 7214a4b39a..c926941db4 100644 --- a/gl/m4/mempcpy.m4 +++ b/gl/m4/mempcpy.m4 @@ -1,5 +1,5 @@ # mempcpy.m4 serial 11 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4 index beb9cb1782..45c6230def 100644 --- a/gl/m4/minmax.m4 +++ b/gl/m4/minmax.m4 @@ -1,5 +1,5 @@ # minmax.m4 serial 4 -dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4 index 952536feb3..4613cbe5ba 100644 --- a/gl/m4/mmap-anon.m4 +++ b/gl/m4/mmap-anon.m4 @@ -1,5 +1,5 @@ # mmap-anon.m4 serial 9 -dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4 index f9cf704723..40f612a612 100644 --- a/gl/m4/mode_t.m4 +++ b/gl/m4/mode_t.m4 @@ -1,5 +1,5 @@ # mode_t.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4 index fb797f0556..8db4617599 100644 --- a/gl/m4/msvc-inval.m4 +++ b/gl/m4/msvc-inval.m4 @@ -1,5 +1,5 @@ # msvc-inval.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4 index b2f6bb49ab..012505070e 100644 --- a/gl/m4/msvc-nothrow.m4 +++ b/gl/m4/msvc-nothrow.m4 @@ -1,5 +1,5 @@ # msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 index 691d89270b..b424dce652 100644 --- a/gl/m4/multiarch.m4 +++ b/gl/m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 6 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4 index a54d6701b7..e0f3ee8654 100644 --- a/gl/m4/netdb_h.m4 +++ b/gl/m4/netdb_h.m4 @@ -1,5 +1,5 @@ # netdb_h.m4 serial 11 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4 index 87235b73bc..e1813886a5 100644 --- a/gl/m4/netinet_in_h.m4 +++ b/gl/m4/netinet_in_h.m4 @@ -1,5 +1,5 @@ # netinet_in_h.m4 serial 5 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/nls.m4 b/gl/m4/nls.m4 index 6a21216d22..0866677c0f 100644 --- a/gl/m4/nls.m4 +++ b/gl/m4/nls.m4 @@ -1,5 +1,5 @@ # nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2011 Free Software Foundation, +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4 index 60aad95295..08ef825499 100644 --- a/gl/m4/nocrash.m4 +++ b/gl/m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 3 -dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/open.m4 b/gl/m4/open.m4 index d8191842fc..c85971dc1a 100644 --- a/gl/m4/open.m4 +++ b/gl/m4/open.m4 @@ -1,5 +1,5 @@ # open.m4 serial 13 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/opendir.m4 b/gl/m4/opendir.m4 index fa315b9837..08da440b38 100644 --- a/gl/m4/opendir.m4 +++ b/gl/m4/opendir.m4 @@ -1,5 +1,5 @@ -# opendir.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +# opendir.m4 serial 2 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,7 +17,9 @@ AC_DEFUN([gl_FUNC_OPENDIR], m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then - REPLACE_OPENDIR=1 + if test $HAVE_OPENDIR = 1; then + REPLACE_OPENDIR=1 + fi fi ]) ]) diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4 index 4913fa06cb..011786129e 100644 --- a/gl/m4/pathmax.m4 +++ b/gl/m4/pathmax.m4 @@ -1,5 +1,5 @@ # pathmax.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/perror.m4 b/gl/m4/perror.m4 index cb17ba38be..369a824e73 100644 --- a/gl/m4/perror.m4 +++ b/gl/m4/perror.m4 @@ -1,5 +1,5 @@ # perror.m4 serial 6 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/pipe.m4 b/gl/m4/pipe.m4 index 901317470f..37aef116a8 100644 --- a/gl/m4/pipe.m4 +++ b/gl/m4/pipe.m4 @@ -1,5 +1,5 @@ # pipe.m4 serial 2 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/po.m4 b/gl/m4/po.m4 index 9a0cca8897..6bf122a245 100644 --- a/gl/m4/po.m4 +++ b/gl/m4/po.m4 @@ -1,5 +1,5 @@ # po.m4 serial 17a -dnl Copyright (C) 1995-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/printf-frexp.m4 b/gl/m4/printf-frexp.m4 index 83ff9ce715..de5d641fe2 100644 --- a/gl/m4/printf-frexp.m4 +++ b/gl/m4/printf-frexp.m4 @@ -1,5 +1,5 @@ # printf-frexp.m4 serial 5 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/printf-frexpl.m4 b/gl/m4/printf-frexpl.m4 index e15628aa8d..55dd6bc18e 100644 --- a/gl/m4/printf-frexpl.m4 +++ b/gl/m4/printf-frexpl.m4 @@ -1,5 +1,5 @@ # printf-frexpl.m4 serial 9 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/printf-posix.m4 b/gl/m4/printf-posix.m4 index a9b91f7005..0b9da4206c 100644 --- a/gl/m4/printf-posix.m4 +++ b/gl/m4/printf-posix.m4 @@ -1,5 +1,5 @@ # printf-posix.m4 serial 6 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4 index 0814c91fec..6d1fa5497a 100644 --- a/gl/m4/printf.m4 +++ b/gl/m4/printf.m4 @@ -1,5 +1,5 @@ -# printf.m4 serial 46 -dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. +# printf.m4 serial 47 +dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -952,7 +952,7 @@ int main () [ changequote(,)dnl case "$host_os" in - # Guess no only on Solaris, native Win32, and BeOS systems. + # Guess no only on Solaris, native Windows, and BeOS systems. solaris*) gl_cv_func_printf_precision="guessing no" ;; mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; diff --git a/gl/m4/progtest.m4 b/gl/m4/progtest.m4 index 5130d56a7b..ce3abbc718 100644 --- a/gl/m4/progtest.m4 +++ b/gl/m4/progtest.m4 @@ -1,5 +1,5 @@ # progtest.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2005, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4 index 1497b4a797..1cb23a594f 100644 --- a/gl/m4/putenv.m4 +++ b/gl/m4/putenv.m4 @@ -1,5 +1,5 @@ # putenv.m4 serial 18 -dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/rawmemchr.m4 b/gl/m4/rawmemchr.m4 index 3f136a67db..19301644a9 100644 --- a/gl/m4/rawmemchr.m4 +++ b/gl/m4/rawmemchr.m4 @@ -1,5 +1,5 @@ # rawmemchr.m4 serial 2 -dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4 index 93e0ac3546..3665247294 100644 --- a/gl/m4/read-file.m4 +++ b/gl/m4/read-file.m4 @@ -1,5 +1,5 @@ # read-file.m4 serial 3 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/readdir.m4 b/gl/m4/readdir.m4 index cfeed08907..437ec08c0a 100644 --- a/gl/m4/readdir.m4 +++ b/gl/m4/readdir.m4 @@ -1,5 +1,5 @@ # readdir.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4 index 5cc1340d13..039ed192a6 100644 --- a/gl/m4/realloc.m4 +++ b/gl/m4/realloc.m4 @@ -1,5 +1,5 @@ # realloc.m4 serial 12 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/scandir.m4 b/gl/m4/scandir.m4 index 25ebe0683d..24a3af410b 100644 --- a/gl/m4/scandir.m4 +++ b/gl/m4/scandir.m4 @@ -1,5 +1,5 @@ # scandir.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/select.m4 b/gl/m4/select.m4 index a58f0ac3a1..037b3d3cfc 100644 --- a/gl/m4/select.m4 +++ b/gl/m4/select.m4 @@ -1,5 +1,5 @@ # select.m4 serial 6 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4 new file mode 100644 index 0000000000..21da957f32 --- /dev/null +++ b/gl/m4/servent.m4 @@ -0,0 +1,51 @@ +# servent.m4 serial 2 +dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_SERVENT], +[ + dnl Where are getservent(), setservent(), endservent(), getservbyname(), + dnl getservbyport() defined? + dnl Where are getprotoent(), setprotoent(), endprotoent(), getprotobyname(), + dnl getprotobynumber() defined? + dnl - On Solaris, they are in libsocket. Ignore libxnet. + dnl - On Haiku, they are in libnetwork. + dnl - On BeOS, they are in libnet. + dnl - On native Windows, they are in ws2_32.dll. + dnl - Otherwise they are in libc. + AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + SERVENT_LIB= + gl_saved_libs="$LIBS" + AC_SEARCH_LIBS([getservbyname], [socket network net], + [if test "$ac_cv_search_getservbyname" != "none required"; then + SERVENT_LIB="$ac_cv_search_getservbyname" + fi]) + LIBS="$gl_saved_libs" + if test -z "$SERVENT_LIB"; then + AC_CHECK_FUNCS([getservbyname], , [ + AC_CACHE_CHECK([for getservbyname in winsock2.h and -lws2_32], + [gl_cv_w32_getservbyname], + [gl_cv_w32_getservbyname=no + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#endif +#include <stddef.h> + ]], + [[getservbyname(NULL,NULL);]])], + [gl_cv_w32_getservbyname=yes]) + LIBS="$gl_save_LIBS" + ]) + if test "$gl_cv_w32_getservbyname" = "yes"; then + SERVENT_LIB="-lws2_32" + fi + ]) + fi + AC_SUBST([SERVENT_LIB]) +]) diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4 index bc215a6d4d..a1f30bc47b 100644 --- a/gl/m4/setenv.m4 +++ b/gl/m4/setenv.m4 @@ -1,5 +1,5 @@ # setenv.m4 serial 25 -dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/signal_h.m4 b/gl/m4/signal_h.m4 index 5cf54a062f..ed4d7306ee 100644 --- a/gl/m4/signal_h.m4 +++ b/gl/m4/signal_h.m4 @@ -1,5 +1,5 @@ # signal_h.m4 serial 18 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/signbit.m4 b/gl/m4/signbit.m4 index bbeb1f48c0..8955326051 100644 --- a/gl/m4/signbit.m4 +++ b/gl/m4/signbit.m4 @@ -1,5 +1,5 @@ # signbit.m4 serial 11 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 index e8070981a8..5a8162bc1e 100644 --- a/gl/m4/size_max.m4 +++ b/gl/m4/size_max.m4 @@ -1,5 +1,5 @@ # size_max.m4 serial 10 -dnl Copyright (C) 2003, 2005-2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sleep.m4 b/gl/m4/sleep.m4 index 74362e49b5..7e736d454f 100644 --- a/gl/m4/sleep.m4 +++ b/gl/m4/sleep.m4 @@ -1,5 +1,5 @@ # sleep.m4 serial 6 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4 index 6f716239cb..de94eddfd1 100644 --- a/gl/m4/snprintf.m4 +++ b/gl/m4/snprintf.m4 @@ -1,5 +1,5 @@ # snprintf.m4 serial 6 -dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4 index 2aa972dd88..92a1af2246 100644 --- a/gl/m4/socketlib.m4 +++ b/gl/m4/socketlib.m4 @@ -1,5 +1,5 @@ # socketlib.m4 serial 1 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4 index cbe754f8d5..e3738d906f 100644 --- a/gl/m4/sockets.m4 +++ b/gl/m4/sockets.m4 @@ -1,5 +1,5 @@ # sockets.m4 serial 7 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4 index 4475154448..a4ab43b333 100644 --- a/gl/m4/socklen.m4 +++ b/gl/m4/socklen.m4 @@ -1,5 +1,5 @@ # socklen.m4 serial 10 -dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 index c38daea5b7..5f97c3e3d8 100644 --- a/gl/m4/sockpfaf.m4 +++ b/gl/m4/sockpfaf.m4 @@ -1,5 +1,5 @@ # sockpfaf.m4 serial 8 -dnl Copyright (C) 2004, 2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 index d7127521eb..209d64c823 100644 --- a/gl/m4/ssize_t.m4 +++ b/gl/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4 index c63f59fd53..d67dbcdecd 100644 --- a/gl/m4/stat.m4 +++ b/gl/m4/stat.m4 @@ -1,6 +1,6 @@ # serial 8 -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4 index da64dc6332..9752ba568b 100644 --- a/gl/m4/stdalign.m4 +++ b/gl/m4/stdalign.m4 @@ -1,6 +1,6 @@ -# Check for stdalign.h that conforms to C1x. +# Check for stdalign.h that conforms to C11. -dnl Copyright 2011 Free Software Foundation, Inc. +dnl Copyright 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,9 +9,24 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDALIGN_H], [ - AC_CHECK_HEADERS_ONCE([stdalign.h]) + AC_CACHE_CHECK([for working stdalign.h], + [gl_cv_header_working_stdalign_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <stdalign.h> + int align_int = alignof (int) + _Alignof (double); - if test $ac_cv_header_stdalign_h = yes; then + /* Test _Alignas only on platforms where gnulib can help. */ + #if \ + (__GNUC__ || __IBMC__ || __IBMCPP__ \ + || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + int alignas (8) alignas_int = 1; + #endif + ]])], + [gl_cv_header_working_stdalign_h=yes], + [gl_cv_header_working_stdalign_h=no])]) + + if test $gl_cv_header_working_stdalign_h = yes; then STDALIGN_H='' else STDALIGN_H='stdalign.h' diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4 index 5705de9eca..5c313cb8c9 100644 --- a/gl/m4/stdarg.m4 +++ b/gl/m4/stdarg.m4 @@ -1,5 +1,5 @@ # stdarg.m4 serial 6 -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4 index 1ebf3e6808..eabfa64579 100644 --- a/gl/m4/stdbool.m4 +++ b/gl/m4/stdbool.m4 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4 index 1ae2344318..cc11609609 100644 --- a/gl/m4/stddef_h.m4 +++ b/gl/m4/stddef_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. # stddef_h.m4 serial 4 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 index 092161c996..28d342ea23 100644 --- a/gl/m4/stdint.m4 +++ b/gl/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 41 -dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. +# stdint.m4 serial 43 +dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -69,8 +69,6 @@ AC_DEFUN_ONCE([gl_STDINT_H], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include <stdint.h> /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ @@ -219,8 +217,6 @@ struct s { dnl This detects a bug on HP-UX 11.23/ia64. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include <stdint.h> ] diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4 index 356b14e120..581de96049 100644 --- a/gl/m4/stdint_h.m4 +++ b/gl/m4/stdint_h.m4 @@ -1,5 +1,5 @@ # stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 39bf80e2ac..1973e8db15 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 @@ -1,5 +1,5 @@ # stdio_h.m4 serial 40 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index fbdba980eb..bcb4cb854c 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 37 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# stdlib_h.m4 serial 39 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,8 +21,8 @@ AC_DEFUN([gl_STDLIB_H], #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt - ptsname random_r realpath rpmatch setenv setstate_r srandom_r strtod - strtoll strtoull unlockpt unsetenv]) + ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srandom_r + strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -52,6 +52,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) + GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) @@ -79,6 +80,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) + HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) @@ -97,6 +99,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) + REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4 index c676176c83..717fa9c323 100644 --- a/gl/m4/strcase.m4 +++ b/gl/m4/strcase.m4 @@ -1,5 +1,5 @@ # strcase.m4 serial 11 -dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strchrnul.m4 b/gl/m4/strchrnul.m4 index d89a062461..d3dfb9afa2 100644 --- a/gl/m4/strchrnul.m4 +++ b/gl/m4/strchrnul.m4 @@ -1,5 +1,5 @@ # strchrnul.m4 serial 9 -dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4 index d744ad5af8..db0c8c1db9 100644 --- a/gl/m4/strdup.m4 +++ b/gl/m4/strdup.m4 @@ -1,6 +1,6 @@ # strdup.m4 serial 13 -dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4 index ca05be6b26..6bf14ef178 100644 --- a/gl/m4/strerror.m4 +++ b/gl/m4/strerror.m4 @@ -1,5 +1,5 @@ # strerror.m4 serial 16 -dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strerror_r.m4 b/gl/m4/strerror_r.m4 index 1d4a653d2c..5bdf0abe73 100644 --- a/gl/m4/strerror_r.m4 +++ b/gl/m4/strerror_r.m4 @@ -1,5 +1,5 @@ # strerror_r.m4 serial 14 -dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 index 4f9f5114b3..5677e092d4 100644 --- a/gl/m4/string_h.m4 +++ b/gl/m4/string_h.m4 @@ -1,6 +1,6 @@ # Configure a GNU-like replacement for <string.h>. -# Copyright (C) 2007-2011 Free Software Foundation, Inc. +# Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4 index 481f8f334a..a057e1c8bd 100644 --- a/gl/m4/strings_h.m4 +++ b/gl/m4/strings_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for <strings.h>. # serial 6 -# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4 index e1ac20b8aa..bdde5fe1d2 100644 --- a/gl/m4/strndup.m4 +++ b/gl/m4/strndup.m4 @@ -1,5 +1,5 @@ # strndup.m4 serial 20 -dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4 index 672acfd6d1..d97e30759f 100644 --- a/gl/m4/strnlen.m4 +++ b/gl/m4/strnlen.m4 @@ -1,5 +1,5 @@ # strnlen.m4 serial 13 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/strverscmp.m4 b/gl/m4/strverscmp.m4 index 394b4c3a84..d744647041 100644 --- a/gl/m4/strverscmp.m4 +++ b/gl/m4/strverscmp.m4 @@ -1,5 +1,5 @@ # strverscmp.m4 serial 8 -dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/symlink.m4 b/gl/m4/symlink.m4 index 680c14f661..f84b21e40e 100644 --- a/gl/m4/symlink.m4 +++ b/gl/m4/symlink.m4 @@ -1,7 +1,7 @@ # serial 5 # See if we need to provide symlink replacement. -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4 index 8c7d112cf9..94a2669339 100644 --- a/gl/m4/sys_ioctl_h.m4 +++ b/gl/m4/sys_ioctl_h.m4 @@ -1,5 +1,5 @@ # sys_ioctl_h.m4 serial 10 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4 index b1914fb80f..eaf056a79a 100644 --- a/gl/m4/sys_select_h.m4 +++ b/gl/m4/sys_select_h.m4 @@ -1,5 +1,5 @@ # sys_select_h.m4 serial 20 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 index 7da91a4a34..8d4e7e1ebb 100644 --- a/gl/m4/sys_socket_h.m4 +++ b/gl/m4/sys_socket_h.m4 @@ -1,5 +1,5 @@ # sys_socket_h.m4 serial 22 -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4 index 83ebac613b..a0b96bc376 100644 --- a/gl/m4/sys_stat_h.m4 +++ b/gl/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ # sys_stat_h.m4 serial 26 -*- Autoconf -*- -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4 index 064e0deeb7..bed379785e 100644 --- a/gl/m4/sys_time_h.m4 +++ b/gl/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for <sys/time.h>. # serial 7 -# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 index 62113df492..8d18ddb4d1 100644 --- a/gl/m4/sys_types_h.m4 +++ b/gl/m4/sys_types_h.m4 @@ -1,5 +1,5 @@ # sys_types_h.m4 serial 2 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4 index bafa0ac457..ddf844b727 100644 --- a/gl/m4/sys_uio_h.m4 +++ b/gl/m4/sys_uio_h.m4 @@ -1,5 +1,5 @@ # sys_uio_h.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sysexits.m4 b/gl/m4/sysexits.m4 index cff6606c6e..c5741d2573 100644 --- a/gl/m4/sysexits.m4 +++ b/gl/m4/sysexits.m4 @@ -1,5 +1,5 @@ # sysexits.m4 serial 6 -dnl Copyright (C) 2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/thread.m4 b/gl/m4/thread.m4 index 49a4bc772f..cd66c3e903 100644 --- a/gl/m4/thread.m4 +++ b/gl/m4/thread.m4 @@ -1,5 +1,5 @@ # thread.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4 index 8a621fd04d..9cedb67006 100644 --- a/gl/m4/threadlib.m4 +++ b/gl/m4/threadlib.m4 @@ -1,5 +1,5 @@ -# threadlib.m4 serial 8 (gettext-0.18.2) -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +# threadlib.m4 serial 9 (gettext-0.18.2) +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ dnl default is 'no', otherwise it is system dependent. In both cases, the user dnl can change the choice through the options --enable-threads=choice or dnl --disable-threads. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, -dnl USE_PTH_THREADS, USE_WIN32_THREADS +dnl USE_PTH_THREADS, USE_WINDOWS_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). @@ -53,7 +53,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY], [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) AC_ARG_ENABLE([threads], -AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ +AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ AC_HELP_STRING([--disable-threads], [build without multithread safety])]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then @@ -276,17 +276,19 @@ int main () fi fi if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 - AC_DEFINE([USE_WIN32_THREADS], [1], - [Define if the Win32 multithreading API can be used.]) - fi - fi + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + AC_DEFINE([USE_WINDOWS_THREADS], [1], + [Define if the native Windows multithreading API can be used.]) + fi + ;; + esac fi fi AC_MSG_CHECKING([for multithread API to use]) @@ -358,7 +360,7 @@ dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl -dnl Mingw win32 N OK +dnl Mingw windows N OK dnl dnl BeOS 5 -- dnl diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 index 3454b23fa0..b88da76463 100644 --- a/gl/m4/time_h.m4 +++ b/gl/m4/time_h.m4 @@ -1,6 +1,6 @@ # Configure a more-standard replacement for <time.h>. -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. # serial 6 @@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY], AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) -dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared +dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared dnl in time.h, sys/time.h, or pthread.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4 index d646edc2d3..c3579fb3b8 100644 --- a/gl/m4/time_r.m4 +++ b/gl/m4/time_r.m4 @@ -1,6 +1,6 @@ dnl Reentrant time functions: localtime_r, gmtime_r. -dnl Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4 index 4a1c7adb4d..597b9c2d1a 100644 --- a/gl/m4/timespec.m4 +++ b/gl/m4/timespec.m4 @@ -1,6 +1,6 @@ #serial 14 -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/uintmax_t.m4 b/gl/m4/uintmax_t.m4 index c1f954ee7e..983b675e71 100644 --- a/gl/m4/uintmax_t.m4 +++ b/gl/m4/uintmax_t.m4 @@ -1,5 +1,5 @@ # uintmax_t.m4 serial 12 -dnl Copyright (C) 1997-2004, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4 index 749f6bd5dc..95bb3eb3b0 100644 --- a/gl/m4/ungetc.m4 +++ b/gl/m4/ungetc.m4 @@ -1,5 +1,5 @@ # ungetc.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 57c8094e42..7595534fdf 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 61 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +# unistd_h.m4 serial 63 +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -41,10 +41,11 @@ AC_DEFUN([gl_UNISTD_H], #endif ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize getusershell setusershell - endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite - readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat - usleep]) + gethostname getlogin getlogin_r getpagesize + getusershell setusershell endusershell + group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite + readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r + unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], @@ -82,6 +83,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) + GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) @@ -94,11 +96,11 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) + GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) @@ -131,6 +133,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) + HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) @@ -143,6 +146,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) + HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) @@ -156,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) + REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) diff --git a/gl/m4/usleep.m4 b/gl/m4/usleep.m4 new file mode 100644 index 0000000000..07fa9e9d43 --- /dev/null +++ b/gl/m4/usleep.m4 @@ -0,0 +1,35 @@ +# usleep.m4 serial 2 +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This macro intentionally does not check for select or nanosleep; +dnl both of those modules can require external libraries. +AC_DEFUN([gl_FUNC_USLEEP], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + dnl usleep was required in POSIX 2001, but dropped as obsolete in + dnl POSIX 2008; therefore, it is not always exposed in headers. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([usleep]) + AC_CHECK_TYPE([useconds_t], [], + [AC_DEFINE([useconds_t], [unsigned int], [Define to an unsigned 32-bit + type if <sys/types.h> lacks this type.])]) + if test $ac_cv_func_usleep = no; then + HAVE_USLEEP=0 + else + dnl POSIX allows implementations to reject arguments larger than + dnl 999999, but GNU guarantees it will work. + AC_CACHE_CHECK([whether usleep allows large arguments], + [gl_cv_func_usleep_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include <unistd.h> +]], [[return !!usleep (1000000);]])], + [gl_cv_func_usleep_works=yes], [gl_cv_func_usleep_works=no], + [gl_cv_func_usleep_works="guessing no"])]) + if test "$gl_cv_func_usleep_works" != yes; then + REPLACE_USLEEP=1 + fi + fi +]) diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4 index 9c4d0290c6..077e025913 100644 --- a/gl/m4/valgrind-tests.m4 +++ b/gl/m4/valgrind-tests.m4 @@ -1,5 +1,5 @@ -# valgrind-tests.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# valgrind-tests.m4 serial 3 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,9 +21,12 @@ AC_DEFUN([gl_VALGRIND_TESTS], AC_CHECK_PROGS(VALGRIND, valgrind) fi - if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then + OPTS="-q --error-exitcode=1 --suppressions=suppressions.valgrind" + + if test -n "$VALGRIND" \ + && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then opt_valgrind_tests=yes - VALGRIND="$VALGRIND -q --error-exitcode=1 --suppressions=suppressions.valgrind" + VALGRIND="$VALGRIND $OPTS" else opt_valgrind_tests=no VALGRIND= diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 index da0a6d9efc..61fe49928b 100644 --- a/gl/m4/vasnprintf.m4 +++ b/gl/m4/vasnprintf.m4 @@ -1,5 +1,5 @@ # vasnprintf.m4 serial 34 -dnl Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4 index 6db52b18b1..205ceea6dc 100644 --- a/gl/m4/vasprintf.m4 +++ b/gl/m4/vasprintf.m4 @@ -1,5 +1,5 @@ # vasprintf.m4 serial 6 -dnl Copyright (C) 2002-2003, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4 index 5032bf8553..4c6c6786a1 100644 --- a/gl/m4/version-etc.m4 +++ b/gl/m4/version-etc.m4 @@ -1,5 +1,5 @@ # version-etc.m4 serial 1 -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/vfprintf-posix.m4 b/gl/m4/vfprintf-posix.m4 index 5ec93d1052..441bd57cd2 100644 --- a/gl/m4/vfprintf-posix.m4 +++ b/gl/m4/vfprintf-posix.m4 @@ -1,5 +1,5 @@ # vfprintf-posix.m4 serial 14 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4 index 75c34b6e15..7b24d39e68 100644 --- a/gl/m4/visibility.m4 +++ b/gl/m4/visibility.m4 @@ -1,5 +1,5 @@ # visibility.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/vprintf-posix.m4 b/gl/m4/vprintf-posix.m4 index 299ff7e7ff..0320352d02 100644 --- a/gl/m4/vprintf-posix.m4 +++ b/gl/m4/vprintf-posix.m4 @@ -1,5 +1,5 @@ # vprintf-posix.m4 serial 3 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4 index d6ce1e6a10..22ec57be50 100644 --- a/gl/m4/vsnprintf.m4 +++ b/gl/m4/vsnprintf.m4 @@ -1,5 +1,5 @@ # vsnprintf.m4 serial 6 -dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 index f09deef456..03b113cf40 100644 --- a/gl/m4/warn-on-use.m4 +++ b/gl/m4/warn-on-use.m4 @@ -1,5 +1,5 @@ # warn-on-use.m4 serial 4 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4 index a4a750af36..69d05a6700 100644 --- a/gl/m4/warnings.m4 +++ b/gl/m4/warnings.m4 @@ -1,5 +1,5 @@ # warnings.m4 serial 5 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4 index 977491fe8d..c7a8b2d781 100644 --- a/gl/m4/wchar_h.m4 +++ b/gl/m4/wchar_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues. -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4 index d2c03c42d2..534735d8c6 100644 --- a/gl/m4/wchar_t.m4 +++ b/gl/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4 index da1ce3df60..3260cce323 100644 --- a/gl/m4/wint_t.m4 +++ b/gl/m4/wint_t.m4 @@ -1,5 +1,5 @@ # wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4 index 8c693bc633..b3b7feebfa 100644 --- a/gl/m4/xsize.m4 +++ b/gl/m4/xsize.m4 @@ -1,5 +1,5 @@ # xsize.m4 serial 4 -dnl Copyright (C) 2003-2004, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/yield.m4 b/gl/m4/yield.m4 index 15d5ac208c..94e69c47bf 100644 --- a/gl/m4/yield.m4 +++ b/gl/m4/yield.m4 @@ -1,5 +1,5 @@ # yield.m4 serial 2 -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/malloc.c b/gl/malloc.c index da45618973..ffe042b142 100644 --- a/gl/malloc.c +++ b/gl/malloc.c @@ -1,6 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/math.in.h b/gl/math.in.h index eadb489cd4..0271afe829 100644 --- a/gl/math.in.h +++ b/gl/math.in.h @@ -1,6 +1,6 @@ /* A GNU-like <math.h>. - Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1246,7 +1246,7 @@ _GL_EXTERN_C int isnand (double x); /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x); +_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; # endif #endif @@ -1272,7 +1272,7 @@ _GL_EXTERN_C int rpl_isnand (double x); # if @HAVE_ISNANL@ && __GNUC__ >= 4 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) # else -_GL_EXTERN_C int rpl_isnanl (long double x); +_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; # define gl_isnan_l(x) rpl_isnanl (x) # endif # undef isnan diff --git a/gl/memchr.c b/gl/memchr.c index 6d903b1014..b8fb0efb95 100644 --- a/gl/memchr.c +++ b/gl/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), diff --git a/gl/memmem.c b/gl/memmem.c index acd1a3ee5d..3d97864c95 100644 --- a/gl/memmem.c +++ b/gl/memmem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2011 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/mempcpy.c b/gl/mempcpy.c index 6a148a9fac..db7cdc9d80 100644 --- a/gl/mempcpy.c +++ b/gl/mempcpy.c @@ -1,5 +1,5 @@ /* Copy memory area and return pointer after last written byte. - Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/minmax.h b/gl/minmax.h index 172fafee4d..7f581c7213 100644 --- a/gl/minmax.h +++ b/gl/minmax.h @@ -1,5 +1,5 @@ /* MIN, MAX macros. - Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2011 Free Software + Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c index d10099ed98..b7a917d59a 100644 --- a/gl/msvc-inval.c +++ b/gl/msvc-inval.c @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression, # else -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h index 393272ea77..373f9bfb9f 100644 --- a/gl/msvc-inval.h +++ b/gl/msvc-inval.h @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -207,7 +207,7 @@ extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void); or when SANE_LIBRARY_HANDLING is desired. */ /* The braces here avoid GCC warnings like - "warning: suggest explicit braces to avoid ambiguous `else'". */ + "warning: suggest explicit braces to avoid ambiguous 'else'". */ # define TRY_MSVC_INVAL \ do \ { \ diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c index 89651408d1..f0fea17823 100644 --- a/gl/msvc-nothrow.c +++ b/gl/msvc-nothrow.c @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ /* Specification. */ #include "msvc-nothrow.h" -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h index 462fb67817..e066b24e60 100644 --- a/gl/msvc-nothrow.h +++ b/gl/msvc-nothrow.h @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/netdb.in.h b/gl/netdb.in.h index 69b6d5d782..ddc97b9e8c 100644 --- a/gl/netdb.in.h +++ b/gl/netdb.in.h @@ -1,5 +1,5 @@ /* Provide a netdb.h header file for systems lacking it (read: MinGW). - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -80,9 +80,9 @@ struct addrinfo # endif -/* Possible values for `ai_flags' field in `addrinfo' structure. */ +/* Possible values for 'ai_flags' field in 'addrinfo' structure. */ # ifndef AI_PASSIVE -# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ +# define AI_PASSIVE 0x0001 /* Socket address is intended for 'bind'. */ # endif # ifndef AI_CANONNAME # define AI_CANONNAME 0x0002 /* Request for canonical name. */ @@ -111,16 +111,16 @@ struct addrinfo returned address type. */ # endif -/* Error values for `getaddrinfo' function. */ +/* Error values for 'getaddrinfo' function. */ # ifndef EAI_BADFLAGS -# define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ +# define EAI_BADFLAGS -1 /* Invalid value for 'ai_flags' field. */ # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ # define EAI_AGAIN -3 /* Temporary failure in name resolution. */ # define EAI_FAIL -4 /* Non-recoverable failure in name res. */ # define EAI_NODATA -5 /* No address associated with NAME. */ -# define EAI_FAMILY -6 /* `ai_family' not supported. */ -# define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ -# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ +# define EAI_FAMILY -6 /* 'ai_family' not supported. */ +# define EAI_SOCKTYPE -7 /* 'ai_socktype' not supported. */ +# define EAI_SERVICE -8 /* SERVICE not supported for 'ai_socktype'. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ # endif @@ -141,7 +141,7 @@ struct addrinfo # endif # ifndef EAI_SYSTEM /* Not defined on mingw32. */ -# define EAI_SYSTEM -11 /* System error returned in `errno'. */ +# define EAI_SYSTEM -11 /* System error returned in 'errno'. */ # endif # if 0 @@ -179,7 +179,7 @@ _GL_CXXALIAS_SYS (getaddrinfo, int, _GL_CXXALIASWARN (getaddrinfo); # if !@HAVE_DECL_FREEADDRINFO@ -/* Free `addrinfo' structure AI including associated storage. +/* Free 'addrinfo' structure AI including associated storage. For more details, see the POSIX:2001 specification <http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */ _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai) diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h index 966d6a5625..e06dfe0802 100644 --- a/gl/netinet_in.in.h +++ b/gl/netinet_in.in.h @@ -1,5 +1,5 @@ /* Substitute for <netinet/in.h>. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/opendir.c b/gl/opendir.c index 20ae75e109..50e25e305a 100644 --- a/gl/opendir.c +++ b/gl/opendir.c @@ -1,5 +1,5 @@ /* Start reading the entries of a directory. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/override/m4/valgrind-tests.m4.diff b/gl/override/m4/valgrind-tests.m4.diff index dac9a243f6..d94b157b8f 100644 --- a/gl/override/m4/valgrind-tests.m4.diff +++ b/gl/override/m4/valgrind-tests.m4.diff @@ -1,11 +1,11 @@ ---- valgrind-tests.m4.orig 2011-05-21 09:37:17.415555504 +0200 -+++ valgrind-tests.m4 2011-05-21 09:37:34.600259721 +0200 -@@ -23,7 +23,7 @@ +--- valgrind-tests.m4.orig ++++ valgrind-tests.m4 +@@ -21,7 +21,7 @@ AC_DEFUN([gl_VALGRIND_TESTS], + AC_CHECK_PROGS(VALGRIND, valgrind) + fi - if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then - opt_valgrind_tests=yes -- VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full" -+ VALGRIND="$VALGRIND -q --error-exitcode=1 --suppressions=suppressions.valgrind" - else - opt_valgrind_tests=no - VALGRIND= +- OPTS="-q --error-exitcode=1 --leak-check=full" ++ OPTS="-q --error-exitcode=1 --suppressions=suppressions.valgrind" + + if test -n "$VALGRIND" \ + && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then diff --git a/gl/printf-args.c b/gl/printf-args.c index 8f3727bb48..979435f841 100644 --- a/gl/printf-args.c +++ b/gl/printf-args.c @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 Free Software + Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/printf-args.h b/gl/printf-args.h index 70cca4fb65..39ec7f4203 100644 --- a/gl/printf-args.h +++ b/gl/printf-args.h @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007, 2011 Free Software + Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/printf-frexp.c b/gl/printf-frexp.c index 267081cecd..eb47205a26 100644 --- a/gl/printf-frexp.c +++ b/gl/printf-frexp.c @@ -1,5 +1,5 @@ /* Split a double into fraction and mantissa, for hexadecimal printf. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/printf-frexp.h b/gl/printf-frexp.h index 10dd371db5..985d7d29e5 100644 --- a/gl/printf-frexp.h +++ b/gl/printf-frexp.h @@ -1,5 +1,5 @@ /* Split a double into fraction and mantissa, for hexadecimal printf. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/printf-frexpl.c b/gl/printf-frexpl.c index 2de6528bc0..568d2ffc90 100644 --- a/gl/printf-frexpl.c +++ b/gl/printf-frexpl.c @@ -1,5 +1,5 @@ /* Split a 'long double' into fraction and mantissa, for hexadecimal printf. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/printf-frexpl.h b/gl/printf-frexpl.h index a8cbcbf1d6..341ddedc4a 100644 --- a/gl/printf-frexpl.h +++ b/gl/printf-frexpl.h @@ -1,5 +1,5 @@ /* Split a 'long double' into fraction and mantissa, for hexadecimal printf. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/printf-parse.c b/gl/printf-parse.c index ff24ba47e2..d2a58a1547 100644 --- a/gl/printf-parse.c +++ b/gl/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2002-2003, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -421,7 +421,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Win32, PRIdMAX is defined as "I64d". + /* On native Windows, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') diff --git a/gl/printf-parse.h b/gl/printf-parse.h index 76e5ba3268..3830f3c1e1 100644 --- a/gl/printf-parse.h +++ b/gl/printf-parse.h @@ -1,5 +1,5 @@ /* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/progname.c b/gl/progname.c index 2465748175..bdd4dd74d4 100644 --- a/gl/progname.c +++ b/gl/progname.c @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gl/progname.h b/gl/progname.h index 084406607d..a75a02e6da 100644 --- a/gl/progname.h +++ b/gl/progname.h @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gl/rawmemchr.c b/gl/rawmemchr.c index 095a50a8bc..c94a0e10a1 100644 --- a/gl/rawmemchr.c +++ b/gl/rawmemchr.c @@ -1,5 +1,5 @@ /* Searching in a string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/read-file.c b/gl/read-file.c index bcbfbbb460..72ab4e84d2 100644 --- a/gl/read-file.c +++ b/gl/read-file.c @@ -1,5 +1,5 @@ /* read-file.c -- read file contents into a string - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson and Bruno Haible. This program is free software; you can redistribute it and/or modify diff --git a/gl/read-file.h b/gl/read-file.h index 42663ef666..b45b76d756 100644 --- a/gl/read-file.h +++ b/gl/read-file.h @@ -1,5 +1,5 @@ /* read-file.h -- read file contents into a string - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/gl/readdir.c b/gl/readdir.c index 04858b0080..28aff9ccb4 100644 --- a/gl/readdir.c +++ b/gl/readdir.c @@ -1,5 +1,5 @@ /* Read the next entry of a directory. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/realloc.c b/gl/realloc.c index 0c96ffacba..99556ccf9c 100644 --- a/gl/realloc.c +++ b/gl/realloc.c @@ -1,6 +1,6 @@ /* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2011 Free Software + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -1,6 +1,6 @@ /* recv.c --- wrappers for Windows recv function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/recvfrom.c b/gl/recvfrom.c index 5ce2b12740..2f0ecdb57c 100644 --- a/gl/recvfrom.c +++ b/gl/recvfrom.c @@ -1,6 +1,6 @@ /* recvfrom.c --- wrappers for Windows recvfrom function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/scandir.c b/gl/scandir.c index 0ce67f0708..da1287b17e 100644 --- a/gl/scandir.c +++ b/gl/scandir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2011 Free Software +/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/select.c b/gl/select.c index 236b951443..8bcfef0646 100644 --- a/gl/select.c +++ b/gl/select.c @@ -1,7 +1,7 @@ /* Emulation for select(2) Contributed by Paolo Bonzini. - Copyright 2008-2011 Free Software Foundation, Inc. + Copyright 2008-2012 Free Software Foundation, Inc. This file is part of gnulib. @@ -24,7 +24,7 @@ #include <assert.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Win32. */ +/* Native Windows. */ #include <sys/types.h> #include <errno.h> @@ -78,6 +78,8 @@ typedef DWORD (WINAPI *PNtQueryInformationFile) #define PIPE_BUF 512 #endif +/* Optimized test whether a HANDLE refers to a console. + See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>. */ #define IsConsoleHandle(h) (((long) (h) & 3) == 3) static BOOL @@ -95,11 +97,14 @@ IsSocketHandle (HANDLE h) return ev.lNetworkEvents != 0xDEADBEEF; } -/* Compute output fd_sets for libc descriptor FD (whose Win32 handle is H). */ +/* Compute output fd_sets for libc descriptor FD (whose Windows handle is + H). */ static int -win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, - struct bitset *xbits) +windows_poll_handle (HANDLE h, int fd, + struct bitset *rbits, + struct bitset *wbits, + struct bitset *xbits) { BOOL read, write, except; int i, ret; @@ -140,11 +145,12 @@ win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, { /* It was the write-end of the pipe. Check if it is writable. If NtQueryInformationFile fails, optimistically assume the pipe is - writable. This could happen on Win9x, where NtQueryInformationFile - is not available, or if we inherit a pipe that doesn't permit - FILE_READ_ATTRIBUTES access on the write end (I think this should - not happen since WinXP SP2; WINE seems fine too). Otherwise, - ensure that enough space is available for atomic writes. */ + writable. This could happen on Windows 9x, where + NtQueryInformationFile is not available, or if we inherit a pipe + that doesn't permit FILE_READ_ATTRIBUTES access on the write end + (I think this should not happen since Windows XP SP2; WINE seems + fine too). Otherwise, ensure that enough space is available for + atomic writes. */ memset (&iosb, 0, sizeof (iosb)); memset (&fpli, 0, sizeof (fpli)); @@ -369,7 +375,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, /* Poll now. If we get an event, do not wait below. */ if (wait_timeout != 0 - && win32_poll_handle (h, i, &rbits, &wbits, &xbits)) + && windows_poll_handle (h, i, &rbits, &wbits, &xbits)) wait_timeout = 0; } } @@ -446,7 +452,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, { /* Not a socket. */ nhandles++; - win32_poll_handle (h, i, &rbits, &wbits, &xbits); + windows_poll_handle (h, i, &rbits, &wbits, &xbits); if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; @@ -468,7 +474,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, return rc; } -#else /* ! Native Win32. */ +#else /* ! Native Windows. */ #include <sys/select.h> @@ -1,6 +1,6 @@ /* send.c --- wrappers for Windows send function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sendto.c b/gl/sendto.c index 95efab8885..ab575f4d28 100644 --- a/gl/sendto.c +++ b/gl/sendto.c @@ -1,6 +1,6 @@ /* sendto.c --- wrappers for Windows sendto function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/setsockopt.c b/gl/setsockopt.c index 6a7ca5e329..9f414d5813 100644 --- a/gl/setsockopt.c +++ b/gl/setsockopt.c @@ -1,6 +1,6 @@ /* setsockopt.c --- wrappers for Windows setsockopt function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/shutdown.c b/gl/shutdown.c index 1c302a24f3..ea19421bb2 100644 --- a/gl/shutdown.c +++ b/gl/shutdown.c @@ -1,6 +1,6 @@ /* shutdown.c --- wrappers for Windows shutdown function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/signal.in.h b/gl/signal.in.h index e18e0b2983..e0f0554bdb 100644 --- a/gl/signal.in.h +++ b/gl/signal.in.h @@ -1,6 +1,6 @@ /* A GNU-like <signal.h>. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/signbitd.c b/gl/signbitd.c index 4042349b6f..7629ff5005 100644 --- a/gl/signbitd.c +++ b/gl/signbitd.c @@ -1,5 +1,5 @@ /* signbit() macro: Determine the sign bit of a floating-point number. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/signbitf.c b/gl/signbitf.c index 3ec472f1a8..f99f992091 100644 --- a/gl/signbitf.c +++ b/gl/signbitf.c @@ -1,5 +1,5 @@ /* signbit() macro: Determine the sign bit of a floating-point number. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/signbitl.c b/gl/signbitl.c index 4453d8f91f..35afcf1ae7 100644 --- a/gl/signbitl.c +++ b/gl/signbitl.c @@ -1,5 +1,5 @@ /* signbit() macro: Determine the sign bit of a floating-point number. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/size_max.h b/gl/size_max.h index d5f31522c8..e669bf16c5 100644 --- a/gl/size_max.h +++ b/gl/size_max.h @@ -1,5 +1,5 @@ /* size_max.h -- declare SIZE_MAX through system headers - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/gl/sleep.c b/gl/sleep.c index 45b9d803d9..e5d329906c 100644 --- a/gl/sleep.c +++ b/gl/sleep.c @@ -1,5 +1,5 @@ /* Pausing execution of the current thread. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. This program is free software: you can redistribute it and/or modify diff --git a/gl/snprintf.c b/gl/snprintf.c index 9db2379a88..bb018801d4 100644 --- a/gl/snprintf.c +++ b/gl/snprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. This program is free software; you can redistribute it and/or modify diff --git a/gl/socket.c b/gl/socket.c index af6be25572..c668df07d1 100644 --- a/gl/socket.c +++ b/gl/socket.c @@ -1,6 +1,6 @@ /* socket.c --- wrappers for Windows socket function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sockets.c b/gl/sockets.c index 39939b0a3e..3daec454d3 100644 --- a/gl/sockets.c +++ b/gl/sockets.c @@ -1,6 +1,6 @@ /* sockets.c --- wrappers for Windows socket functions - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sockets.h b/gl/sockets.h index 323f68cd12..2efa413627 100644 --- a/gl/sockets.h +++ b/gl/sockets.h @@ -1,6 +1,6 @@ /* sockets.h - wrappers for Windows socket functions - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,8 +26,17 @@ #define SOCKETS_2_1 0x201 #define SOCKETS_2_2 0x202 -int gl_sockets_startup (int version); -int gl_sockets_cleanup (void); +int gl_sockets_startup (int version) +#if !WINDOWS_SOCKETS + _GL_ATTRIBUTE_CONST +#endif + ; + +int gl_sockets_cleanup (void) +#if !WINDOWS_SOCKETS + _GL_ATTRIBUTE_CONST +#endif + ; /* This function is useful it you create a socket using gnulib's Winsock wrappers but needs to pass on the socket handle to some diff --git a/gl/stdalign.in.h b/gl/stdalign.in.h index 79e5691a52..ae8d5b9c2c 100644 --- a/gl/stdalign.in.h +++ b/gl/stdalign.in.h @@ -1,6 +1,6 @@ -/* A substitute for ISO C 1x <stdalign.h>. +/* A substitute for ISO C11 <stdalign.h>. - Copyright 2011 Free Software Foundation, Inc. + Copyright 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,12 +21,14 @@ #ifndef _GL_STDALIGN_H #define _GL_STDALIGN_H -/* ISO C1X <stdalign.h> for platforms that lack it. +/* ISO C11 <stdalign.h> for platforms that lack it. References: - ISO C1X <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf> + ISO C11 (latest free draft + <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>) sections 6.5.3.4, 6.7.5, 7.15. - C++0X <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf> + C++11 (latest free draft + <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) section 18.10. */ /* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment @@ -68,7 +70,7 @@ To be portable to Sun C 5.11, do not align auto variables to anything stricter than their default alignment. - The following draft C1X requirements are not supported here: + The following C11 requirements are not supported here: - If A is zero, alignas has no effect. - alignas can be used multiple times; the strictest one wins. diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h index 43f9607070..3e0e43f951 100644 --- a/gl/stdarg.in.h +++ b/gl/stdarg.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around <stdarg.h>. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h index b64dc75b20..cabe4b8b8d 100644 --- a/gl/stdbool.in.h +++ b/gl/stdbool.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software; you can redistribute it and/or modify diff --git a/gl/stddef.in.h b/gl/stddef.in.h index c7b98e7dcc..65e177575c 100644 --- a/gl/stddef.in.h +++ b/gl/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/stdint.in.h b/gl/stdint.in.h index b6d08c754a..6129f1a812 100644 --- a/gl/stdint.in.h +++ b/gl/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -49,6 +49,17 @@ diagnostics. */ # define __STDINT_H__ # endif + + /* Some pre-C++11 <stdint.h> implementations need this. */ +# ifdef __cplusplus +# ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS 1 +# endif +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +# endif +# endif + /* Other systems may have an incomplete or buggy <stdint.h>. Include it before <inttypes.h>, since any "#include <stdint.h>" in <inttypes.h> would reinclude us, skipping our contents because @@ -313,8 +324,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) /* 7.18.2. Limits of specified-width integer types */ -#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS - /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer @@ -534,12 +543,8 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ - /* 7.18.4. Macros for integer constants */ -#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS - /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ @@ -600,7 +605,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # endif #endif -#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ - #endif /* _@GUARD_PREFIX@_STDINT_H */ #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h index d41c32f4b7..a065c1a61a 100644 --- a/gl/stdio-impl.h +++ b/gl/stdio-impl.h @@ -1,5 +1,5 @@ /* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/stdio.in.h b/gl/stdio.in.h index ce00af574a..04819306e6 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like <stdio.h>. - Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -186,7 +186,7 @@ _GL_CXXALIASWARN (fdopen); #elif defined GNULIB_POSIXCHECK # undef fdopen /* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on Win32 platforms is not POSIX compatible - " +_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); #endif @@ -259,7 +259,7 @@ _GL_CXXALIASWARN (fopen); #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " +_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); #endif @@ -387,7 +387,7 @@ _GL_CXXALIASWARN (freopen); # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, - "freopen on Win32 platforms is not POSIX compatible - " + "freopen on native Windows platforms is not POSIX compliant - " "use gnulib module freopen for portability"); #endif diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index 1a8df492c9..ea1c1c3be3 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like <stdlib.h>. - Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -455,6 +455,32 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " # endif #endif +#if @GNULIB_PTSNAME_R@ +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if @REPLACE_PTSNAME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !@HAVE_PTSNAME_R@ +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gl/str-two-way.h b/gl/str-two-way.h index 08a6cd3d79..c47503f9f0 100644 --- a/gl/str-two-way.h +++ b/gl/str-two-way.h @@ -1,5 +1,5 @@ /* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake <ebb9@byu.net>, 2008. diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c index 9a77bb50ca..bc2bd120f6 100644 --- a/gl/strcasecmp.c +++ b/gl/strcasecmp.c @@ -1,5 +1,5 @@ /* Case-insensitive string comparison function. - Copyright (C) 1998-1999, 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/strchrnul.c b/gl/strchrnul.c index 61db4e82b5..1be4249e3c 100644 --- a/gl/strchrnul.c +++ b/gl/strchrnul.c @@ -1,5 +1,5 @@ /* Searching in a string. - Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/strdup.c b/gl/strdup.c index ba7e76b8c2..c083551171 100644 --- a/gl/strdup.c +++ b/gl/strdup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2011 Free Software +/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/strerror-override.c b/gl/strerror-override.c index 4e2c32b9c0..9ca6523490 100644 --- a/gl/strerror-override.c +++ b/gl/strerror-override.c @@ -1,6 +1,6 @@ /* strerror-override.c --- POSIX compatible system error routine - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/strerror-override.h b/gl/strerror-override.h index 09540b957b..09526ea91a 100644 --- a/gl/strerror-override.h +++ b/gl/strerror-override.h @@ -1,6 +1,6 @@ /* strerror-override.h --- POSIX compatible system error routine - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/strerror.c b/gl/strerror.c index 63899ca6b2..587bd21a6c 100644 --- a/gl/strerror.c +++ b/gl/strerror.c @@ -1,6 +1,6 @@ /* strerror.c --- POSIX compatible system error routine - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/string.in.h b/gl/string.in.h index 62d79940d2..93f70de53e 100644 --- a/gl/string.in.h +++ b/gl/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like <string.h>. - Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/strings.in.h b/gl/strings.in.h index 8bb455e533..4724eeee49 100644 --- a/gl/strings.in.h +++ b/gl/strings.in.h @@ -1,6 +1,6 @@ /* A substitute <strings.h>. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/stripslash.c b/gl/stripslash.c index 1212440b5a..ef458c63a9 100644 --- a/gl/stripslash.c +++ b/gl/stripslash.c @@ -1,6 +1,6 @@ /* stripslash.c -- remove redundant trailing slashes from a file name - Copyright (C) 1990, 2001, 2003-2006, 2009-2011 Free Software Foundation, + Copyright (C) 1990, 2001, 2003-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -35,7 +35,7 @@ strip_trailing_slashes (char *file) bool had_slash; /* last_component returns "" for file system roots, but we need to turn - `///' into `/'. */ + "///" into "/". */ if (! *base) base = file; base_lim = base + base_len (base); diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c index 1e0d75f434..fa65ba0872 100644 --- a/gl/strncasecmp.c +++ b/gl/strncasecmp.c @@ -1,5 +1,5 @@ /* strncasecmp.c -- case insensitive string comparator - Copyright (C) 1998-1999, 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/strndup.c b/gl/strndup.c index 4a3bece4c3..6d0eaf23bf 100644 --- a/gl/strndup.c +++ b/gl/strndup.c @@ -1,6 +1,6 @@ /* A replacement function, for systems that lack strndup. - Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2011 Free Software + Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it diff --git a/gl/strnlen.c b/gl/strnlen.c index 3cefa978f6..77785375c3 100644 --- a/gl/strnlen.c +++ b/gl/strnlen.c @@ -1,5 +1,5 @@ /* Find the length of STRING, but scan at most MAXLEN characters. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/gl/strverscmp.c b/gl/strverscmp.c index bbcad4489f..6a349339cb 100644 --- a/gl/strverscmp.c +++ b/gl/strverscmp.c @@ -1,5 +1,5 @@ /* Compare strings while treating digits characters numerically. - Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2011 Free Software + Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997. @@ -43,7 +43,7 @@ - It's typically faster. POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless it's important to use the locale's definition - of `digit' even when the host does not conform to POSIX. */ + of "digit" even when the host does not conform to POSIX. */ #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) #undef __strverscmp diff --git a/gl/sys_select.in.h b/gl/sys_select.in.h index 4406a7a30d..5f93fb1b3f 100644 --- a/gl/sys_select.in.h +++ b/gl/sys_select.in.h @@ -1,5 +1,5 @@ /* Substitute for <sys/select.h>. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h index 43681a403e..49b61de614 100644 --- a/gl/sys_socket.in.h +++ b/gl/sys_socket.in.h @@ -1,6 +1,6 @@ /* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index 77a7177ca6..d93d3fd455 100644 --- a/gl/sys_stat.in.h +++ b/gl/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat header file. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h index db4eeaef5f..c9ee5653da 100644 --- a/gl/sys_time.in.h +++ b/gl/sys_time.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h index 63389de384..f37b9992e3 100644 --- a/gl/sys_types.in.h +++ b/gl/sys_types.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h index 6995e6cfd8..07b9629eff 100644 --- a/gl/sys_uio.in.h +++ b/gl/sys_uio.in.h @@ -1,5 +1,5 @@ /* Substitute for <sys/uio.h>. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/sysexits.in.h b/gl/sysexits.in.h index f925b6948e..8e8c96270f 100644 --- a/gl/sysexits.in.h +++ b/gl/sysexits.in.h @@ -1,5 +1,5 @@ /* exit() exit codes for some BSD system programs. - Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am index 0edbe385a0..e7f83f31b5 100644 --- a/gl/tests/Makefile.am +++ b/gl/tests/Makefile.am @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -388,6 +388,15 @@ EXTRA_DIST += test-fwrite.c signature.h macros.h ## end gnulib module fwrite-tests +## begin gnulib module getaddrinfo-tests + +TESTS += test-getaddrinfo +check_PROGRAMS += test-getaddrinfo +test_getaddrinfo_LDADD = $(LDADD) @GETADDRINFO_LIB@ @LIBINTL@ +EXTRA_DIST += signature.h test-getaddrinfo.c + +## end gnulib module getaddrinfo-tests + ## begin gnulib module getcwd-lgpl @@ -507,7 +516,7 @@ BUILT_SOURCES += inttypes.h # We need the following in order to create <inttypes.h> when the system # doesn't have one that works with the given compiler. -inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ @@ -528,10 +537,12 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_N -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ @@ -738,7 +749,7 @@ EXTRA_libtests_a_SOURCES += perror.c TESTS += test-perror.sh test-perror2 check_PROGRAMS += test-perror test-perror2 -EXTRA_DIST += init.sh macros.h signature.h test-perror.c test-perror2.c test-perror.sh +EXTRA_DIST += macros.h signature.h test-perror.c test-perror2.c test-perror.sh ## end gnulib module perror-tests @@ -1258,6 +1269,14 @@ EXTRA_DIST += test-sysexits.c ## end gnulib module sysexits-tests +## begin gnulib module test-framework-sh-tests + +TESTS += test-init.sh +EXTRA_DIST += init.sh +EXTRA_DIST += test-init.sh + +## end gnulib module test-framework-sh-tests + ## begin gnulib module thread libtests_a_SOURCES += glthread/thread.h glthread/thread.c @@ -1323,6 +1342,14 @@ EXTRA_DIST += test-unsetenv.c signature.h macros.h ## end gnulib module unsetenv-tests +## begin gnulib module usleep-tests + +TESTS += test-usleep +check_PROGRAMS += test-usleep +EXTRA_DIST += test-usleep.c signature.h macros.h + +## end gnulib module usleep-tests + ## begin gnulib module vasnprintf-tests TESTS += test-vasnprintf @@ -1346,7 +1373,7 @@ EXTRA_DIST += test-vasprintf.c signature.h macros.h TESTS += test-vc-list-files-git.sh TESTS += test-vc-list-files-cvs.sh TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)' -EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh +EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh ## end gnulib module vc-list-files-tests @@ -1355,7 +1382,7 @@ EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh TESTS_ENVIRONMENT += MAKE='$(MAKE)' TESTS += test-verify test-verify.sh check_PROGRAMS += test-verify -EXTRA_DIST += test-verify.c test-verify.sh init.sh +EXTRA_DIST += test-verify.c test-verify.sh ## end gnulib module verify-tests diff --git a/gl/tests/binary-io.h b/gl/tests/binary-io.h index c09dbf5799..824ad5b78a 100644 --- a/gl/tests/binary-io.h +++ b/gl/tests/binary-io.h @@ -1,5 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/dup2.c b/gl/tests/dup2.c index 790c98a2e8..f6d0f1c73c 100644 --- a/gl/tests/dup2.c +++ b/gl/tests/dup2.c @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2004-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> diff --git a/gl/tests/fcntl.in.h b/gl/tests/fcntl.in.h index 0a072214a8..84ae3eeaa1 100644 --- a/gl/tests/fcntl.in.h +++ b/gl/tests/fcntl.in.h @@ -1,6 +1,6 @@ /* Like <fcntl.h>, but with non-working flags defined to 0. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -177,12 +177,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " /* Fix up the O_* macros. */ #if !defined O_DIRECT && defined O_DIRECTIO -/* Tru64 spells it `O_DIRECTIO'. */ +/* Tru64 spells it 'O_DIRECTIO'. */ # define O_DIRECT O_DIRECTIO #endif #if !defined O_CLOEXEC && defined O_NOINHERIT -/* Mingw spells it `O_NOINHERIT'. */ +/* Mingw spells it 'O_NOINHERIT'. */ # define O_CLOEXEC O_NOINHERIT #endif diff --git a/gl/tests/fdopen.c b/gl/tests/fdopen.c index 50c889b17a..6595b16d5d 100644 --- a/gl/tests/fdopen.c +++ b/gl/tests/fdopen.c @@ -1,5 +1,5 @@ /* Open a stream with a given file descriptor. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/getcwd-lgpl.c b/gl/tests/getcwd-lgpl.c index 27614228a0..f1e821b630 100644 --- a/gl/tests/getcwd-lgpl.c +++ b/gl/tests/getcwd-lgpl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Free Software Foundation, Inc. +/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of gnulib. This program is free software: you can redistribute it and/or modify @@ -32,7 +32,7 @@ typedef int dummy; (perhaps because the absolute name was longer than PATH_MAX, or because of missing read/search permissions on parent directories) or SIZE was too small. If successful, returns BUF. If BUF is - NULL, an array is allocated with `malloc'; the array is SIZE bytes + NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ diff --git a/gl/tests/getpagesize.c b/gl/tests/getpagesize.c index d7c1ba807a..02c00fbea4 100644 --- a/gl/tests/getpagesize.c +++ b/gl/tests/getpagesize.c @@ -1,6 +1,6 @@ /* getpagesize emulation for systems where it cannot be done in a C macro. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ /* Specification. */ #include <unistd.h> -/* This implementation is only for native Win32 systems. */ +/* This implementation is only for native Windows systems. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN diff --git a/gl/tests/glthread/lock.c b/gl/tests/glthread/lock.c index 64dbd3f518..3ab4fad577 100644 --- a/gl/tests/glthread/lock.c +++ b/gl/tests/glthread/lock.c @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -630,7 +630,7 @@ glthread_once_singlethreaded (gl_once_t *once_control) /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ diff --git a/gl/tests/glthread/lock.h b/gl/tests/glthread/lock.h index 028d881d4c..02377cdeec 100644 --- a/gl/tests/glthread/lock.h +++ b/gl/tests/glthread/lock.h @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -614,7 +614,7 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control); /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -623,8 +623,8 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control); extern "C" { # endif -/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, - Semaphore types, because +/* We can use CRITICAL_SECTION directly, rather than the native Windows Event, + Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection @@ -710,9 +710,9 @@ extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ -/* The Win32 documentation says that CRITICAL_SECTION already implements a - recursive lock. But we need not rely on it: It's easy to implement a - recursive lock without this assumption. */ +/* The native Windows documentation says that CRITICAL_SECTION already + implements a recursive lock. But we need not rely on it: It's easy to + implement a recursive lock without this assumption. */ typedef struct { @@ -764,7 +764,7 @@ extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (v /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/gl/tests/glthread/thread.c b/gl/tests/glthread/thread.c index 83b8c57caf..be0a871330 100644 --- a/gl/tests/glthread/thread.c +++ b/gl/tests/glthread/thread.c @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ const gl_thread_t gl_null_thread /* = { .p = NULL } */; /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS #include <process.h> diff --git a/gl/tests/glthread/thread.h b/gl/tests/glthread/thread.h index 064d72f415..b95d6a2a7a 100644 --- a/gl/tests/glthread/thread.h +++ b/gl/tests/glthread/thread.h @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -290,7 +290,7 @@ typedef thread_t gl_thread_t; /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -337,7 +337,7 @@ extern int gl_thread_exit_func (void *retval); /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/gl/tests/glthread/threadlib.c b/gl/tests/glthread/threadlib.c index 646defa21b..30d6d51f01 100644 --- a/gl/tests/glthread/threadlib.c +++ b/gl/tests/glthread/threadlib.c @@ -1,5 +1,5 @@ /* Multithreading primitives. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/glthread/yield.h b/gl/tests/glthread/yield.h index 4fa2d8b1b7..040afe321c 100644 --- a/gl/tests/glthread/yield.h +++ b/gl/tests/glthread/yield.h @@ -1,5 +1,5 @@ /* Yielding the processor to other threads and processes. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ extern "C" { /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -109,7 +109,7 @@ extern "C" { /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/gl/tests/ignore-value.h b/gl/tests/ignore-value.h index f021a1ac8e..92f2fbca92 100644 --- a/gl/tests/ignore-value.h +++ b/gl/tests/ignore-value.h @@ -1,6 +1,6 @@ /* ignore a function return without a compiler warning - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/infinity.h b/gl/tests/infinity.h index 19a687301b..631473ecd0 100644 --- a/gl/tests/infinity.h +++ b/gl/tests/infinity.h @@ -1,5 +1,5 @@ /* Macros for infinity. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/init.sh b/gl/tests/init.sh index 373d9d4fe7..5985552acf 100644 --- a/gl/tests/init.sh +++ b/gl/tests/init.sh @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'` # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the handler. -# So use `Exit STATUS' instead of `exit STATUS' inside of the tests. +# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests. # Turn off errexit here so that we don't trip the bug with OSF1/Tru64 # sh inside this function. Exit () { set +e; (exit $1); exit $1; } @@ -172,7 +172,7 @@ else if test "$re_shell_" = __current__; then # 'eval'ing this code makes Solaris 10's /bin/sh exit with # $? set to 2. It does not evaluate any of the code after the - # "unexpected" first `('. Thus, we must run it in a subshell. + # "unexpected" first '('. Thus, we must run it in a subshell. ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1 else "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null @@ -221,16 +221,102 @@ export MALLOC_PERTURB_ # a partition, or to undo any other global state changes. cleanup_ () { :; } -if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then - compare () { diff -u "$@"; } -elif ( diff -c "$0" "$0" < /dev/null ) > /dev/null 2>&1; then - compare () { diff -c "$@"; } +# Emit a header similar to that from diff -u; Print the simulated "diff" +# command so that the order of arguments is clear. Don't bother with @@ lines. +emit_diff_u_header_ () +{ + printf '%s\n' "diff -u $*" \ + "--- $1 1970-01-01" \ + "+++ $2 1970-01-01" +} + +# Arrange not to let diff or cmp operate on /dev/null, +# since on some systems (at least OSF/1 5.1), that doesn't work. +# When there are not two arguments, or no argument is /dev/null, return 2. +# When one argument is /dev/null and the other is not empty, +# cat the nonempty file to stderr and return 1. +# Otherwise, return 0. +compare_dev_null_ () +{ + test $# = 2 || return 2 + + if test "x$1" = x/dev/null; then + test -s "$2" || return 0 + emit_diff_u_header_ "$@"; sed 's/^/+/' "$2" + return 1 + fi + + if test "x$2" = x/dev/null; then + test -s "$1" || return 0 + emit_diff_u_header_ "$@"; sed 's/^/-/' "$1" + return 1 + fi + + return 2 +} + +if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then + if test -z "$diff_out_"; then + compare_ () { diff -u "$@"; } + else + compare_ () + { + if diff -u "$@" > diff.out; then + # No differences were found, but Solaris 'diff' produces output + # "No differences encountered". Hide this output. + rm -f diff.out + true + else + cat diff.out + rm -f diff.out + false + fi + } + fi +elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then + if test -z "$diff_out_"; then + compare_ () { diff -c "$@"; } + else + compare_ () + { + if diff -c "$@" > diff.out; then + # No differences were found, but AIX and HP-UX 'diff' produce output + # "No differences encountered" or "There are no differences between the + # files.". Hide this output. + rm -f diff.out + true + else + cat diff.out + rm -f diff.out + false + fi + } + fi elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then - compare () { cmp -s "$@"; } + compare_ () { cmp -s "$@"; } else - compare () { cmp "$@"; } + compare_ () { cmp "$@"; } fi +# Usage: compare EXPECTED ACTUAL +# +# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more. +# Otherwise, propagate $? to caller: any diffs have already been printed. +compare () +{ + # This looks like it can be factored to use a simple "case $?" + # after unchecked compare_dev_null_ invocation, but that would + # fail in a "set -e" environment. + if compare_dev_null_ "$@"; then + return 0 + else + case $? in + 1) return 1;; + *) compare_ "$@";; + esac + fi +} + # An arbitrary prefix to help distinguish test directories. testdir_prefix_ () { printf gt; } @@ -441,7 +527,7 @@ mktempd_ () esac # First, try to use mktemp. - d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \ + d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ || fail=1 # The resulting name must be in the specified directory. diff --git a/gl/tests/inttypes.in.h b/gl/tests/inttypes.in.h index 7abf39403f..b9da2b5b09 100644 --- a/gl/tests/inttypes.in.h +++ b/gl/tests/inttypes.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2011 Free Software Foundation, Inc. +/* Copyright (C) 2006-2012 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. @@ -31,6 +31,12 @@ The include_next requires a split double-inclusion guard. */ #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H # if @HAVE_INTTYPES_H@ + + /* Some pre-C++11 <stdint.h> implementations need this. */ +# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# endif + # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ # endif #endif @@ -50,994 +56,992 @@ # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>." #endif +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* 7.8.1 Macros for format specifiers */ -#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS - -# if defined _TNS_R_TARGET +#if defined _TNS_R_TARGET /* Tandem NonStop R series and compatible platforms released before July 2005 support %Ld but not %lld. */ -# define _LONG_LONG_FORMAT_PREFIX "L" -# else -# define _LONG_LONG_FORMAT_PREFIX "ll" -# endif +# define _LONG_LONG_FORMAT_PREFIX "L" +#else +# define _LONG_LONG_FORMAT_PREFIX "ll" +#endif -# if !defined PRId8 || @PRI_MACROS_BROKEN@ -# undef PRId8 -# ifdef INT8_MAX -# define PRId8 "d" -# endif +#if !defined PRId8 || @PRI_MACROS_BROKEN@ +# undef PRId8 +# ifdef INT8_MAX +# define PRId8 "d" # endif -# if !defined PRIi8 || @PRI_MACROS_BROKEN@ -# undef PRIi8 -# ifdef INT8_MAX -# define PRIi8 "i" -# endif +#endif +#if !defined PRIi8 || @PRI_MACROS_BROKEN@ +# undef PRIi8 +# ifdef INT8_MAX +# define PRIi8 "i" # endif -# if !defined PRIo8 || @PRI_MACROS_BROKEN@ -# undef PRIo8 -# ifdef UINT8_MAX -# define PRIo8 "o" -# endif +#endif +#if !defined PRIo8 || @PRI_MACROS_BROKEN@ +# undef PRIo8 +# ifdef UINT8_MAX +# define PRIo8 "o" # endif -# if !defined PRIu8 || @PRI_MACROS_BROKEN@ -# undef PRIu8 -# ifdef UINT8_MAX -# define PRIu8 "u" -# endif +#endif +#if !defined PRIu8 || @PRI_MACROS_BROKEN@ +# undef PRIu8 +# ifdef UINT8_MAX +# define PRIu8 "u" # endif -# if !defined PRIx8 || @PRI_MACROS_BROKEN@ -# undef PRIx8 -# ifdef UINT8_MAX -# define PRIx8 "x" -# endif +#endif +#if !defined PRIx8 || @PRI_MACROS_BROKEN@ +# undef PRIx8 +# ifdef UINT8_MAX +# define PRIx8 "x" # endif -# if !defined PRIX8 || @PRI_MACROS_BROKEN@ -# undef PRIX8 -# ifdef UINT8_MAX -# define PRIX8 "X" -# endif +#endif +#if !defined PRIX8 || @PRI_MACROS_BROKEN@ +# undef PRIX8 +# ifdef UINT8_MAX +# define PRIX8 "X" # endif -# if !defined PRId16 || @PRI_MACROS_BROKEN@ -# undef PRId16 -# ifdef INT16_MAX -# define PRId16 "d" -# endif +#endif +#if !defined PRId16 || @PRI_MACROS_BROKEN@ +# undef PRId16 +# ifdef INT16_MAX +# define PRId16 "d" # endif -# if !defined PRIi16 || @PRI_MACROS_BROKEN@ -# undef PRIi16 -# ifdef INT16_MAX -# define PRIi16 "i" -# endif +#endif +#if !defined PRIi16 || @PRI_MACROS_BROKEN@ +# undef PRIi16 +# ifdef INT16_MAX +# define PRIi16 "i" # endif -# if !defined PRIo16 || @PRI_MACROS_BROKEN@ -# undef PRIo16 -# ifdef UINT16_MAX -# define PRIo16 "o" -# endif +#endif +#if !defined PRIo16 || @PRI_MACROS_BROKEN@ +# undef PRIo16 +# ifdef UINT16_MAX +# define PRIo16 "o" # endif -# if !defined PRIu16 || @PRI_MACROS_BROKEN@ -# undef PRIu16 -# ifdef UINT16_MAX -# define PRIu16 "u" -# endif +#endif +#if !defined PRIu16 || @PRI_MACROS_BROKEN@ +# undef PRIu16 +# ifdef UINT16_MAX +# define PRIu16 "u" # endif -# if !defined PRIx16 || @PRI_MACROS_BROKEN@ -# undef PRIx16 -# ifdef UINT16_MAX -# define PRIx16 "x" -# endif +#endif +#if !defined PRIx16 || @PRI_MACROS_BROKEN@ +# undef PRIx16 +# ifdef UINT16_MAX +# define PRIx16 "x" # endif -# if !defined PRIX16 || @PRI_MACROS_BROKEN@ -# undef PRIX16 -# ifdef UINT16_MAX -# define PRIX16 "X" -# endif +#endif +#if !defined PRIX16 || @PRI_MACROS_BROKEN@ +# undef PRIX16 +# ifdef UINT16_MAX +# define PRIX16 "X" # endif -# if !defined PRId32 || @PRI_MACROS_BROKEN@ -# undef PRId32 -# ifdef INT32_MAX -# define PRId32 "d" -# endif +#endif +#if !defined PRId32 || @PRI_MACROS_BROKEN@ +# undef PRId32 +# ifdef INT32_MAX +# define PRId32 "d" # endif -# if !defined PRIi32 || @PRI_MACROS_BROKEN@ -# undef PRIi32 -# ifdef INT32_MAX -# define PRIi32 "i" -# endif +#endif +#if !defined PRIi32 || @PRI_MACROS_BROKEN@ +# undef PRIi32 +# ifdef INT32_MAX +# define PRIi32 "i" # endif -# if !defined PRIo32 || @PRI_MACROS_BROKEN@ -# undef PRIo32 -# ifdef UINT32_MAX -# define PRIo32 "o" -# endif +#endif +#if !defined PRIo32 || @PRI_MACROS_BROKEN@ +# undef PRIo32 +# ifdef UINT32_MAX +# define PRIo32 "o" # endif -# if !defined PRIu32 || @PRI_MACROS_BROKEN@ -# undef PRIu32 -# ifdef UINT32_MAX -# define PRIu32 "u" -# endif +#endif +#if !defined PRIu32 || @PRI_MACROS_BROKEN@ +# undef PRIu32 +# ifdef UINT32_MAX +# define PRIu32 "u" # endif -# if !defined PRIx32 || @PRI_MACROS_BROKEN@ -# undef PRIx32 -# ifdef UINT32_MAX -# define PRIx32 "x" -# endif +#endif +#if !defined PRIx32 || @PRI_MACROS_BROKEN@ +# undef PRIx32 +# ifdef UINT32_MAX +# define PRIx32 "x" # endif -# if !defined PRIX32 || @PRI_MACROS_BROKEN@ -# undef PRIX32 -# ifdef UINT32_MAX -# define PRIX32 "X" -# endif +#endif +#if !defined PRIX32 || @PRI_MACROS_BROKEN@ +# undef PRIX32 +# ifdef UINT32_MAX +# define PRIX32 "X" # endif -# ifdef INT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) -# define _PRI64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _PRI64_PREFIX "I64" -# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined PRId64 || @PRI_MACROS_BROKEN@ -# undef PRId64 -# define PRId64 _PRI64_PREFIX "d" -# endif -# if !defined PRIi64 || @PRI_MACROS_BROKEN@ -# undef PRIi64 -# define PRIi64 _PRI64_PREFIX "i" -# endif +#endif +#ifdef INT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) +# define _PRI64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRI64_PREFIX "I64" +# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRId64 || @PRI_MACROS_BROKEN@ +# undef PRId64 +# define PRId64 _PRI64_PREFIX "d" +# endif +# if !defined PRIi64 || @PRI_MACROS_BROKEN@ +# undef PRIi64 +# define PRIi64 _PRI64_PREFIX "i" # endif -# ifdef UINT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) -# define _PRIu64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _PRIu64_PREFIX "I64" -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined PRIo64 || @PRI_MACROS_BROKEN@ -# undef PRIo64 -# define PRIo64 _PRIu64_PREFIX "o" -# endif -# if !defined PRIu64 || @PRI_MACROS_BROKEN@ -# undef PRIu64 -# define PRIu64 _PRIu64_PREFIX "u" -# endif -# if !defined PRIx64 || @PRI_MACROS_BROKEN@ -# undef PRIx64 -# define PRIx64 _PRIu64_PREFIX "x" -# endif -# if !defined PRIX64 || @PRI_MACROS_BROKEN@ -# undef PRIX64 -# define PRIX64 _PRIu64_PREFIX "X" -# endif +#endif +#ifdef UINT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) +# define _PRIu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRIu64_PREFIX "I64" +# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRIo64 || @PRI_MACROS_BROKEN@ +# undef PRIo64 +# define PRIo64 _PRIu64_PREFIX "o" +# endif +# if !defined PRIu64 || @PRI_MACROS_BROKEN@ +# undef PRIu64 +# define PRIu64 _PRIu64_PREFIX "u" +# endif +# if !defined PRIx64 || @PRI_MACROS_BROKEN@ +# undef PRIx64 +# define PRIx64 _PRIu64_PREFIX "x" +# endif +# if !defined PRIX64 || @PRI_MACROS_BROKEN@ +# undef PRIX64 +# define PRIX64 _PRIu64_PREFIX "X" # endif +#endif -# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST8 -# define PRIdLEAST8 "d" -# endif -# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST8 -# define PRIiLEAST8 "i" -# endif -# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST8 -# define PRIoLEAST8 "o" -# endif -# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST8 -# define PRIuLEAST8 "u" -# endif -# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST8 -# define PRIxLEAST8 "x" -# endif -# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST8 -# define PRIXLEAST8 "X" -# endif -# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST16 -# define PRIdLEAST16 "d" -# endif -# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST16 -# define PRIiLEAST16 "i" -# endif -# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST16 -# define PRIoLEAST16 "o" -# endif -# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST16 -# define PRIuLEAST16 "u" -# endif -# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST16 -# define PRIxLEAST16 "x" -# endif -# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST16 -# define PRIXLEAST16 "X" -# endif -# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST32 -# define PRIdLEAST32 "d" -# endif -# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST32 -# define PRIiLEAST32 "i" -# endif -# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST32 -# define PRIoLEAST32 "o" -# endif -# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST32 -# define PRIuLEAST32 "u" -# endif -# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST32 -# define PRIxLEAST32 "x" -# endif -# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST32 -# define PRIXLEAST32 "X" -# endif -# ifdef INT64_MAX -# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST64 -# define PRIdLEAST64 PRId64 -# endif -# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST64 -# define PRIiLEAST64 PRIi64 -# endif +#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#ifdef INT64_MAX +# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST64 +# define PRIdLEAST64 PRId64 # endif -# ifdef UINT64_MAX -# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST64 -# define PRIoLEAST64 PRIo64 -# endif -# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST64 -# define PRIuLEAST64 PRIu64 -# endif -# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST64 -# define PRIxLEAST64 PRIx64 -# endif -# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST64 -# define PRIXLEAST64 PRIX64 -# endif +# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +# endif +# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +# endif +# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST64 +# define PRIxLEAST64 PRIx64 # endif +# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +# endif +#endif -# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define PRIdFAST8 PRId64 -# else -# define PRIdFAST8 "d" -# endif +#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIdFAST8 PRId64 +# else +# define PRIdFAST8 "d" # endif -# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define PRIiFAST8 PRIi64 -# else -# define PRIiFAST8 "i" -# endif +#endif +#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIiFAST8 PRIi64 +# else +# define PRIiFAST8 "i" # endif -# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIoFAST8 PRIo64 -# else -# define PRIoFAST8 "o" -# endif +#endif +#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIoFAST8 PRIo64 +# else +# define PRIoFAST8 "o" # endif -# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIuFAST8 PRIu64 -# else -# define PRIuFAST8 "u" -# endif +#endif +#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIuFAST8 PRIu64 +# else +# define PRIuFAST8 "u" # endif -# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIxFAST8 PRIx64 -# else -# define PRIxFAST8 "x" -# endif +#endif +#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIxFAST8 PRIx64 +# else +# define PRIxFAST8 "x" # endif -# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIXFAST8 PRIX64 -# else -# define PRIXFAST8 "X" -# endif +#endif +#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIXFAST8 PRIX64 +# else +# define PRIXFAST8 "X" # endif -# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define PRIdFAST16 PRId64 -# else -# define PRIdFAST16 "d" -# endif +#endif +#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIdFAST16 PRId64 +# else +# define PRIdFAST16 "d" # endif -# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define PRIiFAST16 PRIi64 -# else -# define PRIiFAST16 "i" -# endif +#endif +#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIiFAST16 PRIi64 +# else +# define PRIiFAST16 "i" # endif -# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIoFAST16 PRIo64 -# else -# define PRIoFAST16 "o" -# endif +#endif +#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIoFAST16 PRIo64 +# else +# define PRIoFAST16 "o" # endif -# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIuFAST16 PRIu64 -# else -# define PRIuFAST16 "u" -# endif +#endif +#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIuFAST16 PRIu64 +# else +# define PRIuFAST16 "u" # endif -# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIxFAST16 PRIx64 -# else -# define PRIxFAST16 "x" -# endif +#endif +#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIxFAST16 PRIx64 +# else +# define PRIxFAST16 "x" # endif -# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIXFAST16 PRIX64 -# else -# define PRIXFAST16 "X" -# endif +#endif +#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIXFAST16 PRIX64 +# else +# define PRIXFAST16 "X" # endif -# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define PRIdFAST32 PRId64 -# else -# define PRIdFAST32 "d" -# endif +#endif +#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIdFAST32 PRId64 +# else +# define PRIdFAST32 "d" # endif -# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define PRIiFAST32 PRIi64 -# else -# define PRIiFAST32 "i" -# endif +#endif +#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIiFAST32 PRIi64 +# else +# define PRIiFAST32 "i" # endif -# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIoFAST32 PRIo64 -# else -# define PRIoFAST32 "o" -# endif +#endif +#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIoFAST32 PRIo64 +# else +# define PRIoFAST32 "o" # endif -# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIuFAST32 PRIu64 -# else -# define PRIuFAST32 "u" -# endif +#endif +#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIuFAST32 PRIu64 +# else +# define PRIuFAST32 "u" # endif -# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIxFAST32 PRIx64 -# else -# define PRIxFAST32 "x" -# endif +#endif +#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIxFAST32 PRIx64 +# else +# define PRIxFAST32 "x" # endif -# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIXFAST32 PRIX64 -# else -# define PRIXFAST32 "X" -# endif +#endif +#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIXFAST32 PRIX64 +# else +# define PRIXFAST32 "X" # endif -# ifdef INT64_MAX -# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST64 -# define PRIdFAST64 PRId64 -# endif -# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST64 -# define PRIiFAST64 PRIi64 -# endif +#endif +#ifdef INT64_MAX +# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST64 +# define PRIdFAST64 PRId64 # endif -# ifdef UINT64_MAX -# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST64 -# define PRIoFAST64 PRIo64 -# endif -# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST64 -# define PRIuFAST64 PRIu64 -# endif -# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST64 -# define PRIxFAST64 PRIx64 -# endif -# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST64 -# define PRIXFAST64 PRIX64 -# endif +# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST64 +# define PRIiFAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST64 +# define PRIoFAST64 PRIo64 +# endif +# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST64 +# define PRIuFAST64 PRIu64 +# endif +# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST64 +# define PRIxFAST64 PRIx64 # endif +# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST64 +# define PRIXFAST64 PRIX64 +# endif +#endif -# if !defined PRIdMAX || @PRI_MACROS_BROKEN@ -# undef PRIdMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define PRIdMAX PRId64 -# else -# define PRIdMAX "ld" -# endif +#if !defined PRIdMAX || @PRI_MACROS_BROKEN@ +# undef PRIdMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" # endif -# if !defined PRIiMAX || @PRI_MACROS_BROKEN@ -# undef PRIiMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define PRIiMAX PRIi64 -# else -# define PRIiMAX "li" -# endif +#endif +#if !defined PRIiMAX || @PRI_MACROS_BROKEN@ +# undef PRIiMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" # endif -# if !defined PRIoMAX || @PRI_MACROS_BROKEN@ -# undef PRIoMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIoMAX PRIo64 -# else -# define PRIoMAX "lo" -# endif +#endif +#if !defined PRIoMAX || @PRI_MACROS_BROKEN@ +# undef PRIoMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" # endif -# if !defined PRIuMAX || @PRI_MACROS_BROKEN@ -# undef PRIuMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIuMAX PRIu64 -# else -# define PRIuMAX "lu" -# endif +#endif +#if !defined PRIuMAX || @PRI_MACROS_BROKEN@ +# undef PRIuMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" # endif -# if !defined PRIxMAX || @PRI_MACROS_BROKEN@ -# undef PRIxMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIxMAX PRIx64 -# else -# define PRIxMAX "lx" -# endif +#endif +#if !defined PRIxMAX || @PRI_MACROS_BROKEN@ +# undef PRIxMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" # endif -# if !defined PRIXMAX || @PRI_MACROS_BROKEN@ -# undef PRIXMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIXMAX PRIX64 -# else -# define PRIXMAX "lX" -# endif +#endif +#if !defined PRIXMAX || @PRI_MACROS_BROKEN@ +# undef PRIXMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIXMAX PRIX64 +# else +# define PRIXMAX "lX" # endif +#endif -# if !defined PRIdPTR || @PRI_MACROS_BROKEN@ -# undef PRIdPTR -# ifdef INTPTR_MAX -# define PRIdPTR @PRIPTR_PREFIX@ "d" -# endif +#if !defined PRIdPTR || @PRI_MACROS_BROKEN@ +# undef PRIdPTR +# ifdef INTPTR_MAX +# define PRIdPTR @PRIPTR_PREFIX@ "d" # endif -# if !defined PRIiPTR || @PRI_MACROS_BROKEN@ -# undef PRIiPTR -# ifdef INTPTR_MAX -# define PRIiPTR @PRIPTR_PREFIX@ "i" -# endif +#endif +#if !defined PRIiPTR || @PRI_MACROS_BROKEN@ +# undef PRIiPTR +# ifdef INTPTR_MAX +# define PRIiPTR @PRIPTR_PREFIX@ "i" # endif -# if !defined PRIoPTR || @PRI_MACROS_BROKEN@ -# undef PRIoPTR -# ifdef UINTPTR_MAX -# define PRIoPTR @PRIPTR_PREFIX@ "o" -# endif +#endif +#if !defined PRIoPTR || @PRI_MACROS_BROKEN@ +# undef PRIoPTR +# ifdef UINTPTR_MAX +# define PRIoPTR @PRIPTR_PREFIX@ "o" # endif -# if !defined PRIuPTR || @PRI_MACROS_BROKEN@ -# undef PRIuPTR -# ifdef UINTPTR_MAX -# define PRIuPTR @PRIPTR_PREFIX@ "u" -# endif +#endif +#if !defined PRIuPTR || @PRI_MACROS_BROKEN@ +# undef PRIuPTR +# ifdef UINTPTR_MAX +# define PRIuPTR @PRIPTR_PREFIX@ "u" # endif -# if !defined PRIxPTR || @PRI_MACROS_BROKEN@ -# undef PRIxPTR -# ifdef UINTPTR_MAX -# define PRIxPTR @PRIPTR_PREFIX@ "x" -# endif +#endif +#if !defined PRIxPTR || @PRI_MACROS_BROKEN@ +# undef PRIxPTR +# ifdef UINTPTR_MAX +# define PRIxPTR @PRIPTR_PREFIX@ "x" # endif -# if !defined PRIXPTR || @PRI_MACROS_BROKEN@ -# undef PRIXPTR -# ifdef UINTPTR_MAX -# define PRIXPTR @PRIPTR_PREFIX@ "X" -# endif +#endif +#if !defined PRIXPTR || @PRI_MACROS_BROKEN@ +# undef PRIXPTR +# ifdef UINTPTR_MAX +# define PRIXPTR @PRIPTR_PREFIX@ "X" # endif +#endif -# if !defined SCNd8 || @PRI_MACROS_BROKEN@ -# undef SCNd8 -# ifdef INT8_MAX -# define SCNd8 "hhd" -# endif +#if !defined SCNd8 || @PRI_MACROS_BROKEN@ +# undef SCNd8 +# ifdef INT8_MAX +# define SCNd8 "hhd" # endif -# if !defined SCNi8 || @PRI_MACROS_BROKEN@ -# undef SCNi8 -# ifdef INT8_MAX -# define SCNi8 "hhi" -# endif +#endif +#if !defined SCNi8 || @PRI_MACROS_BROKEN@ +# undef SCNi8 +# ifdef INT8_MAX +# define SCNi8 "hhi" # endif -# if !defined SCNo8 || @PRI_MACROS_BROKEN@ -# undef SCNo8 -# ifdef UINT8_MAX -# define SCNo8 "hho" -# endif +#endif +#if !defined SCNo8 || @PRI_MACROS_BROKEN@ +# undef SCNo8 +# ifdef UINT8_MAX +# define SCNo8 "hho" # endif -# if !defined SCNu8 || @PRI_MACROS_BROKEN@ -# undef SCNu8 -# ifdef UINT8_MAX -# define SCNu8 "hhu" -# endif +#endif +#if !defined SCNu8 || @PRI_MACROS_BROKEN@ +# undef SCNu8 +# ifdef UINT8_MAX +# define SCNu8 "hhu" # endif -# if !defined SCNx8 || @PRI_MACROS_BROKEN@ -# undef SCNx8 -# ifdef UINT8_MAX -# define SCNx8 "hhx" -# endif +#endif +#if !defined SCNx8 || @PRI_MACROS_BROKEN@ +# undef SCNx8 +# ifdef UINT8_MAX +# define SCNx8 "hhx" # endif -# if !defined SCNd16 || @PRI_MACROS_BROKEN@ -# undef SCNd16 -# ifdef INT16_MAX -# define SCNd16 "hd" -# endif +#endif +#if !defined SCNd16 || @PRI_MACROS_BROKEN@ +# undef SCNd16 +# ifdef INT16_MAX +# define SCNd16 "hd" # endif -# if !defined SCNi16 || @PRI_MACROS_BROKEN@ -# undef SCNi16 -# ifdef INT16_MAX -# define SCNi16 "hi" -# endif +#endif +#if !defined SCNi16 || @PRI_MACROS_BROKEN@ +# undef SCNi16 +# ifdef INT16_MAX +# define SCNi16 "hi" # endif -# if !defined SCNo16 || @PRI_MACROS_BROKEN@ -# undef SCNo16 -# ifdef UINT16_MAX -# define SCNo16 "ho" -# endif +#endif +#if !defined SCNo16 || @PRI_MACROS_BROKEN@ +# undef SCNo16 +# ifdef UINT16_MAX +# define SCNo16 "ho" # endif -# if !defined SCNu16 || @PRI_MACROS_BROKEN@ -# undef SCNu16 -# ifdef UINT16_MAX -# define SCNu16 "hu" -# endif +#endif +#if !defined SCNu16 || @PRI_MACROS_BROKEN@ +# undef SCNu16 +# ifdef UINT16_MAX +# define SCNu16 "hu" # endif -# if !defined SCNx16 || @PRI_MACROS_BROKEN@ -# undef SCNx16 -# ifdef UINT16_MAX -# define SCNx16 "hx" -# endif +#endif +#if !defined SCNx16 || @PRI_MACROS_BROKEN@ +# undef SCNx16 +# ifdef UINT16_MAX +# define SCNx16 "hx" # endif -# if !defined SCNd32 || @PRI_MACROS_BROKEN@ -# undef SCNd32 -# ifdef INT32_MAX -# define SCNd32 "d" -# endif +#endif +#if !defined SCNd32 || @PRI_MACROS_BROKEN@ +# undef SCNd32 +# ifdef INT32_MAX +# define SCNd32 "d" # endif -# if !defined SCNi32 || @PRI_MACROS_BROKEN@ -# undef SCNi32 -# ifdef INT32_MAX -# define SCNi32 "i" -# endif +#endif +#if !defined SCNi32 || @PRI_MACROS_BROKEN@ +# undef SCNi32 +# ifdef INT32_MAX +# define SCNi32 "i" # endif -# if !defined SCNo32 || @PRI_MACROS_BROKEN@ -# undef SCNo32 -# ifdef UINT32_MAX -# define SCNo32 "o" -# endif +#endif +#if !defined SCNo32 || @PRI_MACROS_BROKEN@ +# undef SCNo32 +# ifdef UINT32_MAX +# define SCNo32 "o" # endif -# if !defined SCNu32 || @PRI_MACROS_BROKEN@ -# undef SCNu32 -# ifdef UINT32_MAX -# define SCNu32 "u" -# endif +#endif +#if !defined SCNu32 || @PRI_MACROS_BROKEN@ +# undef SCNu32 +# ifdef UINT32_MAX +# define SCNu32 "u" # endif -# if !defined SCNx32 || @PRI_MACROS_BROKEN@ -# undef SCNx32 -# ifdef UINT32_MAX -# define SCNx32 "x" -# endif +#endif +#if !defined SCNx32 || @PRI_MACROS_BROKEN@ +# undef SCNx32 +# ifdef UINT32_MAX +# define SCNx32 "x" # endif -# ifdef INT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) -# define _SCN64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _SCN64_PREFIX "I64" -# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined SCNd64 || @PRI_MACROS_BROKEN@ -# undef SCNd64 -# define SCNd64 _SCN64_PREFIX "d" -# endif -# if !defined SCNi64 || @PRI_MACROS_BROKEN@ -# undef SCNi64 -# define SCNi64 _SCN64_PREFIX "i" -# endif +#endif +#ifdef INT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) +# define _SCN64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCN64_PREFIX "I64" +# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNd64 || @PRI_MACROS_BROKEN@ +# undef SCNd64 +# define SCNd64 _SCN64_PREFIX "d" +# endif +# if !defined SCNi64 || @PRI_MACROS_BROKEN@ +# undef SCNi64 +# define SCNi64 _SCN64_PREFIX "i" # endif -# ifdef UINT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) -# define _SCNu64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _SCNu64_PREFIX "I64" -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined SCNo64 || @PRI_MACROS_BROKEN@ -# undef SCNo64 -# define SCNo64 _SCNu64_PREFIX "o" -# endif -# if !defined SCNu64 || @PRI_MACROS_BROKEN@ -# undef SCNu64 -# define SCNu64 _SCNu64_PREFIX "u" -# endif -# if !defined SCNx64 || @PRI_MACROS_BROKEN@ -# undef SCNx64 -# define SCNx64 _SCNu64_PREFIX "x" -# endif +#endif +#ifdef UINT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) +# define _SCNu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCNu64_PREFIX "I64" +# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNo64 || @PRI_MACROS_BROKEN@ +# undef SCNo64 +# define SCNo64 _SCNu64_PREFIX "o" +# endif +# if !defined SCNu64 || @PRI_MACROS_BROKEN@ +# undef SCNu64 +# define SCNu64 _SCNu64_PREFIX "u" +# endif +# if !defined SCNx64 || @PRI_MACROS_BROKEN@ +# undef SCNx64 +# define SCNx64 _SCNu64_PREFIX "x" # endif +#endif -# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST8 -# define SCNdLEAST8 "hhd" -# endif -# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST8 -# define SCNiLEAST8 "hhi" -# endif -# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST8 -# define SCNoLEAST8 "hho" -# endif -# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST8 -# define SCNuLEAST8 "hhu" -# endif -# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST8 -# define SCNxLEAST8 "hhx" -# endif -# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST16 -# define SCNdLEAST16 "hd" -# endif -# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST16 -# define SCNiLEAST16 "hi" -# endif -# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST16 -# define SCNoLEAST16 "ho" -# endif -# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST16 -# define SCNuLEAST16 "hu" -# endif -# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST16 -# define SCNxLEAST16 "hx" -# endif -# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST32 -# define SCNdLEAST32 "d" -# endif -# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST32 -# define SCNiLEAST32 "i" -# endif -# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST32 -# define SCNoLEAST32 "o" -# endif -# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST32 -# define SCNuLEAST32 "u" -# endif -# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST32 -# define SCNxLEAST32 "x" -# endif -# ifdef INT64_MAX -# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST64 -# define SCNdLEAST64 SCNd64 -# endif -# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST64 -# define SCNiLEAST64 SCNi64 -# endif +#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST8 +# define SCNdLEAST8 "hhd" +#endif +#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST8 +# define SCNiLEAST8 "hhi" +#endif +#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST8 +# define SCNoLEAST8 "hho" +#endif +#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST8 +# define SCNuLEAST8 "hhu" +#endif +#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST8 +# define SCNxLEAST8 "hhx" +#endif +#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST16 +# define SCNdLEAST16 "hd" +#endif +#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST16 +# define SCNiLEAST16 "hi" +#endif +#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST16 +# define SCNoLEAST16 "ho" +#endif +#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST16 +# define SCNuLEAST16 "hu" +#endif +#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST16 +# define SCNxLEAST16 "hx" +#endif +#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST32 +# define SCNdLEAST32 "d" +#endif +#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST32 +# define SCNiLEAST32 "i" +#endif +#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST32 +# define SCNoLEAST32 "o" +#endif +#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST32 +# define SCNuLEAST32 "u" +#endif +#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST32 +# define SCNxLEAST32 "x" +#endif +#ifdef INT64_MAX +# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST64 +# define SCNdLEAST64 SCNd64 # endif -# ifdef UINT64_MAX -# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST64 -# define SCNoLEAST64 SCNo64 -# endif -# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST64 -# define SCNuLEAST64 SCNu64 -# endif -# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST64 -# define SCNxLEAST64 SCNx64 -# endif +# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST64 +# define SCNiLEAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST64 +# define SCNoLEAST64 SCNo64 +# endif +# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST64 +# define SCNuLEAST64 SCNu64 +# endif +# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST64 +# define SCNxLEAST64 SCNx64 # endif +#endif -# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define SCNdFAST8 SCNd64 -# elif INT_FAST8_MAX == 0x7fff -# define SCNdFAST8 "hd" -# elif INT_FAST8_MAX == 0x7f -# define SCNdFAST8 "hhd" -# else -# define SCNdFAST8 "d" -# endif +#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNdFAST8 SCNd64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNdFAST8 "hd" +# elif INT_FAST8_MAX == 0x7f +# define SCNdFAST8 "hhd" +# else +# define SCNdFAST8 "d" # endif -# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define SCNiFAST8 SCNi64 -# elif INT_FAST8_MAX == 0x7fff -# define SCNiFAST8 "hi" -# elif INT_FAST8_MAX == 0x7f -# define SCNiFAST8 "hhi" -# else -# define SCNiFAST8 "i" -# endif +#endif +#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNiFAST8 SCNi64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNiFAST8 "hi" +# elif INT_FAST8_MAX == 0x7f +# define SCNiFAST8 "hhi" +# else +# define SCNiFAST8 "i" # endif -# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define SCNoFAST8 SCNo64 -# elif UINT_FAST8_MAX == 0xffff -# define SCNoFAST8 "ho" -# elif UINT_FAST8_MAX == 0xff -# define SCNoFAST8 "hho" -# else -# define SCNoFAST8 "o" -# endif +#endif +#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNoFAST8 SCNo64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNoFAST8 "ho" +# elif UINT_FAST8_MAX == 0xff +# define SCNoFAST8 "hho" +# else +# define SCNoFAST8 "o" # endif -# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define SCNuFAST8 SCNu64 -# elif UINT_FAST8_MAX == 0xffff -# define SCNuFAST8 "hu" -# elif UINT_FAST8_MAX == 0xff -# define SCNuFAST8 "hhu" -# else -# define SCNuFAST8 "u" -# endif +#endif +#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNuFAST8 SCNu64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNuFAST8 "hu" +# elif UINT_FAST8_MAX == 0xff +# define SCNuFAST8 "hhu" +# else +# define SCNuFAST8 "u" # endif -# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define SCNxFAST8 SCNx64 -# elif UINT_FAST8_MAX == 0xffff -# define SCNxFAST8 "hx" -# elif UINT_FAST8_MAX == 0xff -# define SCNxFAST8 "hhx" -# else -# define SCNxFAST8 "x" -# endif +#endif +#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNxFAST8 SCNx64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNxFAST8 "hx" +# elif UINT_FAST8_MAX == 0xff +# define SCNxFAST8 "hhx" +# else +# define SCNxFAST8 "x" # endif -# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define SCNdFAST16 SCNd64 -# elif INT_FAST16_MAX == 0x7fff -# define SCNdFAST16 "hd" -# else -# define SCNdFAST16 "d" -# endif +#endif +#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNdFAST16 SCNd64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNdFAST16 "hd" +# else +# define SCNdFAST16 "d" # endif -# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define SCNiFAST16 SCNi64 -# elif INT_FAST16_MAX == 0x7fff -# define SCNiFAST16 "hi" -# else -# define SCNiFAST16 "i" -# endif +#endif +#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNiFAST16 SCNi64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNiFAST16 "hi" +# else +# define SCNiFAST16 "i" # endif -# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define SCNoFAST16 SCNo64 -# elif UINT_FAST16_MAX == 0xffff -# define SCNoFAST16 "ho" -# else -# define SCNoFAST16 "o" -# endif +#endif +#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNoFAST16 SCNo64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNoFAST16 "ho" +# else +# define SCNoFAST16 "o" # endif -# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define SCNuFAST16 SCNu64 -# elif UINT_FAST16_MAX == 0xffff -# define SCNuFAST16 "hu" -# else -# define SCNuFAST16 "u" -# endif +#endif +#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNuFAST16 SCNu64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNuFAST16 "hu" +# else +# define SCNuFAST16 "u" # endif -# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define SCNxFAST16 SCNx64 -# elif UINT_FAST16_MAX == 0xffff -# define SCNxFAST16 "hx" -# else -# define SCNxFAST16 "x" -# endif +#endif +#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNxFAST16 SCNx64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNxFAST16 "hx" +# else +# define SCNxFAST16 "x" # endif -# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define SCNdFAST32 SCNd64 -# else -# define SCNdFAST32 "d" -# endif +#endif +#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNdFAST32 SCNd64 +# else +# define SCNdFAST32 "d" # endif -# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define SCNiFAST32 SCNi64 -# else -# define SCNiFAST32 "i" -# endif +#endif +#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNiFAST32 SCNi64 +# else +# define SCNiFAST32 "i" # endif -# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define SCNoFAST32 SCNo64 -# else -# define SCNoFAST32 "o" -# endif +#endif +#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNoFAST32 SCNo64 +# else +# define SCNoFAST32 "o" # endif -# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define SCNuFAST32 SCNu64 -# else -# define SCNuFAST32 "u" -# endif +#endif +#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNuFAST32 SCNu64 +# else +# define SCNuFAST32 "u" # endif -# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define SCNxFAST32 SCNx64 -# else -# define SCNxFAST32 "x" -# endif +#endif +#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNxFAST32 SCNx64 +# else +# define SCNxFAST32 "x" # endif -# ifdef INT64_MAX -# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST64 -# define SCNdFAST64 SCNd64 -# endif -# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST64 -# define SCNiFAST64 SCNi64 -# endif +#endif +#ifdef INT64_MAX +# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST64 +# define SCNdFAST64 SCNd64 # endif -# ifdef UINT64_MAX -# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST64 -# define SCNoFAST64 SCNo64 -# endif -# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST64 -# define SCNuFAST64 SCNu64 -# endif -# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST64 -# define SCNxFAST64 SCNx64 -# endif +# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST64 +# define SCNiFAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST64 +# define SCNoFAST64 SCNo64 # endif +# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST64 +# define SCNuFAST64 SCNu64 +# endif +# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST64 +# define SCNxFAST64 SCNx64 +# endif +#endif -# if !defined SCNdMAX || @PRI_MACROS_BROKEN@ -# undef SCNdMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define SCNdMAX SCNd64 -# else -# define SCNdMAX "ld" -# endif +#if !defined SCNdMAX || @PRI_MACROS_BROKEN@ +# undef SCNdMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" # endif -# if !defined SCNiMAX || @PRI_MACROS_BROKEN@ -# undef SCNiMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define SCNiMAX SCNi64 -# else -# define SCNiMAX "li" -# endif +#endif +#if !defined SCNiMAX || @PRI_MACROS_BROKEN@ +# undef SCNiMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" # endif -# if !defined SCNoMAX || @PRI_MACROS_BROKEN@ -# undef SCNoMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define SCNoMAX SCNo64 -# else -# define SCNoMAX "lo" -# endif +#endif +#if !defined SCNoMAX || @PRI_MACROS_BROKEN@ +# undef SCNoMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" # endif -# if !defined SCNuMAX || @PRI_MACROS_BROKEN@ -# undef SCNuMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define SCNuMAX SCNu64 -# else -# define SCNuMAX "lu" -# endif +#endif +#if !defined SCNuMAX || @PRI_MACROS_BROKEN@ +# undef SCNuMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" # endif -# if !defined SCNxMAX || @PRI_MACROS_BROKEN@ -# undef SCNxMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define SCNxMAX SCNx64 -# else -# define SCNxMAX "lx" -# endif +#endif +#if !defined SCNxMAX || @PRI_MACROS_BROKEN@ +# undef SCNxMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNxMAX SCNx64 +# else +# define SCNxMAX "lx" # endif +#endif -# if !defined SCNdPTR || @PRI_MACROS_BROKEN@ -# undef SCNdPTR -# ifdef INTPTR_MAX -# define SCNdPTR @PRIPTR_PREFIX@ "d" -# endif +#if !defined SCNdPTR || @PRI_MACROS_BROKEN@ +# undef SCNdPTR +# ifdef INTPTR_MAX +# define SCNdPTR @PRIPTR_PREFIX@ "d" # endif -# if !defined SCNiPTR || @PRI_MACROS_BROKEN@ -# undef SCNiPTR -# ifdef INTPTR_MAX -# define SCNiPTR @PRIPTR_PREFIX@ "i" -# endif +#endif +#if !defined SCNiPTR || @PRI_MACROS_BROKEN@ +# undef SCNiPTR +# ifdef INTPTR_MAX +# define SCNiPTR @PRIPTR_PREFIX@ "i" # endif -# if !defined SCNoPTR || @PRI_MACROS_BROKEN@ -# undef SCNoPTR -# ifdef UINTPTR_MAX -# define SCNoPTR @PRIPTR_PREFIX@ "o" -# endif +#endif +#if !defined SCNoPTR || @PRI_MACROS_BROKEN@ +# undef SCNoPTR +# ifdef UINTPTR_MAX +# define SCNoPTR @PRIPTR_PREFIX@ "o" # endif -# if !defined SCNuPTR || @PRI_MACROS_BROKEN@ -# undef SCNuPTR -# ifdef UINTPTR_MAX -# define SCNuPTR @PRIPTR_PREFIX@ "u" -# endif +#endif +#if !defined SCNuPTR || @PRI_MACROS_BROKEN@ +# undef SCNuPTR +# ifdef UINTPTR_MAX +# define SCNuPTR @PRIPTR_PREFIX@ "u" # endif -# if !defined SCNxPTR || @PRI_MACROS_BROKEN@ -# undef SCNxPTR -# ifdef UINTPTR_MAX -# define SCNxPTR @PRIPTR_PREFIX@ "x" -# endif +#endif +#if !defined SCNxPTR || @PRI_MACROS_BROKEN@ +# undef SCNxPTR +# ifdef UINTPTR_MAX +# define SCNxPTR @PRIPTR_PREFIX@ "x" # endif - #endif /* 7.8.2 Functions for greatest-width integer types */ @@ -1075,10 +1079,23 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " #endif #if @GNULIB_STRTOIMAX@ -# if !@HAVE_DECL_STRTOIMAX@ -# undef strtoimax -extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1)); +# if @REPLACE_STRTOIMAX@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoimax +# define strtoimax rpl_strtoimax +# endif +_GL_FUNCDECL_RPL (strtoimax, intmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int)); +# else +# if !@HAVE_DECL_STRTOIMAX@ +# undef strtoimax +_GL_FUNCDECL_SYS (strtoimax, intmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int)); # endif +_GL_CXXALIASWARN (strtoimax); #elif defined GNULIB_POSIXCHECK # undef strtoimax # if HAVE_RAW_DECL_STRTOIMAX @@ -1090,8 +1107,11 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " #if @GNULIB_STRTOUMAX@ # if !@HAVE_DECL_STRTOUMAX@ # undef strtoumax -extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1)); +_GL_FUNCDECL_SYS (strtoumax, uintmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); # endif +_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); +_GL_CXXALIASWARN (strtoumax); #elif defined GNULIB_POSIXCHECK # undef strtoumax # if HAVE_RAW_DECL_STRTOUMAX diff --git a/gl/tests/ioctl.c b/gl/tests/ioctl.c index c6ba989ee5..8701b7a7ef 100644 --- a/gl/tests/ioctl.c +++ b/gl/tests/ioctl.c @@ -1,6 +1,6 @@ /* ioctl.c --- wrappers for Windows ioctl function - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/lstat.c b/gl/tests/lstat.c index d786288f2b..db119a10d3 100644 --- a/gl/tests/lstat.c +++ b/gl/tests/lstat.c @@ -1,6 +1,6 @@ /* Work around a bug of lstat on some systems - Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,11 +51,11 @@ orig_lstat (const char *filename, struct stat *buf) # include <errno.h> /* lstat works differently on Linux and Solaris systems. POSIX (see - `pathname resolution' in the glossary) requires that programs like - `ls' take into consideration the fact that FILE has a trailing slash + "pathname resolution" in the glossary) requires that programs like + 'ls' take into consideration the fact that FILE has a trailing slash when FILE is a symbolic link. On Linux and Solaris 10 systems, the lstat function already has the desired semantics (in treating - `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)', + 'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)', but on Solaris 9 and earlier it does not. If FILE has a trailing slash and specifies a symbolic link, diff --git a/gl/tests/macros.h b/gl/tests/macros.h index adb3744d5c..77a92f8db8 100644 --- a/gl/tests/macros.h +++ b/gl/tests/macros.h @@ -1,5 +1,5 @@ /* Common macros used by gnulib tests. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/malloca.c b/gl/tests/malloca.c index ce071f13a7..3309088e5c 100644 --- a/gl/tests/malloca.c +++ b/gl/tests/malloca.c @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software; you can redistribute it and/or modify diff --git a/gl/tests/malloca.h b/gl/tests/malloca.h index 7083a58f5b..725cc2261b 100644 --- a/gl/tests/malloca.h +++ b/gl/tests/malloca.h @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software; you can redistribute it and/or modify diff --git a/gl/tests/minus-zero.h b/gl/tests/minus-zero.h index 942978119e..491cef3872 100644 --- a/gl/tests/minus-zero.h +++ b/gl/tests/minus-zero.h @@ -1,5 +1,5 @@ /* Macros for floating-point negative zero. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/nan.h b/gl/tests/nan.h index eb5fd95931..2f75da1574 100644 --- a/gl/tests/nan.h +++ b/gl/tests/nan.h @@ -1,5 +1,5 @@ /* Macros for not-a-number. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/open.c b/gl/tests/open.c index 8dc36ef1e4..27801b916c 100644 --- a/gl/tests/open.c +++ b/gl/tests/open.c @@ -1,5 +1,5 @@ /* Open a descriptor to a file. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/pathmax.h b/gl/tests/pathmax.h index c47618a1b6..0fd9296ad5 100644 --- a/gl/tests/pathmax.h +++ b/gl/tests/pathmax.h @@ -1,5 +1,5 @@ /* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/tests/perror.c b/gl/tests/perror.c index af4b56cd40..4853d1b14a 100644 --- a/gl/tests/perror.c +++ b/gl/tests/perror.c @@ -1,5 +1,5 @@ /* Print a message describing error code. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/pipe.c b/gl/tests/pipe.c index 425dd70ef4..eb05f44b06 100644 --- a/gl/tests/pipe.c +++ b/gl/tests/pipe.c @@ -1,5 +1,5 @@ /* Create a pipe. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/putenv.c b/gl/tests/putenv.c index 2da33760b9..3c0f7ead33 100644 --- a/gl/tests/putenv.c +++ b/gl/tests/putenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software +/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2012 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C @@ -43,7 +43,7 @@ extern char **environ; #endif #if _LIBC -/* This lock protects against simultaneous modifications of `environ'. */ +/* This lock protects against simultaneous modifications of 'environ'. */ # include <bits/libc-lock.h> __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) @@ -91,7 +91,7 @@ _unsetenv (const char *name) /* Put STRING, which is of the form "NAME=VALUE", in the environment. - If STRING contains no `=', then remove STRING from the environment. */ + If STRING contains no '=', then remove STRING from the environment. */ int putenv (char *string) { diff --git a/gl/tests/same-inode.h b/gl/tests/same-inode.h index d434b94369..8c3900d041 100644 --- a/gl/tests/same-inode.h +++ b/gl/tests/same-inode.h @@ -1,6 +1,6 @@ /* Determine whether two stat buffers refer to the same file. - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,8 +18,16 @@ #ifndef SAME_INODE_H # define SAME_INODE_H 1 -# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ - ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ - && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) +# ifdef __VMS +# define SAME_INODE(a, b) \ + ((a).st_ino[0] == (b).st_ino[0] \ + && (a).st_ino[1] == (b).st_ino[1] \ + && (a).st_ino[2] == (b).st_ino[2] \ + && (a).st_dev == (b).st_dev) +# else +# define SAME_INODE(a, b) \ + ((a).st_ino == (b).st_ino \ + && (a).st_dev == (b).st_dev) +# endif #endif diff --git a/gl/tests/setenv.c b/gl/tests/setenv.c index 0a5f67dd04..8201be2eb2 100644 --- a/gl/tests/setenv.c +++ b/gl/tests/setenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2011 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2003, 2005-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -49,7 +49,7 @@ #endif #if _LIBC -/* This lock protects against simultaneous modifications of `environ'. */ +/* This lock protects against simultaneous modifications of 'environ'. */ # include <bits/libc-lock.h> __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) @@ -103,11 +103,11 @@ static void *known_values; static char **last_environ; -/* This function is used by `setenv' and `putenv'. The difference between +/* This function is used by 'setenv' and 'putenv'. The difference between the two functions is that for the former must create a new string which - is then placed in the environment, while the argument of `putenv' + is then placed in the environment, while the argument of 'putenv' must be used directly. This is all complicated by the fact that we try - to reuse values once generated for a `setenv' call since we can never + to reuse values once generated for a 'setenv' call since we can never free the strings. */ int __add_to_environ (const char *name, const char *value, const char *combined, @@ -299,7 +299,7 @@ setenv (const char *name, const char *value, int replace) return __add_to_environ (name, value, NULL, replace); } -/* The `clearenv' was planned to be added to POSIX.1 but probably +/* The 'clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ int diff --git a/gl/tests/signature.h b/gl/tests/signature.h index 8256989d0e..d9d8b4711b 100644 --- a/gl/tests/signature.h +++ b/gl/tests/signature.h @@ -1,5 +1,5 @@ /* Macro for checking that a function declaration is compliant. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/stat.c b/gl/tests/stat.c index 1397aa9329..9ea53c1c0c 100644 --- a/gl/tests/stat.c +++ b/gl/tests/stat.c @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/strerror_r.c b/gl/tests/strerror_r.c index e6cf99b254..be76b0d37a 100644 --- a/gl/tests/strerror_r.c +++ b/gl/tests/strerror_r.c @@ -1,6 +1,6 @@ /* strerror_r.c --- POSIX compatible system error routine - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -241,13 +241,13 @@ strerror_r (int errnum, char *buf, size_t buflen) /* Try to do what strerror (errnum) does, but without clobbering the buffer used by strerror(). */ -# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Win32, Cygwin */ +# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */ - /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE - and <errno.h> above. - HP-UX: sys_nerr, sys_errlist are declared explicitly above. - native Win32: sys_nerr, sys_errlist are declared in <stdlib.h>. - Cygwin: sys_nerr, sys_errlist are declared in <errno.h>. */ + /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE + and <errno.h> above. + HP-UX: sys_nerr, sys_errlist are declared explicitly above. + native Windows: sys_nerr, sys_errlist are declared in <stdlib.h>. + Cygwin: sys_nerr, sys_errlist are declared in <errno.h>. */ if (errnum >= 0 && errnum < sys_nerr) { # if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) diff --git a/gl/tests/symlink.c b/gl/tests/symlink.c index 2896cc9655..642ca66b66 100644 --- a/gl/tests/symlink.c +++ b/gl/tests/symlink.c @@ -1,5 +1,5 @@ /* Stub for symlink(). - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/sys_ioctl.in.h b/gl/tests/sys_ioctl.in.h index dc8aedabe0..f213411e46 100644 --- a/gl/tests/sys_ioctl.in.h +++ b/gl/tests/sys_ioctl.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around <sys/ioctl.h>. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-accept.c b/gl/tests/test-accept.c index 75161a454c..201e130a78 100644 --- a/gl/tests/test-accept.c +++ b/gl/tests/test-accept.c @@ -1,5 +1,5 @@ /* Test accepting a connection to a server socket. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-alloca-opt.c b/gl/tests/test-alloca-opt.c index 5aa16455d0..4e814c6f2c 100644 --- a/gl/tests/test-alloca-opt.c +++ b/gl/tests/test-alloca-opt.c @@ -1,5 +1,5 @@ /* Test of optional automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-argp-2.sh b/gl/tests/test-argp-2.sh index 20e0d9e8e5..49eff9c55c 100755 --- a/gl/tests/test-argp-2.sh +++ b/gl/tests/test-argp-2.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for argp. -# Copyright (C) 2006-2011 Free Software Foundation, Inc. +# Copyright (C) 2006-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-argp.c b/gl/tests/test-argp.c index 8fab727c9a..6ba55e94d2 100644 --- a/gl/tests/test-argp.c +++ b/gl/tests/test-argp.c @@ -1,5 +1,5 @@ /* Test suite for argp. - Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNUlib Library. This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-arpa_inet.c b/gl/tests/test-arpa_inet.c index ce7d19fab2..bda6709593 100644 --- a/gl/tests/test-arpa_inet.c +++ b/gl/tests/test-arpa_inet.c @@ -1,5 +1,5 @@ /* Test of <arpa/inet.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-binary-io.c b/gl/tests/test-binary-io.c index 8e5d193f69..c695454ecd 100644 --- a/gl/tests/test-binary-io.c +++ b/gl/tests/test-binary-io.c @@ -1,5 +1,5 @@ /* Test of binary mode I/O. - Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,19 +46,10 @@ main () exit (1); ASSERT (statbuf.st_size == 6); } - unlink ("t-bin-out2.tmp"); /* Test the SET_BINARY macro. */ SET_BINARY (1); fputs ("Hello\n", stdout); - fclose (stdout); - fclose (stderr); - { - struct stat statbuf; - if (stat ("t-bin-out1.tmp", &statbuf) < 0) - exit (1); - ASSERT (statbuf.st_size == 6); - } return 0; } diff --git a/gl/tests/test-binary-io.sh b/gl/tests/test-binary-io.sh index 33e128c309..272edef179 100755 --- a/gl/tests/test-binary-io.sh +++ b/gl/tests/test-binary-io.sh @@ -5,6 +5,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp" ./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1 +cmp t-bin-out1.tmp t-bin-out2.tmp > /dev/null || exit 1 rm -fr $tmpfiles diff --git a/gl/tests/test-bind.c b/gl/tests/test-bind.c index 490c2fb47d..b4b5739121 100644 --- a/gl/tests/test-bind.c +++ b/gl/tests/test-bind.c @@ -1,5 +1,5 @@ /* Test binding a server socket to a port. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-byteswap.c b/gl/tests/test-byteswap.c index e9878b3c7b..9893b1d270 100644 --- a/gl/tests/test-byteswap.c +++ b/gl/tests/test-byteswap.c @@ -1,5 +1,5 @@ /* Test of <byteswap.h> substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-c-ctype.c b/gl/tests/test-c-ctype.c index 9d748ffe88..a9cb655266 100644 --- a/gl/tests/test-c-ctype.c +++ b/gl/tests/test-c-ctype.c @@ -1,5 +1,5 @@ /* Test of character handling in C locale. - Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-close.c b/gl/tests/test-close.c index 2b87db1d0f..83f71c06c2 100644 --- a/gl/tests/test-close.c +++ b/gl/tests/test-close.c @@ -1,5 +1,5 @@ /* Test closing a file or socket. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-connect.c b/gl/tests/test-connect.c index 84f00b5425..6e43bf88f2 100644 --- a/gl/tests/test-connect.c +++ b/gl/tests/test-connect.c @@ -1,5 +1,5 @@ /* Test connecting a client socket. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-dirent.c b/gl/tests/test-dirent.c index 212644abf6..24e175927a 100644 --- a/gl/tests/test-dirent.c +++ b/gl/tests/test-dirent.c @@ -1,5 +1,5 @@ /* Test of <dirent.h> substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-dup2.c b/gl/tests/test-dup2.c index a14807a36e..5043c0c5bf 100644 --- a/gl/tests/test-dup2.c +++ b/gl/tests/test-dup2.c @@ -1,5 +1,5 @@ /* Test duplicating file descriptors. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ SIGNATURE_CHECK (dup2, int, (int, int)); #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ @@ -47,7 +47,7 @@ static int is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -65,7 +65,7 @@ static int is_inheritable (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); diff --git a/gl/tests/test-environ.c b/gl/tests/test-environ.c index 11df789611..972ed06dcd 100644 --- a/gl/tests/test-environ.c +++ b/gl/tests/test-environ.c @@ -1,5 +1,5 @@ /* Test of environ variable. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-errno.c b/gl/tests/test-errno.c index 7851c22d0f..d9a030f448 100644 --- a/gl/tests/test-errno.c +++ b/gl/tests/test-errno.c @@ -1,5 +1,5 @@ /* Test of <errno.h> substitute. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fcntl-h.c b/gl/tests/test-fcntl-h.c index 7f350b46f1..00c5468dff 100644 --- a/gl/tests/test-fcntl-h.c +++ b/gl/tests/test-fcntl-h.c @@ -1,5 +1,5 @@ /* Test of <fcntl.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fdopen.c b/gl/tests/test-fdopen.c index 304e520a4c..8e2f7bfe2b 100644 --- a/gl/tests/test-fdopen.c +++ b/gl/tests/test-fdopen.c @@ -1,5 +1,5 @@ /* Test opening a stream with a file descriptor. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fgetc.c b/gl/tests/test-fgetc.c index 4df46fb6e3..669a71ee2b 100644 --- a/gl/tests/test-fgetc.c +++ b/gl/tests/test-fgetc.c @@ -1,5 +1,5 @@ /* Test of fgetc() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-float.c b/gl/tests/test-float.c index 57a472faea..f3691be5e1 100644 --- a/gl/tests/test-float.c +++ b/gl/tests/test-float.c @@ -1,5 +1,5 @@ /* Test of <float.h> substitute. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -298,14 +298,7 @@ test_long_double (void) /* Check that 'long double' is at least as wide as 'double'. */ ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG); - - /* Normally, we would also assert this: - ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP); - but at least on powerpc64 with gcc-4.4.4, it would fail: - $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP' - #define __DBL_MIN_EXP__ (-1021) - #define __LDBL_MIN_EXP__ (-968) - */ + ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG); ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP); /* Check the value of LDBL_DIG. */ diff --git a/gl/tests/test-fprintf-posix.h b/gl/tests/test-fprintf-posix.h index e0fa537071..561c69fd9c 100644 --- a/gl/tests/test-fprintf-posix.h +++ b/gl/tests/test-fprintf-posix.h @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() and sprintf() functions. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fputc.c b/gl/tests/test-fputc.c index 03a371627c..924c2225f2 100644 --- a/gl/tests/test-fputc.c +++ b/gl/tests/test-fputc.c @@ -1,5 +1,5 @@ /* Test of fputc() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fread.c b/gl/tests/test-fread.c index e205c9e6ec..fd2ac8342d 100644 --- a/gl/tests/test-fread.c +++ b/gl/tests/test-fread.c @@ -1,5 +1,5 @@ /* Test of fread() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-frexp.c b/gl/tests/test-frexp.c index a7ec639df6..7158c8f109 100644 --- a/gl/tests/test-frexp.c +++ b/gl/tests/test-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-frexpl.c b/gl/tests/test-frexpl.c index 905b293a1d..ca28f8a1c0 100644 --- a/gl/tests/test-frexpl.c +++ b/gl/tests/test-frexpl.c @@ -1,5 +1,5 @@ /* Test of splitting a 'long double' into fraction and mantissa. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fseek.c b/gl/tests/test-fseek.c index 150b5f0e24..1dc03c536f 100644 --- a/gl/tests/test-fseek.c +++ b/gl/tests/test-fseek.c @@ -1,5 +1,5 @@ /* Test of fseek() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fseeko.c b/gl/tests/test-fseeko.c index ad5eec8de9..d2b348e173 100644 --- a/gl/tests/test-fseeko.c +++ b/gl/tests/test-fseeko.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fseeko3.c b/gl/tests/test-fseeko3.c index 41f2233d00..ffeb50f83a 100644 --- a/gl/tests/test-fseeko3.c +++ b/gl/tests/test-fseeko3.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fseeko4.c b/gl/tests/test-fseeko4.c index 61559e1429..3642d3cb39 100644 --- a/gl/tests/test-fseeko4.c +++ b/gl/tests/test-fseeko4.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fseterr.c b/gl/tests/test-fseterr.c index cbd97faf45..611b0e421f 100644 --- a/gl/tests/test-fseterr.c +++ b/gl/tests/test-fseterr.c @@ -1,5 +1,5 @@ /* Test setting the error indicator of a stream. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fstat.c b/gl/tests/test-fstat.c index 6c120d9dd5..7f3c3c46dd 100644 --- a/gl/tests/test-fstat.c +++ b/gl/tests/test-fstat.c @@ -1,5 +1,5 @@ /* Tests of fstat() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-ftell.c b/gl/tests/test-ftell.c index 54ede0515c..08c76aa9f8 100644 --- a/gl/tests/test-ftell.c +++ b/gl/tests/test-ftell.c @@ -1,5 +1,5 @@ /* Test of ftell() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-ftell3.c b/gl/tests/test-ftell3.c index a5167efe3a..9d225a3779 100644 --- a/gl/tests/test-ftell3.c +++ b/gl/tests/test-ftell3.c @@ -1,5 +1,5 @@ /* Test of ftell() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-ftello.c b/gl/tests/test-ftello.c index 636da81190..5df97cf49e 100644 --- a/gl/tests/test-ftello.c +++ b/gl/tests/test-ftello.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-ftello3.c b/gl/tests/test-ftello3.c index 50d4b882fd..6908addec5 100644 --- a/gl/tests/test-ftello3.c +++ b/gl/tests/test-ftello3.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-ftello4.c b/gl/tests/test-ftello4.c index d503f71389..7c46d0c242 100644 --- a/gl/tests/test-ftello4.c +++ b/gl/tests/test-ftello4.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-ftruncate.c b/gl/tests/test-ftruncate.c index c5da4eb24d..9a85314aaa 100644 --- a/gl/tests/test-ftruncate.c +++ b/gl/tests/test-ftruncate.c @@ -1,5 +1,5 @@ /* Test truncating a file. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-func.c b/gl/tests/test-func.c index 19de6d3ada..07671040dc 100644 --- a/gl/tests/test-func.c +++ b/gl/tests/test-func.c @@ -1,5 +1,5 @@ /* Test whether __func__ is available - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-fwrite.c b/gl/tests/test-fwrite.c index 76ed05c5ef..d69f463e16 100644 --- a/gl/tests/test-fwrite.c +++ b/gl/tests/test-fwrite.c @@ -1,5 +1,5 @@ /* Test of fwrite() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getaddrinfo.c b/gl/tests/test-getaddrinfo.c new file mode 100644 index 0000000000..512319603f --- /dev/null +++ b/gl/tests/test-getaddrinfo.c @@ -0,0 +1,168 @@ +/* Test the getaddrinfo module. + + Copyright (C) 2006-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Simon Josefsson. */ + +#include <config.h> + +#include <netdb.h> + +#include "signature.h" +SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *)); +SIGNATURE_CHECK (gai_strerror, char const *, (int)); +SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *, + struct addrinfo const *, + struct addrinfo **)); + +#include <arpa/inet.h> +#include <errno.h> +#include <netinet/in.h> +#include <stdio.h> +#include <string.h> + +/* Whether to print debugging messages. */ +#define ENABLE_DEBUGGING 0 + +#if ENABLE_DEBUGGING +# define dbgprintf printf +#else +# define dbgprintf if (0) printf +#endif + +/* BeOS does not have AF_UNSPEC. */ +#ifndef AF_UNSPEC +# define AF_UNSPEC 0 +#endif + +#ifndef EAI_SERVICE +# define EAI_SERVICE 0 +#endif + +static int +simple (char const *host, char const *service) +{ + char buf[BUFSIZ]; + static int skip = 0; + struct addrinfo hints; + struct addrinfo *ai0, *ai; + int res; + int err; + + /* Once we skipped the test, do not try anything else */ + if (skip) + return 0; + + dbgprintf ("Finding %s service %s...\n", host, service); + + /* This initializes "hints" but does not use it. Is there a reason + for this? If so, please fix this comment. */ + memset (&hints, 0, sizeof (hints)); + hints.ai_flags = AI_CANONNAME; + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + + res = getaddrinfo (host, service, 0, &ai0); + err = errno; + + dbgprintf ("res %d: %s\n", res, gai_strerror (res)); + + if (res != 0) + { + /* EAI_AGAIN is returned if no network is available. Don't fail + the test merely because someone is down the country on their + in-law's farm. */ + if (res == EAI_AGAIN) + { + skip++; + fprintf (stderr, "skipping getaddrinfo test: no network?\n"); + return 77; + } + /* IRIX reports EAI_NONAME for "https". Don't fail the test + merely because of this. */ + if (res == EAI_NONAME) + return 0; + /* Solaris reports EAI_SERVICE for "http" and "https". Don't + fail the test merely because of this. */ + if (res == EAI_SERVICE) + return 0; +#ifdef EAI_NODATA + /* AIX reports EAI_NODATA for "https". Don't fail the test + merely because of this. */ + if (res == EAI_NODATA) + return 0; +#endif + /* Provide details if errno was set. */ + if (res == EAI_SYSTEM) + fprintf (stderr, "system error: %s\n", strerror (err)); + + return 1; + } + + for (ai = ai0; ai; ai = ai->ai_next) + { + dbgprintf ("\tflags %x\n", ai->ai_flags); + dbgprintf ("\tfamily %x\n", ai->ai_family); + dbgprintf ("\tsocktype %x\n", ai->ai_socktype); + dbgprintf ("\tprotocol %x\n", ai->ai_protocol); + dbgprintf ("\taddrlen %ld: ", (unsigned long) ai->ai_addrlen); + dbgprintf ("\tFound %s\n", + inet_ntop (ai->ai_family, + &((struct sockaddr_in *) + ai->ai_addr)->sin_addr, + buf, sizeof (buf) - 1)); + if (ai->ai_canonname) + dbgprintf ("\tFound %s...\n", ai->ai_canonname); + + { + char ipbuf[BUFSIZ]; + char portbuf[BUFSIZ]; + + res = getnameinfo (ai->ai_addr, ai->ai_addrlen, + ipbuf, sizeof (ipbuf) - 1, + portbuf, sizeof (portbuf) - 1, + NI_NUMERICHOST|NI_NUMERICSERV); + dbgprintf ("\t\tgetnameinfo %d: %s\n", res, gai_strerror (res)); + if (res == 0) + { + dbgprintf ("\t\tip %s\n", ipbuf); + dbgprintf ("\t\tport %s\n", portbuf); + } + } + + } + + freeaddrinfo (ai0); + + return 0; +} + +#define HOST1 "www.gnu.org" +#define SERV1 "http" +#define HOST2 "www.ibm.com" +#define SERV2 "https" +#define HOST3 "microsoft.com" +#define SERV3 "http" +#define HOST4 "google.org" +#define SERV4 "ldap" + +int main (void) +{ + return simple (HOST1, SERV1) + + simple (HOST2, SERV2) + + simple (HOST3, SERV3) + + simple (HOST4, SERV4); +} diff --git a/gl/tests/test-getcwd-lgpl.c b/gl/tests/test-getcwd-lgpl.c index 69a7b90ecb..3010760b2c 100644 --- a/gl/tests/test-getcwd-lgpl.c +++ b/gl/tests/test-getcwd-lgpl.c @@ -1,5 +1,5 @@ /* Test of getcwd() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getdelim.c b/gl/tests/test-getdelim.c index f4d1c9d506..08c619797b 100644 --- a/gl/tests/test-getdelim.c +++ b/gl/tests/test-getdelim.c @@ -1,5 +1,5 @@ /* Test of getdelim() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getline.c b/gl/tests/test-getline.c index bead4b6aad..d8bb8a3007 100644 --- a/gl/tests/test-getline.c +++ b/gl/tests/test-getline.c @@ -1,5 +1,5 @@ /* Test of getline() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getopt.c b/gl/tests/test-getopt.c index 69f2cfa748..e08a834cb8 100644 --- a/gl/tests/test-getopt.c +++ b/gl/tests/test-getopt.c @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getopt.h b/gl/tests/test-getopt.h index f7b3911309..978b753c58 100644 --- a/gl/tests/test-getopt.h +++ b/gl/tests/test-getopt.h @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getopt_long.h b/gl/tests/test-getopt_long.h index c1035b1664..9d55c65325 100644 --- a/gl/tests/test-getopt_long.h +++ b/gl/tests/test-getopt_long.h @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-getpeername.c b/gl/tests/test-getpeername.c index 1ccd9b4596..f15b32f1cc 100644 --- a/gl/tests/test-getpeername.c +++ b/gl/tests/test-getpeername.c @@ -1,5 +1,5 @@ /* Test getpeername() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-gettimeofday.c b/gl/tests/test-gettimeofday.c index 7d09fc3ad0..4a9d2640a7 100644 --- a/gl/tests/test-gettimeofday.c +++ b/gl/tests/test-gettimeofday.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + * Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. * Written by Jim Meyering. * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-ignore-value.c b/gl/tests/test-ignore-value.c index 6953f4cadf..f036134c46 100644 --- a/gl/tests/test-ignore-value.c +++ b/gl/tests/test-ignore-value.c @@ -1,6 +1,6 @@ /* Test the "ignore-value" module. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-inet_ntop.c b/gl/tests/test-inet_ntop.c index ebb7c1c093..34de5f608e 100644 --- a/gl/tests/test-inet_ntop.c +++ b/gl/tests/test-inet_ntop.c @@ -1,5 +1,5 @@ /* Test of inet_ntop function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-inet_pton.c b/gl/tests/test-inet_pton.c index 49c140cae6..844908c749 100644 --- a/gl/tests/test-inet_pton.c +++ b/gl/tests/test-inet_pton.c @@ -1,5 +1,5 @@ /* Test of inet_pton function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-init.sh b/gl/tests/test-init.sh new file mode 100755 index 0000000000..3368a99acc --- /dev/null +++ b/gl/tests/test-init.sh @@ -0,0 +1,74 @@ +#!/bin/sh +# Unit tests for init.sh +# Copyright (C) 2011-2012 Free Software Foundation, Inc. +# This file is part of the GNUlib Library. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . + +fail=0 + +test_compare() +{ + touch empty || fail=1 + echo xyz > in || fail=1 + + compare /dev/null /dev/null >out 2>err || fail=1 + test -s out && fail_ "out not empty: $(cat out)" + # "err" should be empty, too, but has "set -x" output when VERBOSE=yes + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare /dev/null empty >out 2>err || fail=1 + test -s out && fail_ "out not empty: $(cat out)" + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare in in >out 2>err || fail=1 + test -s out && fail_ "out not empty: $(cat out)" + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare /dev/null in >out 2>err && fail=1 + cat <<\EOF > exp +diff -u /dev/null in +--- /dev/null 1970-01-01 ++++ in 1970-01-01 ++xyz +EOF + compare exp out || fail=1 + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare empty in >out 2>err && fail=1 + # Remove the TAB-date suffix on each --- and +++ line, + # for both the expected and the actual output files. + # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ: + # -@@ -0,0 +1 @@ + # +@@ -1,0 +1,1 @@ + cat <<\EOF > exp +--- empty ++++ in ++xyz +EOF + sed 's/ .*//;/^@@/d' out > k && mv k out + + # Compare against expected output only if compare is using diff -u. + if (diff -u out out < /dev/null) > /dev/null 2>&1; then + compare exp out || fail=1 + fi + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac +} + +test_compare + +Exit $fail diff --git a/gl/tests/test-intprops.c b/gl/tests/test-intprops.c index 1a34d77bf5..aeb116813f 100644 --- a/gl/tests/test-intprops.c +++ b/gl/tests/test-intprops.c @@ -1,5 +1,5 @@ /* Test intprops.h. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-inttypes.c b/gl/tests/test-inttypes.c index 5bf952c424..698d3dc82b 100644 --- a/gl/tests/test-inttypes.c +++ b/gl/tests/test-inttypes.c @@ -1,5 +1,5 @@ /* Test of <inttypes.h> substitute. - Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,9 +18,6 @@ #include <config.h> -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ #include <inttypes.h> #include <stddef.h> diff --git a/gl/tests/test-ioctl.c b/gl/tests/test-ioctl.c index 130ee427c4..c3aadce8bd 100644 --- a/gl/tests/test-ioctl.c +++ b/gl/tests/test-ioctl.c @@ -1,5 +1,5 @@ /* Test of ioctl() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-isnand-nolibm.c b/gl/tests/test-isnand-nolibm.c index d120459234..d35e9b34c3 100644 --- a/gl/tests/test-isnand-nolibm.c +++ b/gl/tests/test-isnand-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnand() substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-isnand.h b/gl/tests/test-isnand.h index 181e36ff05..52d35bf41f 100644 --- a/gl/tests/test-isnand.h +++ b/gl/tests/test-isnand.h @@ -1,5 +1,5 @@ /* Test of isnand() substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-isnanf-nolibm.c b/gl/tests/test-isnanf-nolibm.c index 6d720be911..cef9925026 100644 --- a/gl/tests/test-isnanf-nolibm.c +++ b/gl/tests/test-isnanf-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnanf() substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-isnanf.h b/gl/tests/test-isnanf.h index 4a33508e4a..10adf30208 100644 --- a/gl/tests/test-isnanf.h +++ b/gl/tests/test-isnanf.h @@ -1,5 +1,5 @@ /* Test of isnanf() substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-isnanl-nolibm.c b/gl/tests/test-isnanl-nolibm.c index 532208782e..96159f82a0 100644 --- a/gl/tests/test-isnanl-nolibm.c +++ b/gl/tests/test-isnanl-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-isnanl.h b/gl/tests/test-isnanl.h index 9f1d763c21..8a9e684f9d 100644 --- a/gl/tests/test-isnanl.h +++ b/gl/tests/test-isnanl.h @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-listen.c b/gl/tests/test-listen.c index becc453307..3ea82d4bac 100644 --- a/gl/tests/test-listen.c +++ b/gl/tests/test-listen.c @@ -1,5 +1,5 @@ /* Test listen() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-lock.c b/gl/tests/test-lock.c index 3f8846bc22..06bb3df6ec 100644 --- a/gl/tests/test-lock.c +++ b/gl/tests/test-lock.c @@ -1,5 +1,5 @@ /* Test of locking in multithreaded situations. - Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ #include <config.h> -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 @@ -29,8 +29,8 @@ #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif -#if USE_WIN32_THREADS -# define TEST_WIN32_THREADS 1 +#if USE_WINDOWS_THREADS +# define TEST_WINDOWS_THREADS 1 #endif /* Whether to enable locking. @@ -69,7 +69,7 @@ # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS -# undef USE_WIN32_THREADS +# undef USE_WINDOWS_THREADS #endif #include "glthread/lock.h" @@ -83,8 +83,8 @@ # if TEST_PTH_THREADS # define USE_PTH_THREADS 1 # endif -# if TEST_WIN32_THREADS -# define USE_WIN32_THREADS 1 +# if TEST_WINDOWS_THREADS +# define USE_WINDOWS_THREADS 1 # endif #endif diff --git a/gl/tests/test-lstat.c b/gl/tests/test-lstat.c index 372e05653d..459bf88793 100644 --- a/gl/tests/test-lstat.c +++ b/gl/tests/test-lstat.c @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-lstat.h b/gl/tests/test-lstat.h index 883c4e8c0b..4a81494691 100644 --- a/gl/tests/test-lstat.h +++ b/gl/tests/test-lstat.h @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-malloc-gnu.c b/gl/tests/test-malloc-gnu.c index c2a3d6b66a..16b3a0a3dd 100644 --- a/gl/tests/test-malloc-gnu.c +++ b/gl/tests/test-malloc-gnu.c @@ -1,5 +1,5 @@ /* Test of malloc function. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-malloca.c b/gl/tests/test-malloca.c index 92c86f206c..d7732c32c8 100644 --- a/gl/tests/test-malloca.c +++ b/gl/tests/test-malloca.c @@ -1,5 +1,5 @@ /* Test of safe automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-math.c b/gl/tests/test-math.c index 8565925f66..f6e61a782a 100644 --- a/gl/tests/test-math.c +++ b/gl/tests/test-math.c @@ -1,5 +1,5 @@ /* Test of <math.h> substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-memchr.c b/gl/tests/test-memchr.c index a11f6cdb97..1298c272d0 100644 --- a/gl/tests/test-memchr.c +++ b/gl/tests/test-memchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2012 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-netdb.c b/gl/tests/test-netdb.c index 13a8925fbe..2312f3f96f 100644 --- a/gl/tests/test-netdb.c +++ b/gl/tests/test-netdb.c @@ -1,5 +1,5 @@ /* Test of <netdb.h> substitute. - Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-netinet_in.c b/gl/tests/test-netinet_in.c index b1edc66add..d318e4728b 100644 --- a/gl/tests/test-netinet_in.c +++ b/gl/tests/test-netinet_in.c @@ -1,5 +1,5 @@ /* Test of <netinet/in.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-open.c b/gl/tests/test-open.c index 3c5b2abdbb..b9ec9bfafe 100644 --- a/gl/tests/test-open.c +++ b/gl/tests/test-open.c @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-open.h b/gl/tests/test-open.h index 2ba5d137bf..cab1d27d9b 100644 --- a/gl/tests/test-open.h +++ b/gl/tests/test-open.h @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-pathmax.c b/gl/tests/test-pathmax.c index 96a1364cc0..c6d0ccc5ae 100644 --- a/gl/tests/test-pathmax.c +++ b/gl/tests/test-pathmax.c @@ -1,5 +1,5 @@ /* Test of "pathmax.h". - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-perror.c b/gl/tests/test-perror.c index d3751d8976..dbbeb33c2f 100644 --- a/gl/tests/test-perror.c +++ b/gl/tests/test-perror.c @@ -1,5 +1,5 @@ /* Test of perror() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-perror2.c b/gl/tests/test-perror2.c index e230f92320..446bce9cd0 100644 --- a/gl/tests/test-perror2.c +++ b/gl/tests/test-perror2.c @@ -1,5 +1,5 @@ /* Test of perror() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-pipe.c b/gl/tests/test-pipe.c index 90f41f9107..ebee8052d8 100644 --- a/gl/tests/test-pipe.c +++ b/gl/tests/test-pipe.c @@ -1,5 +1,5 @@ /* Test of pipe. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ SIGNATURE_CHECK (pipe, int, (int[2])); #include <stdbool.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ @@ -41,7 +41,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; diff --git a/gl/tests/test-printf-frexp.c b/gl/tests/test-printf-frexp.c index d1b0d846f7..d144a5267b 100644 --- a/gl/tests/test-printf-frexp.c +++ b/gl/tests/test-printf-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-printf-frexpl.c b/gl/tests/test-printf-frexpl.c index 4e9704f977..ac77781803 100644 --- a/gl/tests/test-printf-frexpl.c +++ b/gl/tests/test-printf-frexpl.c @@ -1,5 +1,5 @@ /* Test of splitting a 'long double' into fraction and mantissa. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-printf-posix.h b/gl/tests/test-printf-posix.h index 3d29212116..53ef90593a 100644 --- a/gl/tests/test-printf-posix.h +++ b/gl/tests/test-printf-posix.h @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() and sprintf() functions. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-rawmemchr.c b/gl/tests/test-rawmemchr.c index be8feacf9b..9e31500ec8 100644 --- a/gl/tests/test-rawmemchr.c +++ b/gl/tests/test-rawmemchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2012 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-read-file.c b/gl/tests/test-read-file.c index de7a0bb9f3..aec3c4b054 100644 --- a/gl/tests/test-read-file.c +++ b/gl/tests/test-read-file.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2007, 2010-2011 Free Software Foundation, Inc. + * Copyright (C) 2006-2007, 2010-2012 Free Software Foundation, Inc. * Written by Simon Josefsson * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-recv.c b/gl/tests/test-recv.c index ae811b6658..a147d5d1b8 100644 --- a/gl/tests/test-recv.c +++ b/gl/tests/test-recv.c @@ -1,5 +1,5 @@ /* Test the recv() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-recvfrom.c b/gl/tests/test-recvfrom.c index 069b9cf0d7..144762039e 100644 --- a/gl/tests/test-recvfrom.c +++ b/gl/tests/test-recvfrom.c @@ -1,5 +1,5 @@ /* Test the recvfrom() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-select-fd.c b/gl/tests/test-select-fd.c index de2f3e9c46..32df4b788b 100644 --- a/gl/tests/test-select-fd.c +++ b/gl/tests/test-select-fd.c @@ -1,5 +1,5 @@ /* Test of select() substitute, reading or writing from a given file descriptor. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-select-stdin.c b/gl/tests/test-select-stdin.c index 5a6f81a86a..75dd855dbf 100644 --- a/gl/tests/test-select-stdin.c +++ b/gl/tests/test-select-stdin.c @@ -1,5 +1,5 @@ /* Test of select() substitute, reading from stdin. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-select.c b/gl/tests/test-select.c index 9c6fb9dbc7..f6e193ed76 100644 --- a/gl/tests/test-select.c +++ b/gl/tests/test-select.c @@ -1,5 +1,5 @@ /* Test of select() substitute. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-select.h b/gl/tests/test-select.h index 4612dfc719..9fe998c1dd 100644 --- a/gl/tests/test-select.h +++ b/gl/tests/test-select.h @@ -1,5 +1,5 @@ /* Test of select() substitute. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ #include "macros.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif #ifdef HAVE_SYS_WAIT_H @@ -121,7 +121,7 @@ connect_to_socket (bool blocking) if (!blocking) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); @@ -262,7 +262,7 @@ static void test_bad_fd (select_fn my_select) { /* This tests fails on OSF/1 and native Windows, even with fd = 16. */ -#if !(defined __osf__ || defined WIN32_NATIVE) +#if !(defined __osf__ || defined WINDOWS_NATIVE) int fd; /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded @@ -318,7 +318,7 @@ test_connect_first (select_fn my_select) static void test_accept_first (select_fn my_select) { -#ifndef WIN32_NATIVE +#ifndef WINDOWS_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; diff --git a/gl/tests/test-send.c b/gl/tests/test-send.c index 9fb24d4395..febbe20a04 100644 --- a/gl/tests/test-send.c +++ b/gl/tests/test-send.c @@ -1,5 +1,5 @@ /* Test the send() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sendto.c b/gl/tests/test-sendto.c index 9e8a519056..88fad93f13 100644 --- a/gl/tests/test-sendto.c +++ b/gl/tests/test-sendto.c @@ -1,5 +1,5 @@ /* Test the sendto() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-setenv.c b/gl/tests/test-setenv.c index 50eb71b3d2..4752a11f59 100644 --- a/gl/tests/test-setenv.c +++ b/gl/tests/test-setenv.c @@ -1,5 +1,5 @@ /* Tests of setenv. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-setsockopt.c b/gl/tests/test-setsockopt.c index 7a16cfa1d9..cc78a1bc8f 100644 --- a/gl/tests/test-setsockopt.c +++ b/gl/tests/test-setsockopt.c @@ -1,5 +1,5 @@ /* Test setsockopt() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-shutdown.c b/gl/tests/test-shutdown.c index d154f8ef00..91d979a60b 100644 --- a/gl/tests/test-shutdown.c +++ b/gl/tests/test-shutdown.c @@ -1,5 +1,5 @@ /* Test the shutdown() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-signal-h.c b/gl/tests/test-signal-h.c index 7103e1ff19..95290175b6 100644 --- a/gl/tests/test-signal-h.c +++ b/gl/tests/test-signal-h.c @@ -1,5 +1,5 @@ /* Test of <signal.h> substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-signbit.c b/gl/tests/test-signbit.c index 940156e6d9..d9ff91df51 100644 --- a/gl/tests/test-signbit.c +++ b/gl/tests/test-signbit.c @@ -1,5 +1,5 @@ /* Test of signbit() substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sleep.c b/gl/tests/test-sleep.c index 3550e2b0f5..a0a2e7773a 100644 --- a/gl/tests/test-sleep.c +++ b/gl/tests/test-sleep.c @@ -1,5 +1,5 @@ /* Test of sleep() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-snprintf.c b/gl/tests/test-snprintf.c index 2b5a54c4af..bd66449cee 100644 --- a/gl/tests/test-snprintf.c +++ b/gl/tests/test-snprintf.c @@ -1,5 +1,5 @@ /* Test of snprintf() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sockets.c b/gl/tests/test-sockets.c index 0170d3754d..f43e011c2c 100644 --- a/gl/tests/test-sockets.c +++ b/gl/tests/test-sockets.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2012 Free Software Foundation, Inc. * Written by Simon Josefsson. * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-stat.c b/gl/tests/test-stat.c index cd74491f05..db9adf9b93 100644 --- a/gl/tests/test-stat.c +++ b/gl/tests/test-stat.c @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-stat.h b/gl/tests/test-stat.h index 3c8f7add0f..2c9afc0156 100644 --- a/gl/tests/test-stat.h +++ b/gl/tests/test-stat.h @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-stdalign.c b/gl/tests/test-stdalign.c index 7090a26860..d4c1d2e8a8 100644 --- a/gl/tests/test-stdalign.c +++ b/gl/tests/test-stdalign.c @@ -1,5 +1,5 @@ /* Test of <stdalign.h>. - Copyright 2009-2011 Free Software Foundation, Inc. + Copyright 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,7 +71,7 @@ CHECK_STATIC (int64_t); #endif CHECK_STATIC (float); CHECK_STATIC (double); -CHECK_STATIC (longdouble); +/* CHECK_STATIC (longdouble); */ CHECK_STATIC (struct1); CHECK_STATIC (struct2); CHECK_STATIC (struct3); @@ -101,8 +101,8 @@ main () CHECK_ALIGNED (static_float_Alignas); CHECK_ALIGNED (static_double_alignas); CHECK_ALIGNED (static_double_Alignas); - CHECK_ALIGNED (static_longdouble_alignas); - CHECK_ALIGNED (static_longdouble_Alignas); + /* CHECK_ALIGNED (static_longdouble_alignas); */ + /* CHECK_ALIGNED (static_longdouble_Alignas); */ CHECK_ALIGNED (static_struct1_alignas); CHECK_ALIGNED (static_struct1_Alignas); CHECK_ALIGNED (static_struct2_alignas); diff --git a/gl/tests/test-stdbool.c b/gl/tests/test-stdbool.c index e115ba2940..c22ca1f87c 100644 --- a/gl/tests/test-stdbool.c +++ b/gl/tests/test-stdbool.c @@ -1,5 +1,5 @@ /* Test of <stdbool.h> substitute. - Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-stddef.c b/gl/tests/test-stddef.c index c929af837a..d7237b3e97 100644 --- a/gl/tests/test-stddef.c +++ b/gl/tests/test-stddef.c @@ -1,5 +1,5 @@ /* Test of <stddef.h> substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-stdint.c b/gl/tests/test-stdint.c index f606cc3e24..23b2b28ef0 100644 --- a/gl/tests/test-stdint.c +++ b/gl/tests/test-stdint.c @@ -1,5 +1,5 @@ /* Test of <stdint.h> substitute. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,6 @@ /* Whether to enable pedantic checks. */ #define DO_PEDANTIC 0 -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* likewise */ #include <stdint.h> #include "verify.h" diff --git a/gl/tests/test-stdio.c b/gl/tests/test-stdio.c index 7e7a206b7c..7bd67c2005 100644 --- a/gl/tests/test-stdio.c +++ b/gl/tests/test-stdio.c @@ -1,5 +1,5 @@ /* Test of <stdio.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-stdlib.c b/gl/tests/test-stdlib.c index 210aab4055..7eeb410d33 100644 --- a/gl/tests/test-stdlib.c +++ b/gl/tests/test-stdlib.c @@ -1,5 +1,5 @@ /* Test of <stdlib.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-strchrnul.c b/gl/tests/test-strchrnul.c index 6ea8adc312..f1d092830d 100644 --- a/gl/tests/test-strchrnul.c +++ b/gl/tests/test-strchrnul.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2012 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-strerror.c b/gl/tests/test-strerror.c index 3ffb12e8f6..a40c07923c 100644 --- a/gl/tests/test-strerror.c +++ b/gl/tests/test-strerror.c @@ -1,5 +1,5 @@ /* Test of strerror() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-strerror_r.c b/gl/tests/test-strerror_r.c index 956c458d7b..0539de2072 100644 --- a/gl/tests/test-strerror_r.c +++ b/gl/tests/test-strerror_r.c @@ -1,5 +1,5 @@ /* Test of strerror_r() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-string.c b/gl/tests/test-string.c index 54c49a9735..56e59741d0 100644 --- a/gl/tests/test-string.c +++ b/gl/tests/test-string.c @@ -1,5 +1,5 @@ /* Test of <string.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-strings.c b/gl/tests/test-strings.c index ee2ad62714..1805e16f6c 100644 --- a/gl/tests/test-strings.c +++ b/gl/tests/test-strings.c @@ -1,5 +1,5 @@ /* Test of <strings.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-strnlen.c b/gl/tests/test-strnlen.c index 18d6fcdbeb..cbc1883539 100644 --- a/gl/tests/test-strnlen.c +++ b/gl/tests/test-strnlen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Free Software Foundation, Inc. + * Copyright (C) 2010-2012 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-strverscmp.c b/gl/tests/test-strverscmp.c index 9a9da1025e..d58cec2358 100644 --- a/gl/tests/test-strverscmp.c +++ b/gl/tests/test-strverscmp.c @@ -1,5 +1,5 @@ /* Test of strverscmp() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-symlink.c b/gl/tests/test-symlink.c index 367e04541f..b3caac9235 100644 --- a/gl/tests/test-symlink.c +++ b/gl/tests/test-symlink.c @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-symlink.h b/gl/tests/test-symlink.h index 4d9392962d..a7c407945e 100644 --- a/gl/tests/test-symlink.h +++ b/gl/tests/test-symlink.h @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_ioctl.c b/gl/tests/test-sys_ioctl.c index dd01b4aadd..725cabf1f1 100644 --- a/gl/tests/test-sys_ioctl.c +++ b/gl/tests/test-sys_ioctl.c @@ -1,5 +1,5 @@ /* Test of <sys/ioctl.h> substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_select.c b/gl/tests/test-sys_select.c index 76596dba30..a473eba238 100644 --- a/gl/tests/test-sys_select.c +++ b/gl/tests/test-sys_select.c @@ -1,5 +1,5 @@ /* Test of <sys/select.h> substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_socket.c b/gl/tests/test-sys_socket.c index 58c1899e9c..271815d1c3 100644 --- a/gl/tests/test-sys_socket.c +++ b/gl/tests/test-sys_socket.c @@ -1,5 +1,5 @@ /* Test of <sys/socket.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_stat.c b/gl/tests/test-sys_stat.c index 3303badcce..0702e04f6e 100644 --- a/gl/tests/test-sys_stat.c +++ b/gl/tests/test-sys_stat.c @@ -1,5 +1,5 @@ /* Test of <sys/stat.h> substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_time.c b/gl/tests/test-sys_time.c index da64b85c02..a9ac5e3894 100644 --- a/gl/tests/test-sys_time.c +++ b/gl/tests/test-sys_time.c @@ -1,5 +1,5 @@ /* Test of <sys/time.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_types.c b/gl/tests/test-sys_types.c index 816c9d6162..c2af992b6b 100644 --- a/gl/tests/test-sys_types.c +++ b/gl/tests/test-sys_types.c @@ -1,5 +1,5 @@ /* Test of <sys/types.h> substitute. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_uio.c b/gl/tests/test-sys_uio.c index 7855a6bc43..ffb46ce148 100644 --- a/gl/tests/test-sys_uio.c +++ b/gl/tests/test-sys_uio.c @@ -1,5 +1,5 @@ /* Test of <sys/uio.h> substitute. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sys_wait.h b/gl/tests/test-sys_wait.h index 3c9b32293b..d3726df041 100644 --- a/gl/tests/test-sys_wait.h +++ b/gl/tests/test-sys_wait.h @@ -1,5 +1,5 @@ /* Test of macros shared between <sys/wait.h> and <stdlib.h>. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-sysexits.c b/gl/tests/test-sysexits.c index 0d9a22c41c..a5333d043a 100644 --- a/gl/tests/test-sysexits.c +++ b/gl/tests/test-sysexits.c @@ -1,5 +1,5 @@ /* Test of <sysexits.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-thread_create.c b/gl/tests/test-thread_create.c index 1348c8c3c6..0f86771ea0 100644 --- a/gl/tests/test-thread_create.c +++ b/gl/tests/test-thread_create.c @@ -1,5 +1,5 @@ /* Test of gl_thread_create () macro. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ main () } else { -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS fputs ("glthread_create failed\n", stderr); return 1; #else diff --git a/gl/tests/test-thread_self.c b/gl/tests/test-thread_self.c index 816ee09680..707f7fe079 100644 --- a/gl/tests/test-thread_self.c +++ b/gl/tests/test-thread_self.c @@ -1,5 +1,5 @@ /* Test of gl_thread_self () macro. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-time.c b/gl/tests/test-time.c index d499a5ca16..acf3d2df6d 100644 --- a/gl/tests/test-time.c +++ b/gl/tests/test-time.c @@ -1,5 +1,5 @@ /* Test of <time.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-u64.c b/gl/tests/test-u64.c index bdfc95f6c5..8be841dfeb 100644 --- a/gl/tests/test-u64.c +++ b/gl/tests/test-u64.c @@ -1,5 +1,5 @@ /* Test of <u64.h> - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-unistd.c b/gl/tests/test-unistd.c index be1ae06910..e53fd7a002 100644 --- a/gl/tests/test-unistd.c +++ b/gl/tests/test-unistd.c @@ -1,5 +1,5 @@ /* Test of <unistd.h> substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-unsetenv.c b/gl/tests/test-unsetenv.c index 9c9443b89f..926526d4a4 100644 --- a/gl/tests/test-unsetenv.c +++ b/gl/tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-usleep.c b/gl/tests/test-usleep.c new file mode 100644 index 0000000000..1e4cac1cc2 --- /dev/null +++ b/gl/tests/test-usleep.c @@ -0,0 +1,40 @@ +/* Test of usleep() function. + Copyright (C) 2009-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Eric Blake <ebb9@byu.net>, 2009. */ + +#include <config.h> + +#include <unistd.h> + +#include "signature.h" +SIGNATURE_CHECK (usleep, int, (useconds_t)); + +#include <time.h> + +#include "macros.h" + +int +main (void) +{ + time_t start = time (NULL); + ASSERT (usleep (1000000) == 0); + ASSERT (start < time (NULL)); + + ASSERT (usleep (0) == 0); + + return 0; +} diff --git a/gl/tests/test-vasnprintf.c b/gl/tests/test-vasnprintf.c index 6b2a0ff05a..4e548b1ef4 100644 --- a/gl/tests/test-vasnprintf.c +++ b/gl/tests/test-vasnprintf.c @@ -1,5 +1,5 @@ /* Test of vasnprintf() and asnprintf() functions. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-vasprintf.c b/gl/tests/test-vasprintf.c index 6882d18d62..4d7635b1cd 100644 --- a/gl/tests/test-vasprintf.c +++ b/gl/tests/test-vasprintf.c @@ -1,5 +1,5 @@ /* Test of vasprintf() and asprintf() functions. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-vc-list-files-cvs.sh b/gl/tests/test-vc-list-files-cvs.sh index 531b2699ca..68b0a0f954 100755 --- a/gl/tests/test-vc-list-files-cvs.sh +++ b/gl/tests/test-vc-list-files-cvs.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2011 Free Software Foundation, Inc. +# Copyright (C) 2008-2012 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,7 +36,6 @@ for i in with-cvsu without; do ok=0 mkdir $tmpdir && cd $tmpdir && # without cvs, skip the test - # The double use of 'exit' is needed for the reference to $? inside the trap. { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \ || skip_ "cvs not found in PATH"; } && mkdir w && cd w && diff --git a/gl/tests/test-vc-list-files-git.sh b/gl/tests/test-vc-list-files-git.sh index 523b2a9169..1ea6d8961a 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-2011 Free Software Foundation, Inc. +# Copyright (C) 2008-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-verify.c b/gl/tests/test-verify.c index 454f4f456c..5ab9c58621 100644 --- a/gl/tests/test-verify.c +++ b/gl/tests/test-verify.c @@ -1,6 +1,6 @@ /* Test the "verify" module. - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-version-etc.c b/gl/tests/test-version-etc.c index 00a5d7c6f9..36ced60bde 100644 --- a/gl/tests/test-version-etc.c +++ b/gl/tests/test-version-etc.c @@ -1,5 +1,5 @@ /* Test suite for version-etc. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This file is part of the GNUlib Library. This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-version-etc.sh b/gl/tests/test-version-etc.sh index c1ed827e40..945383bef3 100755 --- a/gl/tests/test-version-etc.sh +++ b/gl/tests/test-version-etc.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for version-etc. -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify diff --git a/gl/tests/test-vfprintf-posix.c b/gl/tests/test-vfprintf-posix.c index 1db31126ed..706ee704bb 100644 --- a/gl/tests/test-vfprintf-posix.c +++ b/gl/tests/test-vfprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-vprintf-posix.c b/gl/tests/test-vprintf-posix.c index fcad8af8cb..f64bf831ee 100644 --- a/gl/tests/test-vprintf-posix.c +++ b/gl/tests/test-vprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-vsnprintf.c b/gl/tests/test-vsnprintf.c index 7a520824bb..9ee61c0d12 100644 --- a/gl/tests/test-vsnprintf.c +++ b/gl/tests/test-vsnprintf.c @@ -1,5 +1,5 @@ /* Test of vsnprintf() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/test-wchar.c b/gl/tests/test-wchar.c index 2d3bad7546..0d720057e1 100644 --- a/gl/tests/test-wchar.c +++ b/gl/tests/test-wchar.c @@ -1,5 +1,5 @@ /* Test of <wchar.h> substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/unsetenv.c b/gl/tests/unsetenv.c index 16b50d15e3..ddbe9a4d29 100644 --- a/gl/tests/unsetenv.c +++ b/gl/tests/unsetenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2011 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2002, 2005-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ #endif #if _LIBC -/* This lock protects against simultaneous modifications of `environ'. */ +/* This lock protects against simultaneous modifications of 'environ'. */ # include <bits/libc-lock.h> __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) diff --git a/gl/tests/w32sock.h b/gl/tests/w32sock.h index 0b8334e4ec..846c342756 100644 --- a/gl/tests/w32sock.h +++ b/gl/tests/w32sock.h @@ -1,6 +1,6 @@ /* w32sock.h --- internal auxilliary functions for Windows socket functions - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/tests/zerosize-ptr.h b/gl/tests/zerosize-ptr.h index beeb3da3e0..9c060e79c8 100644 --- a/gl/tests/zerosize-ptr.h +++ b/gl/tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/time.in.h b/gl/time.in.h index 1fbebf47be..5080d45c57 100644 --- a/gl/time.in.h +++ b/gl/time.in.h @@ -1,6 +1,6 @@ /* A more-standard <time.h>. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/time_r.c b/gl/time_r.c index 31d010e437..dbde157ef9 100644 --- a/gl/time_r.c +++ b/gl/time_r.c @@ -1,6 +1,6 @@ /* Reentrant time functions like localtime_r. - Copyright (C) 2003, 2006-2007, 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2010-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/timespec.h b/gl/timespec.h index acf815c8db..388ddb83a7 100644 --- a/gl/timespec.h +++ b/gl/timespec.h @@ -1,6 +1,6 @@ /* timespec -- System time interface - Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2011 Free Software + Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -1,6 +1,6 @@ /* uint64_t-like operations that work even on hosts lacking uint64_t - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/unistd.in.h b/gl/unistd.in.h index 77e5675aad..6aac9c37ed 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around <unistd.h>. - Copyright (C) 2003-2011 Free Software Foundation, Inc. + Copyright (C) 2003-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -935,6 +935,27 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " #endif +#if @GNULIB_ISATTY@ +# if @REPLACE_ISATTY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty rpl_isatty +# endif +_GL_FUNCDECL_RPL (isatty, int, (int fd)); +_GL_CXXALIAS_RPL (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#elif defined GNULIB_POSIXCHECK +# undef isatty +# if HAVE_RAW_DECL_ISATTY +_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " + "use gnulib module isatty for portability"); +# endif +#endif + + #if @GNULIB_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. @@ -1268,6 +1289,33 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " #endif +#if @GNULIB_SETHOSTNAME@ +/* Set the host name of the machine. + The host name may or may not be fully qualified. + + Put LEN bytes of NAME into the host name. + Return 0 if successful, otherwise, set errno and return -1. + + Platforms with no ability to set the hostname return -1 and set + errno = ENOSYS. */ +# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ +_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5 + and FreeBSD 6.4 the second parameter is int. On Solaris 11 + 2011-10, the first parameter is not const. */ +_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +_GL_CXXALIASWARN (sethostname); +#elif defined GNULIB_POSIXCHECK +# undef sethostname +# if HAVE_RAW_DECL_SETHOSTNAME +_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " + "use gnulib module sethostname for portability"); +# endif +#endif + + #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. diff --git a/gl/usleep.c b/gl/usleep.c new file mode 100644 index 0000000000..ea640bfa47 --- /dev/null +++ b/gl/usleep.c @@ -0,0 +1,58 @@ +/* Pausing execution of the current thread. + Copyright (C) 2009-2012 Free Software Foundation, Inc. + Written by Eric Blake <ebb9@byu.net>, 2009. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* This file is _intentionally_ light-weight. Rather than using + select or nanosleep, both of which drag in external libraries on + some platforms, this merely rounds up to the nearest second if + usleep() does not exist. If sub-second resolution is important, + then use a more powerful interface to begin with. */ + +#include <config.h> + +/* Specification. */ +#include <unistd.h> + +#include <errno.h> + +#ifndef HAVE_USLEEP +# define HAVE_USLEEP 0 +#endif + +/* Sleep for MICRO microseconds, which can be greater than 1 second. + Return -1 and set errno to EINVAL on range error (about 4295 + seconds), or 0 on success. Interaction with SIGALARM is + unspecified. */ + +int +usleep (useconds_t micro) +{ + unsigned int seconds = micro / 1000000; + if (sizeof seconds < sizeof micro && micro / 1000000 != seconds) + { + errno = EINVAL; + return -1; + } + if (!HAVE_USLEEP && micro % 1000000) + seconds++; + while ((seconds = sleep (seconds)) != 0); + +#undef usleep +#if !HAVE_USLEEP +# define usleep(x) 0 +#endif + return usleep (micro % 1000000); +} diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c index 71f8d80239..16fca49fd6 100644 --- a/gl/vasnprintf.c +++ b/gl/vasnprintf.c @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -4885,7 +4885,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ - /* On native Win32 systems (such as mingw), we can avoid using + /* On native Windows systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number @@ -4894,7 +4894,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. - On native Win32 systems (such as mingw) where the OS is + On native Windows systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h index c9f4c2195c..fdd586837e 100644 --- a/gl/vasnprintf.h +++ b/gl/vasnprintf.h @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/vasprintf.c b/gl/vasprintf.c index 3001c2640c..6d1cd97c60 100644 --- a/gl/vasprintf.c +++ b/gl/vasprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/verify.h b/gl/verify.h index 9a8caad001..cef14ad157 100644 --- a/gl/verify.h +++ b/gl/verify.h @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,13 +21,11 @@ # define _GL_VERIFY_H -/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the - C1X draft N1548 section 6.7.10. This is supported by GCC 4.6.0 and - later, in C mode, and its use here generates easier-to-read diagnostics - when verify (R) fails. +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. + This is supported by GCC 4.6.0 and later, in C mode, and its use + here generates easier-to-read diagnostics when verify (R) fails. - Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the - C++0X draft N3242 section 7.(4). + Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. This will likely be supported by future GCC versions, in C++ mode. Use this only with GCC. If we were willing to slow 'configure' @@ -188,7 +186,7 @@ template <int w> trailing ';'. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. - Unfortunately, unlike C1X, this implementation must appear as an + Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ # ifdef _GL_HAVE__STATIC_ASSERT @@ -205,7 +203,7 @@ template <int w> # define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) # endif # if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* Draft C1X requires this #define. */ +# define static_assert _Static_assert /* C11 requires this #define. */ # endif # endif diff --git a/gl/version-etc-fsf.c b/gl/version-etc-fsf.c index c82158302c..c452f40dfb 100644 --- a/gl/version-etc-fsf.c +++ b/gl/version-etc-fsf.c @@ -1,5 +1,5 @@ /* Variable with FSF copyright information, for version-etc. - Copyright (C) 1999-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1999-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/version-etc.c b/gl/version-etc.c index b8d4724b56..ae1e44d61d 100644 --- a/gl/version-etc.c +++ b/gl/version-etc.c @@ -1,5 +1,5 @@ /* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999-2011 Free Software Foundation, Inc. + Copyright (C) 1999-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ # define PACKAGE PACKAGE_TARNAME #endif -enum { COPYRIGHT_YEAR = 2011 }; +enum { COPYRIGHT_YEAR = 2012 }; /* The three functions below display the --version information the standard way. diff --git a/gl/version-etc.h b/gl/version-etc.h index a9b313d23a..c62704cd42 100644 --- a/gl/version-etc.h +++ b/gl/version-etc.h @@ -1,5 +1,5 @@ /* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999, 2003, 2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2003, 2005, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ # include <stdarg.h> # include <stdio.h> -/* The `sentinel' attribute was added in gcc 4.0. */ +/* The 'sentinel' attribute was added in gcc 4.0. */ #ifndef _GL_ATTRIBUTE_SENTINEL # if 4 <= __GNUC__ # define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) @@ -72,7 +72,7 @@ extern void version_etc (FILE *stream, /* const char *author1, ..., NULL */ ...) _GL_ATTRIBUTE_SENTINEL; -/* Display the usual `Report bugs to' stanza */ +/* Display the usual "Report bugs to" stanza. */ extern void emit_bug_reporting_address (void); #endif /* VERSION_ETC_H */ diff --git a/gl/vfprintf.c b/gl/vfprintf.c index 55486d64d3..bc1bec99d6 100644 --- a/gl/vfprintf.c +++ b/gl/vfprintf.c @@ -1,5 +1,5 @@ /* Formatted output to a stream. - Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/vprintf.c b/gl/vprintf.c index 0388713f38..075b3d91d8 100644 --- a/gl/vprintf.c +++ b/gl/vprintf.c @@ -1,5 +1,5 @@ /* Formatted output to a stream. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c index 3f6f6a87a8..ac2637e682 100644 --- a/gl/vsnprintf.c +++ b/gl/vsnprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. This program is free software; you can redistribute it and/or modify diff --git a/gl/w32sock.h b/gl/w32sock.h index 0b8334e4ec..846c342756 100644 --- a/gl/w32sock.h +++ b/gl/w32sock.h @@ -1,6 +1,6 @@ /* w32sock.h --- internal auxilliary functions for Windows socket functions - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/wchar.in.h b/gl/wchar.in.h index 1ed45214ca..86c97ff6f6 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 <wchar.h>, for platforms that have issues. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gl/xsize.h b/gl/xsize.h index 6505c42e9d..4c1e615d9f 100644 --- a/gl/xsize.h +++ b/gl/xsize.h @@ -1,6 +1,6 @@ /* xsize.h -- Checked size_t computations. - Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |