1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Use Gnulib's `getaddrinfo' module.

* m4/gnulib-cache.m4: Add `getaddrinfo'.

* libguile/Makefile.am (libguile_la_LDFLAGS): Add `$(GETADDRINFO_LIB)
  $(HOSTENT_LIB) $(SERVENT_LIB)'.
This commit is contained in:
Ludovic Courtès 2010-02-14 17:06:13 +01:00
parent 60b6a84f0f
commit 61cd9dc907
214 changed files with 2132 additions and 1223 deletions

View file

@ -5,7 +5,7 @@
# It is necessary if you want to build targets usually of interest # It is necessary if you want to build targets usually of interest
# only to the maintainer. # only to the maintainer.
# Copyright (C) 2001, 2003, 2006-2009 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2006-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View file

@ -9,7 +9,7 @@ my $VERSION = '2009-11-20 13:36'; # UTC
# If you change this file with Emacs, please let the write hook # If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually. # do its job. Otherwise, update this string manually.
# Copyright (C) 2002-2009 Free Software Foundation, Inc. # Copyright (C) 2002-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL. /* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published under the terms of the GNU General Public License as published

View file

@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the # Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable. # run time search path of shared libraries in an executable.
# #
# Copyright 1996-2008 Free Software Foundation, Inc. # Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001 # Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# #

8
build-aux/gendocs.sh Normal file → Executable file
View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh -e
# gendocs.sh -- generate a GNU manual in many formats. This script is # gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details. # mentioned in maintain.texi. See the help message below for usage details.
scriptversion=2009-09-09.22 scriptversion=2010-01-02.16
# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -268,7 +268,7 @@ else
fi fi
echo Making .tar.gz for sources... echo Making .tar.gz for sources...
srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true
tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz` texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`

View file

@ -9,7 +9,7 @@ my $VERSION = '2009-10-30 13:46'; # UTC
# If you change this file with Emacs, please let the write hook # If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually. # do its job. Otherwise, update this string manually.
# Copyright (C) 2008, 2009 Free Software Foundation, Inc. # Copyright (C) 2008-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View file

@ -9,7 +9,7 @@
VERSION=2009-07-21.16; # UTC VERSION=2009-07-21.16; # UTC
# Copyright (C) 2009 Free Software Foundation, Inc. # Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View file

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
# Sign files and upload them. # Sign files and upload them.
scriptversion=2009-11-29.20; # UTC scriptversion=2010-02-08.07; # UTC
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -32,10 +33,11 @@ delete_symlinks=
collect_var= collect_var=
dbg= dbg=
usage="Usage: $0 [OPTIONS]... [COMMAND] FILES... [[COMMAND] FILES...] usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...]
Sign all FILES, and upload them to selected destinations, according to Sign all FILES, and process them at selected destinations according to CMD.
<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>. <http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
explains further.
Commands: Commands:
--delete delete FILES from destination --delete delete FILES from destination
@ -96,6 +98,11 @@ Examples:
--delete oopsbar-0.9.91.tar.gz \\ --delete oopsbar-0.9.91.tar.gz \\
-- foobar-0.9.91.tar.gz -- foobar-0.9.91.tar.gz
gnupload uses the ncftpput program to do the transfers; if you don't
happen to have an ncftp package installed, the ncftpput-ftp script in
the build-aux/ directory of the gnulib package
(http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
Send patches to <automake-patches@gnu.org>." Send patches to <automake-patches@gnu.org>."

View file

@ -1,45 +0,0 @@
/* A C macro for emitting link time warnings.
Copyright (C) 1995, 1997, 2000, 2002-2003, 2007, 2009 Free Software
Foundation, Inc.
This 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
Lesser 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/>. */
/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
a linker warning on most glibc systems.
We use a linker warning rather than a preprocessor warning, because
#warning cannot be used inside macros. */
#ifndef GL_LINK_WARNING
/* This works on platforms with GNU ld and ELF object format.
Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
Testing __ELF__ guarantees the ELF object format.
Testing __GNUC__ is necessary for the compound expression syntax. */
# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
# define GL_LINK_WARNING(message) \
GL_LINK_WARNING1 (__FILE__, __LINE__, message)
# define GL_LINK_WARNING1(file, line, message) \
GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
# define GL_LINK_WARNING2(file, line, message) \
GL_LINK_WARNING3 (file ":" #line ": warning: " message)
# define GL_LINK_WARNING3(message) \
({ static const char warning[sizeof (message)] \
__attribute__ ((__unused__, \
__section__ (".gnu.warning"), \
__aligned__ (1))) \
= message "\n"; \
(void)0; \
})
# else
# define GL_LINK_WARNING(message) ((void) 0)
# endif
#endif

View file

@ -0,0 +1,36 @@
/* A C macro for declaring that specific function parameters are not used.
Copyright (C) 2008-2010 Free Software Foundation, Inc.
This 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
Lesser 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/>. */
/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
declarations for parameters that are not used. This helps to reduce
warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
type param _GL_UNUSED_PARAMETER
or more generally
param_decl _GL_UNUSED_PARAMETER
For example:
int param _GL_UNUSED_PARAMETER
int *(*param)(void) _GL_UNUSED_PARAMETER
Other possible, but obscure and discouraged syntaxes:
int _GL_UNUSED_PARAMETER *(*param)(void)
_GL_UNUSED_PARAMETER int *(*param)(void)
*/
#ifndef _GL_UNUSED_PARAMETER
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
# else
# define _GL_UNUSED_PARAMETER
# endif
#endif

View file

@ -12,7 +12,7 @@ my $VERSION = '2009-04-16 15:57'; # UTC
# If you change this file with Emacs, please let the write hook # If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually. # do its job. Otherwise, update this string manually.
# Copyright (C) 2008, 2009 Free Software Foundation, Inc. # Copyright (C) 2008-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View file

@ -4,7 +4,7 @@
# Print a version string. # Print a version string.
scriptversion=2009-07-21.16; # UTC scriptversion=2009-07-21.16; # UTC
# Copyright (C) 2006-2009 Free Software Foundation, Inc. # Copyright (C) 2006-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

75
build-aux/warn-on-use.h Normal file
View file

@ -0,0 +1,75 @@
/* A C macro for emitting warnings if a function is used.
Copyright (C) 2010 Free Software Foundation, Inc.
This 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
Lesser 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/>. */
/* _GL_WARN_ON_USE(function, "literal string") issues a declaration
for FUNCTION which will then trigger a compiler warning containing
the text of "literal string" anywhere that function is called, if
supported by the compiler. If the compiler does not support this
feature, the macro expands to an unused extern declaration.
This macro is useful for marking a function as a potential
portability trap, with the intent that "literal string" include
instructions on the replacement function that should be used
instead. However, one of the reasons that a function is a
portability trap is if it has the wrong signature. Declaring
FUNCTION with a different signature in C is a compilation error, so
this macro must use the same type as any existing declaration so
that programs that avoid the problematic FUNCTION do not fail to
compile merely because they included a header that poisoned the
function. But this implies that _GL_WARN_ON_USE is only safe to
use if FUNCTION is known to already have a declaration. Use of
this macro implies that there must not be any other macro hiding
the declaration of FUNCTION; but undefining FUNCTION first is part
of the poisoning process anyway (although for symbols that are
provided only via a macro, the result is a compilation error rather
than a warning containing "literal string"). Also note that in
C++, it is only safe to use if FUNCTION has no overloads.
For an example, it is possible to poison 'getline' by:
- adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
[getline]) in configure.ac, which potentially defines
HAVE_RAW_DECL_GETLINE
- adding this code to a header that wraps the system <stdio.h>:
#undef getline
#if HAVE_RAW_DECL_GETLINE
_GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
"not universally present; use the gnulib module getline");
#endif
It is not possible to directly poison global variables. But it is
possible to write a wrapper accessor function, and poison that
(less common usage, like &environ, will cause a compilation error
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
#if HAVE_RAW_DECL_ENVIRON
static inline char ***rpl_environ (void) { return &environ; }
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
# undef environ
# define environ (*rpl_environ ())
#endif
*/
#ifndef _GL_WARN_ON_USE
# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
# else /* Unsupported. */
# define _GL_WARN_ON_USE(function, message) \
extern int _gl_warn_on_use
# endif
#endif

View file

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY! ## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2009 Free Software Foundation, Inc. # Copyright (C) 2002-2010 Free Software Foundation, Inc.
# #
# This file is free software, distributed under the terms of the GNU # This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General # General Public License. As a special exception to the GNU General
@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program. # the same distribution terms as the rest of that program.
# #
# Generated by gnulib-tool. # Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write gendocs gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write gendocs getaddrinfo gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
@ -71,6 +71,11 @@ EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
## begin gnulib module arg-nonnull ## begin gnulib module arg-nonnull
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES += arg-nonnull.h BUILT_SOURCES += arg-nonnull.h
# The arg-nonnull.h that gets inserted into generated .h files is the same as # The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/arg-nonnull.h, except that it has the copyright header cut off. # build-aux/arg-nonnull.h, except that it has the copyright header cut off.
@ -90,11 +95,11 @@ EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
## begin gnulib module arpa_inet ## begin gnulib module arpa_inet
BUILT_SOURCES += $(ARPA_INET_H) BUILT_SOURCES += arpa/inet.h
# We need the following in order to create <arpa/inet.h> when the system # We need the following in order to create <arpa/inet.h> when the system
# doesn't have one. # doesn't have one.
arpa/inet.h: arpa_inet.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) arpa/inet.h: arpa_inet.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) arpa $(AM_V_at)$(MKDIR_P) arpa
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@ -106,8 +111,8 @@ arpa/inet.h: arpa_inet.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \ -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
-e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
-e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/arpa_inet.in.h; \ < $(srcdir)/arpa_inet.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -310,6 +315,15 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gendocs.sh
## end gnulib module gendocs ## end gnulib module gendocs
## 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 gettext-h ## begin gnulib module gettext-h
libgnu_la_SOURCES += gettext.h libgnu_la_SOURCES += gettext.h
@ -445,25 +459,6 @@ AM_CFLAGS += $(CFLAG_VISIBILITY)
## end gnulib module lib-symbol-visibility ## end gnulib module lib-symbol-visibility
## begin gnulib module link-warning
BUILT_SOURCES += link-warning.h
# The link-warning.h that gets inserted into generated .h files is the same as
# build-aux/link-warning.h, except that it has the copyright header cut off.
link-warning.h: $(top_srcdir)/build-aux/link-warning.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_LINK_WARNING/,$$p' \
< $(top_srcdir)/build-aux/link-warning.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += link-warning.h link-warning.h-t
LINK_WARNING_H=link-warning.h
EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h
## end gnulib module link-warning
## begin gnulib module localcharset ## begin gnulib module localcharset
libgnu_la_SOURCES += localcharset.h localcharset.c libgnu_la_SOURCES += localcharset.h localcharset.c
@ -540,11 +535,11 @@ EXTRA_DIST += config.charset ref-add.sin ref-del.sin
## begin gnulib module locale ## begin gnulib module locale
BUILT_SOURCES += $(LOCALE_H) BUILT_SOURCES += locale.h
# We need the following in order to create <locale.h> when the system # We need the following in order to create <locale.h> when the system
# doesn't have one that provides all definitions. # doesn't have one that provides all definitions.
locale.h: locale.in.h $(ARG_NONNULL_H) locale.h: locale.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@ -554,6 +549,7 @@ locale.h: locale.in.h $(ARG_NONNULL_H)
-e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/locale.in.h; \ < $(srcdir)/locale.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -631,6 +627,35 @@ EXTRA_libgnu_la_SOURCES += memchr.c
## end gnulib module memchr ## end gnulib module memchr
## begin gnulib module netdb
BUILT_SOURCES += $(NETDB_H)
# We need the following in order to create <netdb.h> when the system
# doesn't have one that works with the given compiler.
netdb.h: netdb.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \
-e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \
-e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \
-e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \
-e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \
-e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \
-e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \
-e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/netdb.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += netdb.h netdb.h-t
EXTRA_DIST += netdb.in.h
## end gnulib module netdb
## begin gnulib module netinet_in ## begin gnulib module netinet_in
BUILT_SOURCES += $(NETINET_IN_H) BUILT_SOURCES += $(NETINET_IN_H)
@ -704,6 +729,15 @@ libgnu_la_SOURCES += size_max.h
## end gnulib module size_max ## end gnulib module size_max
## begin gnulib module snprintf
EXTRA_DIST += snprintf.c
EXTRA_libgnu_la_SOURCES += snprintf.c
## end gnulib module snprintf
## begin gnulib module stat ## begin gnulib module stat
@ -823,7 +857,7 @@ BUILT_SOURCES += stdio.h
# We need the following in order to create <stdio.h> when the system # We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
stdio.h: stdio.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@ -869,7 +903,8 @@ stdio.h: stdio.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
-e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
-e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
-e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ < $(srcdir)/stdio.in.h | \
sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
-e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
@ -890,6 +925,7 @@ stdio.h: stdio.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
-e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
-e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
-e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
-e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
-e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
-e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
@ -907,9 +943,8 @@ stdio.h: stdio.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
-e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
-e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/stdio.in.h; \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
MOSTLYCLEANFILES += stdio.h stdio.h-t MOSTLYCLEANFILES += stdio.h stdio.h-t
@ -926,7 +961,7 @@ BUILT_SOURCES += stdlib.h
# We need the following in order to create <stdlib.h> when the system # We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
stdlib.h: stdlib.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) stdlib.h: stdlib.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@ -982,8 +1017,8 @@ stdlib.h: stdlib.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/stdlib.in.h; \ < $(srcdir)/stdlib.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -1035,7 +1070,7 @@ BUILT_SOURCES += string.h
# We need the following in order to create <string.h> when the system # We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
string.h: string.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@ -1074,6 +1109,8 @@ string.h: string.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
-e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
-e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@ -1101,8 +1138,8 @@ string.h: string.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \ < $(srcdir)/string.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -1118,7 +1155,7 @@ BUILT_SOURCES += strings.h
# We need the following in order to create <strings.h> when the system # We need the following in order to create <strings.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
strings.h: strings.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@ -1126,8 +1163,8 @@ strings.h: strings.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
-e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
-e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/strings.in.h; \ < $(srcdir)/strings.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -1139,11 +1176,11 @@ EXTRA_DIST += strings.in.h
## begin gnulib module sys_file ## begin gnulib module sys_file
BUILT_SOURCES += $(SYS_FILE_H) BUILT_SOURCES += sys/file.h
# We need the following in order to create <sys/file.h> when the system # We need the following in order to create <sys/file.h> when the system
# has one that is incomplete. # has one that is incomplete.
sys/file.h: sys_file.in.h sys/file.h: sys_file.in.h $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys $(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@ -1153,6 +1190,7 @@ sys/file.h: sys_file.in.h
-e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \ -e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \
-e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \ -e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \
-e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \ -e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_file.in.h; \ < $(srcdir)/sys_file.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -1165,11 +1203,11 @@ EXTRA_DIST += sys_file.in.h
## begin gnulib module sys_socket ## begin gnulib module sys_socket
BUILT_SOURCES += $(SYS_SOCKET_H) BUILT_SOURCES += sys/socket.h
# We need the following in order to create <sys/socket.h> when the system # We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
sys/socket.h: sys_socket.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) sys/socket.h: sys_socket.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys $(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@ -1198,8 +1236,8 @@ sys/socket.h: sys_socket.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
-e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
-e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_socket.in.h; \ < $(srcdir)/sys_socket.in.h; \
} > $@-t && \ } > $@-t && \
mv -f $@-t $@ mv -f $@-t $@
@ -1216,7 +1254,7 @@ BUILT_SOURCES += sys/stat.h
# We need the following in order to create <sys/stat.h> when the system # We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete. # has one that is incomplete.
sys/stat.h: sys_stat.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) sys/stat.h: sys_stat.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys $(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@ -1255,8 +1293,8 @@ sys/stat.h: sys_stat.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_stat.in.h; \ < $(srcdir)/sys_stat.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
@ -1311,7 +1349,7 @@ BUILT_SOURCES += unistd.h
# We need the following in order to create an empty placeholder for # We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one. # <unistd.h> when the system doesn't have one.
unistd.h: unistd.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) unistd.h: unistd.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
@ -1334,6 +1372,7 @@ unistd.h: unistd.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
-e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
-e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
-e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
@ -1355,7 +1394,8 @@ unistd.h: unistd.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
-e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
-e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
-e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ < $(srcdir)/unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
@ -1367,6 +1407,7 @@ unistd.h: unistd.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
@ -1409,9 +1450,8 @@ unistd.h: unistd.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/unistd.in.h; \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@
MOSTLYCLEANFILES += unistd.h unistd.h-t MOSTLYCLEANFILES += unistd.h unistd.h-t
@ -1464,6 +1504,31 @@ EXTRA_DIST += unitypes.h
## end gnulib module unitypes ## end gnulib module unitypes
## begin gnulib module unused-parameter
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES += unused-parameter.h
# The unused-parameter.h that gets inserted into generated .h files is the same
# as build-aux/unused-parameter.h, except that it has the copyright header cut
# off.
unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
< $(top_srcdir)/build-aux/unused-parameter.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
UNUSED_PARAMETER_H=unused-parameter.h
EXTRA_DIST += $(top_srcdir)/build-aux/unused-parameter.h
## end gnulib module unused-parameter
## begin gnulib module useless-if-before-free ## begin gnulib module useless-if-before-free
@ -1514,13 +1579,32 @@ EXTRA_libgnu_la_SOURCES += vsnprintf.c
## end gnulib module vsnprintf ## end gnulib module vsnprintf
## begin gnulib module warn-on-use
BUILT_SOURCES += warn-on-use.h
# The warn-on-use.h that gets inserted into generated .h files is the same as
# build-aux/warn-on-use.h, except that it has the copyright header cut off.
warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
< $(top_srcdir)/build-aux/warn-on-use.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
WARN_ON_USE_H=warn-on-use.h
EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
## end gnulib module warn-on-use
## begin gnulib module wchar ## begin gnulib module wchar
BUILT_SOURCES += $(WCHAR_H) BUILT_SOURCES += wchar.h
# We need the following in order to create <wchar.h> when the system # We need the following in order to create <wchar.h> when the system
# version does not work standalone. # version does not work standalone.
wchar.h: wchar.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@ -1562,8 +1646,8 @@ wchar.h: wchar.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/wchar.in.h; \ < $(srcdir)/wchar.in.h; \
} > $@-t && \ } > $@-t && \
mv $@-t $@ mv $@-t $@

View file

@ -1,5 +1,5 @@
/* Determine alignment of types. /* Determine alignment of types.
Copyright (C) 2003-2004, 2006, 2009 Free Software Foundation, Inc. Copyright (C) 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,7 +1,7 @@
/* Memory allocation on the stack. /* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
Foundation, Inc. Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published under the terms of the GNU Lesser General Public License as published

View file

@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>. /* A GNU-like <arpa/inet.h>.
Copyright (C) 2005-2006, 2008-2009 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -19,8 +19,11 @@
#ifndef _GL_ARPA_INET_H #ifndef _GL_ARPA_INET_H
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
under MinGW. */ under MinGW.
#include <sys/socket.h> But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# include <sys/socket.h>
#endif
#if @HAVE_ARPA_INET_H@ #if @HAVE_ARPA_INET_H@
@ -36,10 +39,10 @@
#ifndef _GL_ARPA_INET_H #ifndef _GL_ARPA_INET_H
#define _GL_ARPA_INET_H #define _GL_ARPA_INET_H
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -67,10 +70,10 @@ extern const char *inet_ntop (int af, const void *restrict src,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef inet_ntop # undef inet_ntop
# define inet_ntop(af,src,dst,cnt) \ # if HAVE_RAW_DECL_INET_NTOP
(GL_LINK_WARNING ("inet_ntop is unportable - " \ _GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - "
"use gnulib module inet_ntop for portability"), \ "use gnulib module inet_ntop for portability");
inet_ntop (af, src, dst, cnt)) # endif
#endif #endif
#if @GNULIB_INET_PTON@ #if @GNULIB_INET_PTON@
@ -80,10 +83,10 @@ extern int inet_pton (int af, const char *restrict src, void *restrict dst)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef inet_pton # undef inet_pton
# define inet_pton(af,src,dst) \ # if HAVE_RAW_DECL_INET_PTON
(GL_LINK_WARNING ("inet_pton is unportable - " \ _GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
"use gnulib module inet_pton for portability"), \ "use gnulib module inet_pton for portability");
inet_pton (af, src, dst)) # endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1,5 +1,5 @@
/* Formatted output to strings. /* Formatted output to strings.
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc. Copyright (C) 1999, 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* byteswap.h - Byte swapping /* byteswap.h - Byte swapping
Copyright (C) 2005, 2007 Free Software Foundation, Inc. Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Character handling in C locale. /* Character handling in C locale.
Copyright 2000-2003, 2006 Free Software Foundation, Inc. Copyright 2000-2003, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via <ctype.h> functions' behaviour depends on the current locale set via
setlocale. setlocale.
Copyright (C) 2000-2003, 2006, 2008 Free Software Foundation, Inc. Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,6 @@
/* Case-insensitive string comparison functions in C locale. /* Case-insensitive string comparison functions in C locale.
Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc. Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale /* c-strcasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc. Copyright (C) 1998-1999, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Optimized case-insensitive string comparison in C locale. /* Optimized case-insensitive string comparison in C locale.
Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc. Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published under the terms of the GNU Lesser General Public License as published

View file

@ -1,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale /* c-strncasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc. Copyright (C) 1998-1999, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file. /* Return the canonical absolute name of a given file.
Copyright (C) 1996-2009 Free Software Foundation, Inc. Copyright (C) 1996-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,7 +1,7 @@
#! /bin/sh #! /bin/sh
# Output a system dependent table of character encoding aliases. # Output a system dependent table of character encoding aliases.
# #
# Copyright (C) 2000-2004, 2006-2009 Free Software Foundation, Inc. # Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by # it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Duplicate a locale object. /* Duplicate a locale object.
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>. /* A POSIX-like <errno.h>.
Copyright (C) 2008-2009 Free Software Foundation, Inc. Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats. /* Supplemental information about the floating-point formats.
Copyright (C) 2007 Free Software Foundation, Inc. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007. Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A correct <float.h>. /* A correct <float.h>.
Copyright (C) 2007-2008 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -6,7 +6,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com> Written by Richard W.M. Jones <rjones.at.redhat.com>
Copyright (C) 2008 Free Software Foundation, Inc. Copyright (C) 2008-2010 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public

View file

@ -1,5 +1,5 @@
/* An interface to read that retries after partial reads and interrupts. /* An interface to read that retries after partial reads and interrupts.
Copyright (C) 2002, 2003 Free Software Foundation, Inc. Copyright (C) 2002-2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* An interface to read() that reads all it is asked to read. /* An interface to read() that reads all it is asked to read.
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,7 +1,6 @@
/* An interface to read and write that retries (if necessary) until complete. /* An interface to read and write that retries (if necessary) until complete.
Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, Copyright (C) 1993-1994, 1997-2006, 2009-2010 Free Software Foundation, Inc.
2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* An interface to write() that writes all it is asked to write. /* An interface to write() that writes all it is asked to write.
Copyright (C) 2002-2003 Free Software Foundation, Inc. Copyright (C) 2002-2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,6 @@
/* Convenience header for conditional use of GNU <libintl.h>. /* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc. Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion. /* Character set conversion.
Copyright (C) 1999-2001, 2007 Free Software Foundation, Inc. Copyright (C) 1999-2001, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* A GNU-like <iconv.h>. /* A GNU-like <iconv.h>.
Copyright (C) 2007-2009 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion. /* Character set conversion.
Copyright (C) 2007 Free Software Foundation, Inc. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion. /* Character set conversion.
Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion handler type. /* Character set conversion handler type.
Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc. Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible. Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding. /* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc. Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding. /* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2003, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library. This file is part of the GNU CHARSET Library.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* A POSIX <locale.h>. /* A POSIX <locale.h>.
Copyright (C) 2007-2009 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -36,6 +36,8 @@
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
On systems that don't define it, use the same value as GNU libintl. */ On systems that don't define it, use the same value as GNU libintl. */
#if !defined LC_MESSAGES #if !defined LC_MESSAGES
@ -50,10 +52,10 @@ extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef duplocale # undef duplocale
# define duplocale(l) \ # if HAVE_RAW_DECL_DUPLOCALE
(GL_LINK_WARNING ("duplocale is buggy on some glibc systems - " \ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
"use gnulib module duplocale for portability"), \ "use gnulib module duplocale for portability");
duplocale (l)) # endif
#endif #endif
#endif /* _GL_LOCALE_H */ #endif /* _GL_LOCALE_H */

View file

@ -1,7 +1,6 @@
/* Work around a bug of lstat on some systems /* Work around a bug of lstat on some systems
Copyright (C) 1997-1999, 2000-2006, 2008-2009 Free Software Copyright (C) 1997-2006, 2008-2010 Free Software Foundation, Inc.
Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible. /* malloc() function that is glibc compatible.
Copyright (C) 1997, 1998, 2006, 2007 Free Software Foundation, Inc. Copyright (C) 1997-1998, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Safe automatic memory allocation. /* Safe automatic memory allocation.
Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc. Copyright (C) 2003, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003. Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Safe automatic memory allocation. /* Safe automatic memory allocation.
Copyright (C) 2003-2007 Free Software Foundation, Inc. Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003. Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Recognize multibyte character. /* Recognize multibyte character.
Copyright (C) 1999-2000, 2008 Free Software Foundation, Inc. Copyright (C) 1999-2000, 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008. Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Convert multibyte character to wide character. /* Convert multibyte character to wide character.
Copyright (C) 1999-2002, 2005-2009 Free Software Foundation, Inc. Copyright (C) 1999-2002, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008. Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Test for initial conversion state. /* Test for initial conversion state.
Copyright (C) 2008 Free Software Foundation, Inc. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008. Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006, 2008 /* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010
Free Software Foundation, Inc. Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se), Based on strlen implementation by Torbjorn Granlund (tege@sics.se),

View file

@ -1,5 +1,5 @@
/* Substitute for <netinet/in.h>. /* Substitute for <netinet/in.h>.
Copyright (C) 2007-2008 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,6 @@
/* Define PATH_MAX somehow. Requires sys/types.h. /* Define PATH_MAX somehow. Requires sys/types.h.
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009 Free Software Foundation, Inc. Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Decomposed printf argument list. /* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2005-2007, 2009 Free Software Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,6 @@
/* Decomposed printf argument list. /* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2006-2007 Free Software Foundation, Inc. Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Formatted output to strings. /* Formatted output to strings.
Copyright (C) 1999-2000, 2002-2003, 2006-2008 Free Software Foundation, Inc. Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,6 @@
/* Parse printf format string. /* Parse printf format string.
Copyright (C) 1999, 2002-2003, 2005, 2007 Free Software Foundation, Inc. Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2008 /* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2010 Free Software
Free Software Foundation, Inc. Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

View file

@ -1,5 +1,5 @@
/* Stub for readlink(). /* Stub for readlink().
Copyright (C) 2003-2007, 2009 Free Software Foundation, Inc. Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -29,8 +29,8 @@
such as DJGPP 2.03 and mingw32. */ such as DJGPP 2.03 and mingw32. */
ssize_t ssize_t
readlink (const char *name, char *buf _UNUSED_PARAMETER_, readlink (const char *name, char *buf _GL_UNUSED,
size_t bufsize _UNUSED_PARAMETER_) size_t bufsize _GL_UNUSED)
{ {
struct stat statbuf; struct stat statbuf;

View file

@ -1,6 +1,6 @@
# Add this package to a list of references stored in a text file. # Add this package to a list of references stored in a text file.
# #
# Copyright (C) 2000 Free Software Foundation, Inc. # Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by # it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
# Remove this package from a list of references stored in a text file. # Remove this package from a list of references stored in a text file.
# #
# Copyright (C) 2000 Free Software Foundation, Inc. # Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by # it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,7 +1,7 @@
/* An interface to read and write that retries after interrupts. /* An interface to read and write that retries after interrupts.
Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 Free Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2010 Free Software
Software Foundation, Inc. Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* An interface to read() that retries after interrupts. /* An interface to read() that retries after interrupts.
Copyright (C) 2002, 2006 Free Software Foundation, Inc. Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* An interface to write that retries after interrupts. /* An interface to write that retries after interrupts.
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* An interface to write() that retries after interrupts. /* An interface to write() that retries after interrupts.
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers /* size_max.h -- declare SIZE_MAX through system headers
Copyright (C) 2005-2006 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Simon Josefsson. Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Work around platform bugs in stat. /* Work around platform bugs in stat.
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>. /* Substitute for and wrapper around <stdarg.h>.
Copyright (C) 2008 Free Software Foundation, Inc. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc. /* Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001. Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc. /* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib. This file is part of gnulib.

View file

@ -1,5 +1,5 @@
/* POSIX compatible FILE stream write function. /* POSIX compatible FILE stream write function.
Copyright (C) 2008-2009 Free Software Foundation, Inc. Copyright (C) 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008. Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>. /* A GNU-like <stdio.h>.
Copyright (C) 2004, 2007-2009 Free Software Foundation, Inc. Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -36,35 +36,31 @@
#ifndef _GL_STDIO_H #ifndef _GL_STDIO_H
#define _GL_STDIO_H #define _GL_STDIO_H
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h> #include <stddef.h>
#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \ /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */
|| (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \ #include <sys/types.h>
|| (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
|| (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
/* Get off_t and ssize_t. */
# include <sys/types.h>
#endif
#ifndef __attribute__ #ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */ /* The __attribute__ feature is available in gcc versions 2.5 and later.
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) The __-protected variants of the attributes 'format' and 'printf' are
# define __attribute__(Spec) /* empty */ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
# endif We enable __attribute__ only if these are supported too, because
/* The __-protected variants of `format' and `printf' attributes gnulib and libintl do '#define printf __printf__' when they override
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ the 'printf' function. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format # define __attribute__(Spec) /* empty */
# define __printf__ printf
# endif # endif
#endif #endif
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -80,10 +76,10 @@ extern int dprintf (int fd, const char *format, ...)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef dprintf # undef dprintf
# define dprintf(d,f,a) \ # if HAVE_RAW_DECL_DPRINTF
(GL_LINK_WARNING ("dprintf is unportable - " \ _GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
"use gnulib module dprintf for portability"), \ "use gnulib module dprintf for portability");
dprintf (d, f, a)) # endif
#endif #endif
#if @GNULIB_FCLOSE@ #if @GNULIB_FCLOSE@
@ -94,11 +90,9 @@ extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fclose # undef fclose
# define fclose(f) \ /* Assume fclose is always declared. */
(GL_LINK_WARNING ("fclose is not always POSIX compliant - " \ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
"use gnulib module fclose for portable " \ "use gnulib module fclose for portable POSIX compliance");
"POSIX compliance"), \
fclose (f))
#endif #endif
#if @GNULIB_FFLUSH@ #if @GNULIB_FFLUSH@
@ -114,13 +108,17 @@ extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fflush # undef fflush
# define fflush(f) \ /* Assume fflush is always declared. */
(GL_LINK_WARNING ("fflush is not always POSIX compliant - " \ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
"use gnulib module fflush for portable " \ "use gnulib module fflush for portable POSIX compliance");
"POSIX compliance"), \
fflush (f))
#endif #endif
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#if @GNULIB_FOPEN@ #if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@ # if @REPLACE_FOPEN@
# undef fopen # undef fopen
@ -130,10 +128,9 @@ extern FILE * fopen (const char *filename, const char *mode)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fopen # undef fopen
# define fopen(f,m) \ /* Assume fopen is always declared. */
(GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \ _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
"use gnulib module fopen for portability"), \ "use gnulib module fopen for portability");
fopen (f, m))
#endif #endif
#if @GNULIB_FPRINTF_POSIX@ #if @GNULIB_FPRINTF_POSIX@
@ -150,11 +147,10 @@ extern int fprintf (FILE *fp, const char *format, ...)
_GL_ARG_NONNULL ((1, 2)); _GL_ARG_NONNULL ((1, 2));
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fprintf # undef fprintf
# define fprintf \ /* Assume fprintf is always declared. */
(GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
"use gnulib module fprintf-posix for portable " \ "use gnulib module fprintf-posix for portable "
"POSIX compliance"), \ "POSIX compliance");
fprintf)
#endif #endif
#if @GNULIB_FPURGE@ #if @GNULIB_FPURGE@
@ -172,10 +168,10 @@ extern int fprintf (FILE *fp, const char *format, ...)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fpurge # undef fpurge
# define fpurge(f) \ # if HAVE_RAW_DECL_FPURGE
(GL_LINK_WARNING ("fpurge is not always present - " \ _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
"use gnulib module fpurge for portability"), \ "use gnulib module fpurge for portability");
fpurge (f)) # endif
#endif #endif
#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
@ -199,98 +195,141 @@ extern FILE * freopen (const char *filename, const char *mode, FILE *stream)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef freopen # undef freopen
# define freopen(f,m,s) \ /* Assume freopen is always declared. */
(GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \ _GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - "
"use gnulib module freopen for portability"), \ "use gnulib module freopen for portability");
freopen (f, m, s))
#endif #endif
#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@ /* Set up the following warnings, based on which modules are in use.
extern int rpl_fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1)); GNU Coding Standards discourage the use of fseek, since it imposes
# undef fseek an arbitrary limitation on some 32-bit hosts. Remember that the
# if defined GNULIB_POSIXCHECK fseek module depends on the fseeko module, so we only have three
# define fseek(f,o,w) \ cases to consider:
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \ 1. The developer is not using either module. Issue a warning under
"use fseeko function for handling of large files"), \ GNULIB_POSIXCHECK for both functions, to remind them that both
rpl_fseek (f, o, w)) functions have bugs on some systems. _GL_NO_LARGE_FILES has no
# else impact on this warning.
# define fseek rpl_fseek
2. The developer is using both modules. They may be unaware of the
arbitrary limitations of fseek, so issue a warning under
GNULIB_POSIXCHECK. On the other hand, they may be using both
modules intentionally, so the developer can define
_GL_NO_LARGE_FILES in the compilation units where the use of fseek
is safe, to silence the warning.
3. The developer is using the fseeko module, but not fseek. Gnulib
guarantees that fseek will still work around platform bugs in that
case, but we presume that the developer is aware of the pitfalls of
fseek and was trying to avoid it, so issue a warning even when
GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be
defined to silence the warning in particular compilation units.
Most gnulib clients that perform stream operations should fall into
category three. */
#if @GNULIB_FSEEK@
# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
# define _GL_FSEEK_WARN /* Category 2, above. */
# undef fseek
# endif # endif
#elif defined GNULIB_POSIXCHECK # if @REPLACE_FSEEK@
# ifndef fseek # undef fseek
# define fseek(f,o,w) \ # define fseek rpl_fseek
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \ extern int fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1));
"on 32-bit platforms - " \
"use fseeko function for handling of large files"), \
fseek (f, o, w))
# endif # endif
#endif #endif
#if @GNULIB_FSEEKO@ #if @GNULIB_FSEEKO@
# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
# define _GL_FSEEK_WARN /* Category 3, above. */
# undef fseek
# endif
# if @REPLACE_FSEEKO@ # if @REPLACE_FSEEKO@
/* Provide fseek, fseeko functions that are aware of a preceding /* Provide fseek, fseeko functions that are aware of a preceding
fflush(), and which detect pipes. */ fflush(), and which detect pipes. */
# undef fseeko
# define fseeko rpl_fseeko # define fseeko rpl_fseeko
extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1)); extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1));
# if !@GNULIB_FSEEK@ # if !@GNULIB_FSEEK@
# undef fseek # undef fseek
# define fseek(f,o,w) \ # define fseek rpl_fseek
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \ static inline int _GL_ARG_NONNULL ((1))
"on 32-bit platforms - " \ rpl_fseek (FILE *fp, long offset, int whence)
"use fseeko function for handling of large files"), \ {
fseeko (f, o, w)) return fseeko (fp, offset, whence);
}
# endif # endif
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# define _GL_FSEEK_WARN /* Category 1, above. */
# undef fseek
# undef fseeko # undef fseeko
# define fseeko(f,o,w) \ # if HAVE_RAW_DECL_FSEEKO
(GL_LINK_WARNING ("fseeko is unportable - " \ _GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
"use gnulib module fseeko for portability"), \ "use gnulib module fseeko for portability");
fseeko (f, o, w)) # endif
#endif #endif
#if @GNULIB_FTELL@ && @REPLACE_FTELL@ #ifdef _GL_FSEEK_WARN
extern long rpl_ftell (FILE *fp) _GL_ARG_NONNULL ((1)); # undef _GL_FSEEK_WARN
# undef ftell /* Here, either fseek is undefined (but C89 guarantees that it is
# if GNULIB_POSIXCHECK declared), or it is defined as rpl_fseek (declared above). */
# define ftell(f) \ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ "on 32-bit platforms - "
"on 32-bit platforms - " \ "use fseeko function for handling of large files");
"use ftello function for handling of large files"), \ #endif
rpl_ftell (f))
# else /* See the comments on fseek/fseeko. */
# define ftell rpl_ftell
#if @GNULIB_FTELL@
# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
# define _GL_FTELL_WARN /* Category 2, above. */
# undef ftell
# endif # endif
#elif defined GNULIB_POSIXCHECK # if @REPLACE_FTELL@
# ifndef ftell # undef ftell
# define ftell(f) \ # define ftell rpl_ftell
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ extern long ftell (FILE *fp) _GL_ARG_NONNULL ((1));
"on 32-bit platforms - " \
"use ftello function for handling of large files"), \
ftell (f))
# endif # endif
#endif #endif
#if @GNULIB_FTELLO@ #if @GNULIB_FTELLO@
# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
# define _GL_FTELL_WARN /* Category 3, above. */
# undef ftell
# endif
# if @REPLACE_FTELLO@ # if @REPLACE_FTELLO@
# undef ftello
# define ftello rpl_ftello # define ftello rpl_ftello
extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1)); extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1));
# if !@GNULIB_FTELL@ # if !@GNULIB_FTELL@
# undef ftell # undef ftell
# define ftell(f) \ # define ftell rpl_ftell
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ static inline long _GL_ARG_NONNULL ((1))
"on 32-bit platforms - " \ rpl_ftell (FILE *f)
"use ftello function for handling of large files"), \ {
ftello (f)) return ftello (f);
}
# endif # endif
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# define _GL_FTELL_WARN /* Category 1, above. */
# undef ftell
# undef ftello # undef ftello
# define ftello(f) \ # if HAVE_RAW_DECL_FTELLO
(GL_LINK_WARNING ("ftello is unportable - " \ _GL_WARN_ON_USE (ftello, "ftello is unportable - "
"use gnulib module ftello for portability"), \ "use gnulib module ftello for portability");
ftello (f)) # endif
#endif
#ifdef _GL_FTELL_WARN
# undef _GL_FTELL_WARN
/* Here, either ftell is undefined (but C89 guarantees that it is
declared), or it is defined as rpl_ftell (declared above). */
_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
"on 32-bit platforms - "
"use ftello function for handling of large files");
#endif #endif
#if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
@ -301,7 +340,11 @@ extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
#endif #endif
#if @GNULIB_GETDELIM@ #if @GNULIB_GETDELIM@
# if !@HAVE_DECL_GETDELIM@ # if @REPLACE_GETDELIM@
# undef getdelim
# define getdelim rpl_getdelim
# endif
# if !@HAVE_DECL_GETDELIM@ || @REPLACE_GETDELIM@
/* Read input, up to (and including) the next occurrence of DELIMITER, from /* Read input, up to (and including) the next occurrence of DELIMITER, from
STREAM, store it in *LINEPTR (and NUL-terminate it). STREAM, store it in *LINEPTR (and NUL-terminate it).
*LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
@ -314,10 +357,10 @@ extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getdelim # undef getdelim
# define getdelim(l, s, d, f) \ # if HAVE_RAW_DECL_GETDELIM
(GL_LINK_WARNING ("getdelim is unportable - " \ _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
"use gnulib module getdelim for portability"), \ "use gnulib module getdelim for portability");
getdelim (l, s, d, f)) # endif
#endif #endif
#if @GNULIB_GETLINE@ #if @GNULIB_GETLINE@
@ -337,13 +380,13 @@ extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getline # undef getline
# define getline(l, s, f) \ # if HAVE_RAW_DECL_GETLINE
(GL_LINK_WARNING ("getline is unportable - " \ _GL_WARN_ON_USE (getline, "getline is unportable - "
"use gnulib module getline for portability"), \ "use gnulib module getline for portability");
getline (l, s, f)) # endif
#endif #endif
#if @GNULIB_OBSTACK_PRINTF@ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
# if @REPLACE_OBSTACK_PRINTF@ # if @REPLACE_OBSTACK_PRINTF@
# define obstack_printf rpl_osbtack_printf # define obstack_printf rpl_osbtack_printf
# define obstack_vprintf rpl_obstack_vprintf # define obstack_vprintf rpl_obstack_vprintf
@ -373,10 +416,9 @@ extern void perror (const char *string);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef perror # undef perror
# define perror(s) \ /* Assume perror is always declared. */
(GL_LINK_WARNING ("perror is not always POSIX compliant - " \ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
"use gnulib module perror for portability"), \ "use gnulib module perror for portability");
perror (s))
#endif #endif
#if @GNULIB_POPEN@ #if @GNULIB_POPEN@
@ -388,10 +430,10 @@ extern FILE *popen (const char *cmd, const char *mode)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef popen # undef popen
# define popen(c,m) \ # if HAVE_RAW_DECL_POPEN
(GL_LINK_WARNING ("popen is buggy on some platforms - " \ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
"use gnulib module popen or pipe for more portability"), \ "use gnulib module popen or pipe for more portability");
popen (c, m)) # endif
#endif #endif
#if @GNULIB_PRINTF_POSIX@ #if @GNULIB_PRINTF_POSIX@
@ -408,18 +450,10 @@ extern int printf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1)); __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef printf # undef printf
# define printf \ /* Assume printf is always declared. */
(GL_LINK_WARNING ("printf is not always POSIX compliant - " \ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
"use gnulib module printf-posix for portable " \ "use gnulib module printf-posix for portable "
"POSIX compliance"), \ "POSIX compliance");
printf)
/* Don't break __attribute__((format(printf,M,N))). */
# define format(kind,m,n) format (__##kind##__, m, n)
# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
# define ____printf____ __printf__
# define ____scanf____ __scanf__
# define ____strftime____ __strftime__
# define ____strfmon____ __strfmon__
#endif #endif
#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
@ -448,10 +482,9 @@ extern int remove (const char *name) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef remove # undef remove
# define remove(n) \ /* Assume remove is always declared. */
(GL_LINK_WARNING ("remove cannot handle directories on some platforms - " \ _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
"use gnulib module remove for more portability"), \ "use gnulib module remove for more portability");
remove (n))
#endif #endif
#if @GNULIB_RENAME@ #if @GNULIB_RENAME@
@ -463,10 +496,9 @@ extern int rename (const char *old_filename, const char *new_filename)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef rename # undef rename
# define rename(o,n) \ /* Assume rename is always declared. */
(GL_LINK_WARNING ("rename is buggy on some platforms - " \ _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
"use gnulib module rename for more portability"), \ "use gnulib module rename for more portability");
rename (o, n))
#endif #endif
#if @GNULIB_RENAMEAT@ #if @GNULIB_RENAMEAT@
@ -480,10 +512,10 @@ extern int renameat (int fd1, char const *file1, int fd2, char const *file2)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef renameat # undef renameat
# define renameat(d1,f1,d2,f2) \ # if HAVE_RAW_DECL_RENAMEAT
(GL_LINK_WARNING ("renameat is not portable - " \ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
"use gnulib module renameat for portability"), \ "use gnulib module renameat for portability");
renameat (d1, f1, d2, f2)) # endif
#endif #endif
#if @GNULIB_SNPRINTF@ #if @GNULIB_SNPRINTF@
@ -497,12 +529,21 @@ extern int snprintf (char *str, size_t size, const char *format, ...)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef snprintf # undef snprintf
# define snprintf \ # if HAVE_RAW_DECL_SNPRINTF
(GL_LINK_WARNING ("snprintf is unportable - " \ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
"use gnulib module snprintf for portability"), \ "use gnulib module snprintf for portability");
snprintf) # endif
#endif #endif
/* Some people would argue that sprintf should be handled like gets
(for example, OpenBSD issues a link warning for both functions),
since both can cause security holes due to buffer overruns.
However, we believe that sprintf can be used safely, and is more
efficient than snprintf in those safe cases; and as proof of our
belief, we use sprintf in several gnulib modules. So this header
intentionally avoids adding a warning to sprintf except when
GNULIB_POSIXCHECK is defined. */
#if @GNULIB_SPRINTF_POSIX@ #if @GNULIB_SPRINTF_POSIX@
# if @REPLACE_SPRINTF@ # if @REPLACE_SPRINTF@
# define sprintf rpl_sprintf # define sprintf rpl_sprintf
@ -512,11 +553,10 @@ extern int sprintf (char *str, const char *format, ...)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef sprintf # undef sprintf
# define sprintf \ /* Assume sprintf is always declared. */
(GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
"use gnulib module sprintf-posix for portable " \ "use gnulib module sprintf-posix for portable "
"POSIX compliance"), \ "POSIX compliance");
sprintf)
#endif #endif
#if @GNULIB_VASPRINTF@ #if @GNULIB_VASPRINTF@
@ -546,10 +586,10 @@ extern int vdprintf (int fd, const char *format, va_list args)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef vdprintf # undef vdprintf
# define vdprintf(d,f,a) \ # if HAVE_RAW_DECL_VDPRINTF
(GL_LINK_WARNING ("vdprintf is unportable - " \ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
"use gnulib module vdprintf for portability"), \ "use gnulib module vdprintf for portability");
vdprintf (d, f, a)) # endif
#endif #endif
#if @GNULIB_VFPRINTF_POSIX@ #if @GNULIB_VFPRINTF_POSIX@
@ -566,11 +606,10 @@ extern int vfprintf (FILE *fp, const char *format, va_list args)
_GL_ARG_NONNULL ((1, 2)); _GL_ARG_NONNULL ((1, 2));
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef vfprintf # undef vfprintf
# define vfprintf(s,f,a) \ /* Assume vfprintf is always declared. */
(GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
"use gnulib module vfprintf-posix for portable " \ "use gnulib module vfprintf-posix for portable "
"POSIX compliance"), \ "POSIX compliance");
vfprintf (s, f, a))
#endif #endif
#if @GNULIB_VPRINTF_POSIX@ #if @GNULIB_VPRINTF_POSIX@
@ -585,11 +624,10 @@ extern int vprintf (const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1)); __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef vprintf # undef vprintf
# define vprintf(f,a) \ /* Assume vprintf is always declared. */
(GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
"use gnulib module vprintf-posix for portable " \ "use gnulib module vprintf-posix for portable "
"POSIX compliance"), \ "POSIX compliance");
vprintf (f, a))
#endif #endif
#if @GNULIB_VSNPRINTF@ #if @GNULIB_VSNPRINTF@
@ -603,10 +641,10 @@ extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef vsnprintf # undef vsnprintf
# define vsnprintf(b,s,f,a) \ # if HAVE_RAW_DECL_VSNPRINTF
(GL_LINK_WARNING ("vsnprintf is unportable - " \ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
"use gnulib module vsnprintf for portability"), \ "use gnulib module vsnprintf for portability");
vsnprintf (b, s, f, a)) # endif
#endif #endif
#if @GNULIB_VSPRINTF_POSIX@ #if @GNULIB_VSPRINTF_POSIX@
@ -618,11 +656,10 @@ extern int vsprintf (char *str, const char *format, va_list args)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef vsprintf # undef vsprintf
# define vsprintf(b,f,a) \ /* Assume vsprintf is always declared. */
(GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"use gnulib module vsprintf-posix for portable " \ "use gnulib module vsprintf-posix for portable "
"POSIX compliance"), \ "POSIX compliance");
vsprintf (b, f, a))
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>. /* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2004, 2006-2009 Free Software Foundation, Inc. Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -39,7 +39,7 @@
#include <stddef.h> #include <stddef.h>
/* Solaris declares getloadavg() in <sys/loadavg.h>. */ /* Solaris declares getloadavg() in <sys/loadavg.h>. */
#if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
# include <sys/loadavg.h> # include <sys/loadavg.h>
#endif #endif
@ -49,7 +49,8 @@
# include <random.h> # include <random.h>
#endif #endif
#if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@ #if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
|| defined GNULIB_POSIXCHECK
# include <stdint.h> # include <stdint.h>
#endif #endif
@ -66,10 +67,17 @@ struct random_data
}; };
#endif #endif
/* The definition of GL_LINK_WARNING is copied here. */ #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems. */
# include <unistd.h>
#endif
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS #ifndef EXIT_SUCCESS
@ -97,10 +105,10 @@ extern long long atoll (const char *string) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef atoll # undef atoll
# define atoll(s) \ # if HAVE_RAW_DECL_ATOLL
(GL_LINK_WARNING ("atoll is unportable - " \ _GL_WARN_ON_USE (atoll, "atoll is unportable - "
"use gnulib module atoll for portability"), \ "use gnulib module atoll for portability");
atoll (s)) # endif
#endif #endif
#if @GNULIB_CALLOC_POSIX@ #if @GNULIB_CALLOC_POSIX@
@ -111,10 +119,9 @@ extern void * calloc (size_t nmemb, size_t size);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef calloc # undef calloc
# define calloc(n,s) \ /* Assume calloc is always declared. */
(GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
"use gnulib module calloc-posix for portability"), \ "use gnulib module calloc-posix for portability");
calloc (n, s))
#endif #endif
#if @GNULIB_CANONICALIZE_FILE_NAME@ #if @GNULIB_CANONICALIZE_FILE_NAME@
@ -126,10 +133,10 @@ extern char *canonicalize_file_name (const char *name) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef canonicalize_file_name # undef canonicalize_file_name
# define canonicalize_file_name(n) \ # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
(GL_LINK_WARNING ("canonicalize_file_name is unportable - " \ _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - "
"use gnulib module canonicalize-lgpl for portability"), \ "use gnulib module canonicalize-lgpl for portability");
canonicalize_file_name (n)) # endif
#endif #endif
#if @GNULIB_GETLOADAVG@ #if @GNULIB_GETLOADAVG@
@ -142,10 +149,10 @@ extern int getloadavg (double loadavg[], int nelem) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getloadavg # undef getloadavg
# define getloadavg(l,n) \ # if HAVE_RAW_DECL_GETLOADAVG
(GL_LINK_WARNING ("getloadavg is not portable - " \ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
"use gnulib module getloadavg for portability"), \ "use gnulib module getloadavg for portability");
getloadavg (l, n)) # endif
#endif #endif
#if @GNULIB_GETSUBOPT@ #if @GNULIB_GETSUBOPT@
@ -166,10 +173,10 @@ extern int getsubopt (char **optionp, char *const *tokens, char **valuep)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getsubopt # undef getsubopt
# define getsubopt(o,t,v) \ # if HAVE_RAW_DECL_GETSUBOPT
(GL_LINK_WARNING ("getsubopt is unportable - " \ _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
"use gnulib module getsubopt for portability"), \ "use gnulib module getsubopt for portability");
getsubopt (o, t, v)) # endif
#endif #endif
#if @GNULIB_MALLOC_POSIX@ #if @GNULIB_MALLOC_POSIX@
@ -180,10 +187,9 @@ extern void * malloc (size_t size);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef malloc # undef malloc
# define malloc(s) \ /* Assume malloc is always declared. */
(GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
"use gnulib module malloc-posix for portability"), \ "use gnulib module malloc-posix for portability");
malloc (s))
#endif #endif
#if @GNULIB_MKDTEMP@ #if @GNULIB_MKDTEMP@
@ -197,10 +203,10 @@ extern char * mkdtemp (char * /*template*/) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkdtemp # undef mkdtemp
# define mkdtemp(t) \ # if HAVE_RAW_DECL_MKDTEMP
(GL_LINK_WARNING ("mkdtemp is unportable - " \ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
"use gnulib module mkdtemp for portability"), \ "use gnulib module mkdtemp for portability");
mkdtemp (t)) # endif
#endif #endif
#if @GNULIB_MKOSTEMP@ #if @GNULIB_MKOSTEMP@
@ -221,10 +227,10 @@ extern int mkostemp (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkostemp # undef mkostemp
# define mkostemp(t,f) \ # if HAVE_RAW_DECL_MKOSTEMP
(GL_LINK_WARNING ("mkostemp is unportable - " \ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
"use gnulib module mkostemp for portability"), \ "use gnulib module mkostemp for portability");
mkostemp (t, f)) # endif
#endif #endif
#if @GNULIB_MKOSTEMPS@ #if @GNULIB_MKOSTEMPS@
@ -247,10 +253,10 @@ extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkostemps # undef mkostemps
# define mkostemps(t,s,f) \ # if HAVE_RAW_DECL_MKOSTEMPS
(GL_LINK_WARNING ("mkostemps is unportable - " \ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
"use gnulib module mkostemps for portability"), \ "use gnulib module mkostemps for portability");
mkostemps (t, s, f)) # endif
#endif #endif
#if @GNULIB_MKSTEMP@ #if @GNULIB_MKSTEMP@
@ -266,16 +272,13 @@ extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/)
set. */ set. */
# define mkstemp rpl_mkstemp # define mkstemp rpl_mkstemp
extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1)); extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1));
# else
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
# include <unistd.h>
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkstemp # undef mkstemp
# define mkstemp(t) \ # if HAVE_RAW_DECL_MKSTEMP
(GL_LINK_WARNING ("mkstemp is unportable - " \ _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
"use gnulib module mkstemp for portability"), \ "use gnulib module mkstemp for portability");
mkstemp (t)) # endif
#endif #endif
#if @GNULIB_MKSTEMPS@ #if @GNULIB_MKSTEMPS@
@ -295,10 +298,10 @@ extern int mkstemps (char * /*template*/, int /*suffixlen*/)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkstemps # undef mkstemps
# define mkstemps(t,s) \ # if HAVE_RAW_DECL_MKSTEMPS
(GL_LINK_WARNING ("mkstemps is unportable - " \ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
"use gnulib module mkstemps for portability"), \ "use gnulib module mkstemps for portability");
mkstemps (t, s)) # endif
#endif #endif
#if @GNULIB_PUTENV@ #if @GNULIB_PUTENV@
@ -328,25 +331,25 @@ int random_r (struct random_data *buf, int32_t *result)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef random_r # undef random_r
# define random_r(b,r) \ # if HAVE_RAW_DECL_RANDOM_R
(GL_LINK_WARNING ("random_r is unportable - " \ _GL_WARN_ON_USE (random_r, "random_r is unportable - "
"use gnulib module random_r for portability"), \ "use gnulib module random_r for portability");
random_r (b,r)) # endif
# undef initstate_r # undef initstate_r
# define initstate_r(s,b,sz,r) \ # if HAVE_RAW_DECL_INITSTATE_R
(GL_LINK_WARNING ("initstate_r is unportable - " \ _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
"use gnulib module random_r for portability"), \ "use gnulib module random_r for portability");
initstate_r (s,b,sz,r)) # endif
# undef srandom_r # undef srandom_r
# define srandom_r(s,r) \ # if HAVE_RAW_DECL_SRANDOM_R
(GL_LINK_WARNING ("srandom_r is unportable - " \ _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
"use gnulib module random_r for portability"), \ "use gnulib module random_r for portability");
srandom_r (s,r)) # endif
# undef setstate_r # undef setstate_r
# define setstate_r(a,r) \ # if HAVE_RAW_DECL_SETSTATE_R
(GL_LINK_WARNING ("setstate_r is unportable - " \ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
"use gnulib module random_r for portability"), \ "use gnulib module random_r for portability");
setstate_r (a,r)) # endif
#endif #endif
#if @GNULIB_REALLOC_POSIX@ #if @GNULIB_REALLOC_POSIX@
@ -357,10 +360,9 @@ extern void * realloc (void *ptr, size_t size);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef realloc # undef realloc
# define realloc(p,s) \ /* Assume realloc is always declared. */
(GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
"use gnulib module realloc-posix for portability"), \ "use gnulib module realloc-posix for portability");
realloc (p, s))
#endif #endif
#if @GNULIB_REALPATH@ #if @GNULIB_REALPATH@
@ -372,10 +374,10 @@ extern char *realpath (const char *name, char *resolved) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef realpath # undef realpath
# define realpath(n,r) \ # if HAVE_RAW_DECL_REALPATH
(GL_LINK_WARNING ("realpath is unportable - use gnulib module " \ _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
"canonicalize or canonicalize-lgpl for portability"), \ "canonicalize or canonicalize-lgpl for portability");
realpath (n, r)) # endif
#endif #endif
#if @GNULIB_RPMATCH@ #if @GNULIB_RPMATCH@
@ -386,10 +388,10 @@ extern int rpmatch (const char *response) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef rpmatch # undef rpmatch
# define rpmatch(r) \ # if HAVE_RAW_DECL_RPMATCH
(GL_LINK_WARNING ("rpmatch is unportable - " \ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
"use gnulib module rpmatch for portability"), \ "use gnulib module rpmatch for portability");
rpmatch (r)) # endif
#endif #endif
#if @GNULIB_SETENV@ #if @GNULIB_SETENV@
@ -405,10 +407,10 @@ extern int setenv (const char *name, const char *value, int replace)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef setenv # undef setenv
# define setenv(n,v,o) \ # if HAVE_RAW_DECL_SETENV
(GL_LINK_WARNING ("setenv is unportable - " \ _GL_WARN_ON_USE (setenv, "setenv is unportable - "
"use gnulib module setenv for portability"), \ "use gnulib module setenv for portability");
setenv (n, v, o)) # endif
#endif #endif
#if @GNULIB_STRTOD@ #if @GNULIB_STRTOD@
@ -421,10 +423,10 @@ extern double strtod (const char *str, char **endp) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strtod # undef strtod
# define strtod(s, e) \ # if HAVE_RAW_DECL_STRTOD
(GL_LINK_WARNING ("strtod is unportable - " \ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
"use gnulib module strtod for portability"), \ "use gnulib module strtod for portability");
strtod (s, e)) # endif
#endif #endif
#if @GNULIB_STRTOLL@ #if @GNULIB_STRTOLL@
@ -442,10 +444,10 @@ extern long long strtoll (const char *string, char **endptr, int base)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strtoll # undef strtoll
# define strtoll(s,e,b) \ # if HAVE_RAW_DECL_STRTOLL
(GL_LINK_WARNING ("strtoll is unportable - " \ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
"use gnulib module strtoll for portability"), \ "use gnulib module strtoll for portability");
strtoll (s, e, b)) # endif
#endif #endif
#if @GNULIB_STRTOULL@ #if @GNULIB_STRTOULL@
@ -463,10 +465,10 @@ extern unsigned long long strtoull (const char *string, char **endptr, int base)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strtoull # undef strtoull
# define strtoull(s,e,b) \ # if HAVE_RAW_DECL_STRTOULL
(GL_LINK_WARNING ("strtoull is unportable - " \ _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
"use gnulib module strtoull for portability"), \ "use gnulib module strtoull for portability");
strtoull (s, e, b)) # endif
#endif #endif
#if @GNULIB_UNSETENV@ #if @GNULIB_UNSETENV@
@ -480,10 +482,10 @@ extern int unsetenv (const char *name) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef unsetenv # undef unsetenv
# define unsetenv(n) \ # if HAVE_RAW_DECL_UNSETENV
(GL_LINK_WARNING ("unsetenv is unportable - " \ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
"use gnulib module unsetenv for portability"), \ "use gnulib module unsetenv for portability");
unsetenv (n)) # endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1,5 +1,5 @@
/* Case-insensitive string comparison function. /* Case-insensitive string comparison function.
Copyright (C) 1998-1999, 2005-2007 Free Software Foundation, Inc. Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Optimized string comparison. /* Optimized string comparison.
Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc. Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published under the terms of the GNU Lesser General Public License as published

View file

@ -1,5 +1,4 @@
/* Copyright (C) 1991-1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2009 Free Software /* Copyright (C) 1991-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library. NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

View file

@ -1,6 +1,6 @@
/* declarations for strftime.c /* declarations for strftime.c
Copyright (C) 2002, 2004, 2008 Free Software Foundation, Inc. Copyright (C) 2002, 2004, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion with error handling. /* Character set conversion with error handling.
Copyright (C) 2001-2009 Free Software Foundation, Inc. Copyright (C) 2001-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson. Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Character set conversion with error handling. /* Character set conversion with error handling.
Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc. Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson. Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A GNU-like <string.h>. /* A GNU-like <string.h>.
Copyright (C) 1995-1996, 2001-2009 Free Software Foundation, Inc. Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -31,6 +31,11 @@
/* NetBSD 5.0 mis-defines NULL. */ /* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h> #include <stddef.h>
/* MirBSD defines mbslen as a macro. */
#if @GNULIB_MBSLEN@ && defined __MirBSD__
# include <wchar.h>
#endif
#ifndef __attribute__ #ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */ /* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
@ -43,10 +48,10 @@
#endif #endif
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -62,10 +67,9 @@ extern void *memchr (void const *__s, int __c, size_t __n)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef memchr # undef memchr
# define memchr(s,c,n) \ /* Assume memchr is always declared. */
(GL_LINK_WARNING ("memchr has platform-specific bugs - " \ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
"use gnulib module memchr for portability" ), \ "use gnulib module memchr for portability" );
memchr (s, c, n))
#endif #endif
/* Return the first occurrence of NEEDLE in HAYSTACK. */ /* Return the first occurrence of NEEDLE in HAYSTACK. */
@ -80,11 +84,11 @@ extern void *memmem (void const *__haystack, size_t __haystack_len,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef memmem # undef memmem
# define memmem(a,al,b,bl) \ # if HAVE_RAW_DECL_MEMMEM
(GL_LINK_WARNING ("memmem is unportable and often quadratic - " \ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
"use gnulib module memmem-simple for portability, " \ "use gnulib module memmem-simple for portability, "
"and module memmem for speed" ), \ "and module memmem for speed" );
memmem (a, al, b, bl)) # endif
#endif #endif
/* Copy N bytes of SRC to DEST, return pointer to bytes after the /* Copy N bytes of SRC to DEST, return pointer to bytes after the
@ -97,10 +101,10 @@ extern void *mempcpy (void *restrict __dest, void const *restrict __src,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mempcpy # undef mempcpy
# define mempcpy(a,b,n) \ # if HAVE_RAW_DECL_MEMPCPY
(GL_LINK_WARNING ("mempcpy is unportable - " \ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
"use gnulib module mempcpy for portability"), \ "use gnulib module mempcpy for portability");
mempcpy (a, b, n)) # endif
#endif #endif
/* Search backwards through a block for a byte (specified as an int). */ /* Search backwards through a block for a byte (specified as an int). */
@ -111,10 +115,10 @@ extern void *memrchr (void const *, int, size_t)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef memrchr # undef memrchr
# define memrchr(a,b,c) \ # if HAVE_RAW_DECL_MEMRCHR
(GL_LINK_WARNING ("memrchr is unportable - " \ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
"use gnulib module memrchr for portability"), \ "use gnulib module memrchr for portability");
memrchr (a, b, c)) # endif
#endif #endif
/* Find the first occurrence of C in S. More efficient than /* Find the first occurrence of C in S. More efficient than
@ -127,10 +131,10 @@ extern void *rawmemchr (void const *__s, int __c_in)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef rawmemchr # undef rawmemchr
# define rawmemchr(a,b) \ # if HAVE_RAW_DECL_RAWMEMCHR
(GL_LINK_WARNING ("rawmemchr is unportable - " \ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
"use gnulib module rawmemchr for portability"), \ "use gnulib module rawmemchr for portability");
rawmemchr (a, b)) # endif
#endif #endif
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
@ -141,10 +145,10 @@ extern char *stpcpy (char *restrict __dst, char const *restrict __src)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef stpcpy # undef stpcpy
# define stpcpy(a,b) \ # if HAVE_RAW_DECL_STPCPY
(GL_LINK_WARNING ("stpcpy is unportable - " \ _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
"use gnulib module stpcpy for portability"), \ "use gnulib module stpcpy for portability");
stpcpy (a, b)) # endif
#endif #endif
/* Copy no more than N bytes of SRC to DST, returning a pointer past the /* Copy no more than N bytes of SRC to DST, returning a pointer past the
@ -158,21 +162,20 @@ extern char *stpncpy (char *restrict __dst, char const *restrict __src,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef stpncpy # undef stpncpy
# define stpncpy(a,b,n) \ # if HAVE_RAW_DECL_STPNCPY
(GL_LINK_WARNING ("stpncpy is unportable - " \ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
"use gnulib module stpncpy for portability"), \ "use gnulib module stpncpy for portability");
stpncpy (a, b, n)) # endif
#endif #endif
#if defined GNULIB_POSIXCHECK #if defined GNULIB_POSIXCHECK
/* strchr() does not work with multibyte strings if the locale encoding is /* strchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */ GB18030 and the character to be searched is a digit. */
# undef strchr # undef strchr
# define strchr(s,c) \ /* Assume strchr is always declared. */
(GL_LINK_WARNING ("strchr cannot work correctly on character strings " \ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
"in some multibyte locales - " \ "in some multibyte locales - "
"use mbschr if you care about internationalization"), \ "use mbschr if you care about internationalization");
strchr (s, c))
#endif #endif
/* Find the first occurrence of C in S or the final NUL byte. */ /* Find the first occurrence of C in S or the final NUL byte. */
@ -183,10 +186,10 @@ extern char *strchrnul (char const *__s, int __c_in)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strchrnul # undef strchrnul
# define strchrnul(a,b) \ # if HAVE_RAW_DECL_STRCHRNUL
(GL_LINK_WARNING ("strchrnul is unportable - " \ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
"use gnulib module strchrnul for portability"), \ "use gnulib module strchrnul for portability");
strchrnul (a, b)) # endif
#endif #endif
/* Duplicate S, returning an identical malloc'd string. */ /* Duplicate S, returning an identical malloc'd string. */
@ -200,10 +203,10 @@ extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strdup # undef strdup
# define strdup(a) \ # if HAVE_RAW_DECL_STRDUP
(GL_LINK_WARNING ("strdup is unportable - " \ _GL_WARN_ON_USE (strdup, "strdup is unportable - "
"use gnulib module strdup for portability"), \ "use gnulib module strdup for portability");
strdup (a)) # endif
#endif #endif
/* Return a newly allocated copy of at most N bytes of STRING. */ /* Return a newly allocated copy of at most N bytes of STRING. */
@ -217,10 +220,10 @@ extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strndup # undef strndup
# define strndup(a,n) \ # if HAVE_RAW_DECL_STRNDUP
(GL_LINK_WARNING ("strndup is unportable - " \ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
"use gnulib module strndup for portability"), \ "use gnulib module strndup for portability");
strndup (a, n)) # endif
#endif #endif
/* Find the length (number of bytes) of STRING, but scan at most /* Find the length (number of bytes) of STRING, but scan at most
@ -233,10 +236,10 @@ extern size_t strnlen (char const *__string, size_t __maxlen)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strnlen # undef strnlen
# define strnlen(a,n) \ # if HAVE_RAW_DECL_STRNLEN
(GL_LINK_WARNING ("strnlen is unportable - " \ _GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
"use gnulib module strnlen for portability"), \ "use gnulib module strnlen for portability");
strnlen (a, n)) # endif
#endif #endif
#if defined GNULIB_POSIXCHECK #if defined GNULIB_POSIXCHECK
@ -245,11 +248,10 @@ extern size_t strnlen (char const *__string, size_t __maxlen)
locale encoding is GB18030 and one of the characters to be searched is a locale encoding is GB18030 and one of the characters to be searched is a
digit. */ digit. */
# undef strcspn # undef strcspn
# define strcspn(s,a) \ /* Assume strcspn is always declared. */
(GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
"in multibyte locales - " \ "in multibyte locales - "
"use mbscspn if you care about internationalization"), \ "use mbscspn if you care about internationalization");
strcspn (s, a))
#endif #endif
/* Find the first occurrence in S of any character in ACCEPT. */ /* Find the first occurrence in S of any character in ACCEPT. */
@ -264,40 +266,36 @@ extern char *strpbrk (char const *__s, char const *__accept)
locale encoding is GB18030 and one of the characters to be searched is a locale encoding is GB18030 and one of the characters to be searched is a
digit. */ digit. */
# undef strpbrk # undef strpbrk
# define strpbrk(s,a) \ _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
(GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \ "in multibyte locales - "
"in multibyte locales - " \ "use mbspbrk if you care about internationalization");
"use mbspbrk if you care about internationalization"), \
strpbrk (s, a))
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strpbrk # undef strpbrk
# define strpbrk(s,a) \ # if HAVE_RAW_DECL_STRPBRK
(GL_LINK_WARNING ("strpbrk is unportable - " \ _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
"use gnulib module strpbrk for portability"), \ "use gnulib module strpbrk for portability");
strpbrk (s, a)) # endif
#endif #endif
#if defined GNULIB_POSIXCHECK #if defined GNULIB_POSIXCHECK
/* strspn() assumes the second argument is a list of single-byte characters. /* strspn() assumes the second argument is a list of single-byte characters.
Even in this simple case, it cannot work with multibyte strings. */ Even in this simple case, it cannot work with multibyte strings. */
# undef strspn # undef strspn
# define strspn(s,a) \ /* Assume strspn is always declared. */
(GL_LINK_WARNING ("strspn cannot work correctly on character strings " \ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
"in multibyte locales - " \ "in multibyte locales - "
"use mbsspn if you care about internationalization"), \ "use mbsspn if you care about internationalization");
strspn (s, a))
#endif #endif
#if defined GNULIB_POSIXCHECK #if defined GNULIB_POSIXCHECK
/* strrchr() does not work with multibyte strings if the locale encoding is /* strrchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */ GB18030 and the character to be searched is a digit. */
# undef strrchr # undef strrchr
# define strrchr(s,c) \ /* Assume strrchr is always declared. */
(GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
"in some multibyte locales - " \ "in some multibyte locales - "
"use mbsrchr if you care about internationalization"), \ "use mbsrchr if you care about internationalization");
strrchr (s, c))
#endif #endif
/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. /* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
@ -323,18 +321,16 @@ extern char *strsep (char **restrict __stringp, char const *restrict __delim)
# endif # endif
# if defined GNULIB_POSIXCHECK # if defined GNULIB_POSIXCHECK
# undef strsep # undef strsep
# define strsep(s,d) \ _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
(GL_LINK_WARNING ("strsep cannot work correctly on character strings " \ "in multibyte locales - "
"in multibyte locales - " \ "use mbssep if you care about internationalization");
"use mbssep if you care about internationalization"), \
strsep (s, d))
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strsep # undef strsep
# define strsep(s,d) \ # if HAVE_RAW_DECL_STRSEP
(GL_LINK_WARNING ("strsep is unportable - " \ _GL_WARN_ON_USE (strsep, "strsep is unportable - "
"use gnulib module strsep for portability"), \ "use gnulib module strsep for portability");
strsep (s, d)) # endif
#endif #endif
#if @GNULIB_STRSTR@ #if @GNULIB_STRSTR@
@ -349,13 +345,12 @@ extern char *strstr (const char *haystack, const char *needle)
POSIX says that it operates on "strings", and "string" in POSIX is defined POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */ as a sequence of bytes, not of characters. */
# undef strstr # undef strstr
# define strstr(a,b) \ /* Assume strstr is always declared. */
(GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
"work correctly on character strings in most " \ "work correctly on character strings in most "
"multibyte locales - " \ "multibyte locales - "
"use mbsstr if you care about internationalization, " \ "use mbsstr if you care about internationalization, "
"or use strstr if you care about speed"), \ "or use strstr if you care about speed");
strstr (a, b))
#endif #endif
/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
@ -373,13 +368,13 @@ extern char *strcasestr (const char *haystack, const char *needle)
It is a glibc extension, and glibc implements it only for unibyte It is a glibc extension, and glibc implements it only for unibyte
locales. */ locales. */
# undef strcasestr # undef strcasestr
# define strcasestr(a,b) \ # if HAVE_RAW_DECL_STRCASESTR
(GL_LINK_WARNING ("strcasestr does work correctly on character strings " \ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
"in multibyte locales - " \ "strings in multibyte locales - "
"use mbscasestr if you care about " \ "use mbscasestr if you care about "
"internationalization, or use c-strcasestr if you want " \ "internationalization, or use c-strcasestr if you want "
"a locale independent function"), \ "a locale independent function");
strcasestr (a, b)) # endif
#endif #endif
/* Parse S into tokens separated by characters in DELIM. /* Parse S into tokens separated by characters in DELIM.
@ -408,7 +403,7 @@ extern char *strcasestr (const char *haystack, const char *needle)
# if @REPLACE_STRTOK_R@ # if @REPLACE_STRTOK_R@
# undef strtok_r # undef strtok_r
# define strtok_r rpl_strtok_r # define strtok_r rpl_strtok_r
# elif @UNDEFINE_STRTOK_R@ # elif @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
# undef strtok_r # undef strtok_r
# endif # endif
# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@ # if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
@ -417,19 +412,16 @@ extern char *strtok_r (char *restrict s, char const *restrict delim,
_GL_ARG_NONNULL ((2, 3)); _GL_ARG_NONNULL ((2, 3));
# endif # endif
# if defined GNULIB_POSIXCHECK # if defined GNULIB_POSIXCHECK
# undef strtok_r _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
# define strtok_r(s,d,p) \ "strings in multibyte locales - "
(GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \ "use mbstok_r if you care about internationalization");
"in multibyte locales - " \
"use mbstok_r if you care about internationalization"), \
strtok_r (s, d, p))
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strtok_r # undef strtok_r
# define strtok_r(s,d,p) \ # if HAVE_RAW_DECL_STRTOK_R
(GL_LINK_WARNING ("strtok_r is unportable - " \ _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
"use gnulib module strtok_r for portability"), \ "use gnulib module strtok_r for portability");
strtok_r (s, d, p)) # endif
#endif #endif
@ -439,6 +431,12 @@ extern char *strtok_r (char *restrict s, char const *restrict delim,
#if @GNULIB_MBSLEN@ #if @GNULIB_MBSLEN@
/* Return the number of multibyte characters in the character string STRING. /* Return the number of multibyte characters in the character string STRING.
This considers multibyte characters, unlike strlen, which counts bytes. */ This considers multibyte characters, unlike strlen, which counts bytes. */
# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */
# undef mbslen
# endif
# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */
# define mbslen rpl_mbslen
# endif
extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1)); extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1));
#endif #endif
@ -603,10 +601,9 @@ extern char *strerror (int);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strerror # undef strerror
# define strerror(e) \ /* Assume strerror is always declared. */
(GL_LINK_WARNING ("strerror is unportable - " \ _GL_WARN_ON_USE (strerror, "strerror is unportable - "
"use gnulib module strerror to guarantee non-NULL result"), \ "use gnulib module strerror to guarantee non-NULL result");
strerror (e))
#endif #endif
#if @GNULIB_STRSIGNAL@ #if @GNULIB_STRSIGNAL@
@ -618,10 +615,10 @@ extern char *strsignal (int __sig);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strsignal # undef strsignal
# define strsignal(a) \ # if HAVE_RAW_DECL_STRSIGNAL
(GL_LINK_WARNING ("strsignal is unportable - " \ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
"use gnulib module strsignal for portability"), \ "use gnulib module strsignal for portability");
strsignal (a)) # endif
#endif #endif
#if @GNULIB_STRVERSCMP@ #if @GNULIB_STRVERSCMP@
@ -630,10 +627,10 @@ extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef strverscmp # undef strverscmp
# define strverscmp(a, b) \ # if HAVE_RAW_DECL_STRVERSCMP
(GL_LINK_WARNING ("strverscmp is unportable - " \ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
"use gnulib module strverscmp for portability"), \ "use gnulib module strverscmp for portability");
strverscmp (a, b)) # endif
#endif #endif

View file

@ -1,6 +1,6 @@
/* A substitute <strings.h>. /* A substitute <strings.h>.
Copyright (C) 2007-2009 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -29,10 +29,9 @@
#define _GL_STRINGS_H #define _GL_STRINGS_H
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -52,14 +51,14 @@ extern int strcasecmp (char const *s1, char const *s2)
POSIX says that it operates on "strings", and "string" in POSIX is defined POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */ as a sequence of bytes, not of characters. */
# undef strcasecmp # undef strcasecmp
# define strcasecmp(a,b) \ # if HAVE_RAW_DECL_STRCASECMP
(GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \ _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
"in multibyte locales - " \ "strings in multibyte locales - "
"use mbscasecmp if you care about " \ "use mbscasecmp if you care about "
"internationalization, or use c_strcasecmp (from " \ "internationalization, or use c_strcasecmp , "
"gnulib module c-strcase) if you want a locale " \ "gnulib module c-strcase) if you want a locale "
"independent function"), \ "independent function");
strcasecmp (a, b)) # endif
#endif #endif
/* Compare no more than N bytes of strings S1 and S2, ignoring case, /* Compare no more than N bytes of strings S1 and S2, ignoring case,
@ -75,14 +74,14 @@ extern int strncasecmp (char const *s1, char const *s2, size_t n)
POSIX says that it operates on "strings", and "string" in POSIX is defined POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */ as a sequence of bytes, not of characters. */
# undef strncasecmp # undef strncasecmp
# define strncasecmp(a,b,n) \ # if HAVE_RAW_DECL_STRNCASECMP
(GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \ _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
"strings in multibyte locales - " \ "strings in multibyte locales - "
"use mbsncasecmp or mbspcasecmp if you care about " \ "use mbsncasecmp or mbspcasecmp if you care about "
"internationalization, or use c_strncasecmp (from " \ "internationalization, or use c_strncasecmp , "
"gnulib module c-strcase) if you want a locale " \ "gnulib module c-strcase) if you want a locale "
"independent function"), \ "independent function");
strncasecmp (a, b, n)) # endif
#endif #endif

View file

@ -1,5 +1,5 @@
/* strncasecmp.c -- case insensitive string comparator /* strncasecmp.c -- case insensitive string comparator
Copyright (C) 1998-1999, 2005-2007 Free Software Foundation, Inc. Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Provide a more complete sys/file.h. /* Provide a more complete sys/file.h.
Copyright (C) 2007-2008 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -31,28 +31,30 @@
#ifndef _GL_SYS_FILE_H #ifndef _GL_SYS_FILE_H
#define _GL_SYS_FILE_H #define _GL_SYS_FILE_H
#ifndef LOCK_SH
/* Operations for the 'flock' call (same as Linux kernel constants). */
# define LOCK_SH 1 /* Shared lock. */
# define LOCK_EX 2 /* Exclusive lock. */
# define LOCK_UN 8 /* Unlock. */
/* Can be OR'd in to one of the above. */
# define LOCK_NB 4 /* Don't block when locking. */
#endif
/* The definition of _GL_WARN_ON_USE is copied here. */
#if @GNULIB_FLOCK@ #if @GNULIB_FLOCK@
/* Apply or remove advisory locks on an open file. /* Apply or remove advisory locks on an open file.
Return 0 if successful, otherwise -1 and errno set. */ Return 0 if successful, otherwise -1 and errno set. */
# if !@HAVE_FLOCK@ # if !@HAVE_FLOCK@
extern int flock (int fd, int operation); extern int flock (int fd, int operation);
/* Operations for the 'flock' call (same as Linux kernel constants). */
#define LOCK_SH 1 /* Shared lock. */
#define LOCK_EX 2 /* Exclusive lock. */
#define LOCK_UN 8 /* Unlock. */
/* Can be OR'd in to one of the above. */
#define LOCK_NB 4 /* Don't block when locking. */
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef flock # undef flock
# define flock(fd,op) \ # if HAVE_RAW_DECL_FLOCK
(GL_LINK_WARNING ("flock is unportable - " \ _GL_WARN_ON_USE (flock, "flock is unportable - "
"use gnulib module flock for portability"), \ "use gnulib module flock for portability");
flock ((fd), (op))) # endif
#endif #endif

View file

@ -1,6 +1,6 @@
/* Provide a sys/socket header file for systems lacking it (read: MinGW) /* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete. and for systems where it is incomplete.
Copyright (C) 2005-2009 Free Software Foundation, Inc. Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Simon Josefsson. Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@ -126,7 +126,7 @@ struct sockaddr_storage
# define SHUT_RDWR SD_BOTH # define SHUT_RDWR SD_BOTH
# endif # endif
/* The definition of GL_LINK_WARNING is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */
# if @HAVE_WINSOCK2_H@ # if @HAVE_WINSOCK2_H@
/* Include headers needed by the emulation code. */ /* Include headers needed by the emulation code. */
@ -187,10 +187,10 @@ extern int rpl_socket (int, int, int protocol);
# define socket socket_used_without_requesting_gnulib_module_socket # define socket socket_used_without_requesting_gnulib_module_socket
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef socket # undef socket
# define socket(d,t,p) \ # if HAVE_RAW_DECL_SOCKET
(GL_LINK_WARNING ("socket is not always POSIX compliant - " \ _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - "
"use gnulib module socket for portability"), \ "use gnulib module socket for portability");
socket (d, t, p)) # endif
# endif # endif
# if @GNULIB_CONNECT@ # if @GNULIB_CONNECT@
@ -204,10 +204,10 @@ extern int rpl_connect (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
# define connect socket_used_without_requesting_gnulib_module_connect # define connect socket_used_without_requesting_gnulib_module_connect
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef connect # undef connect
# define connect(s,a,l) \ # if HAVE_RAW_DECL_CONNECT
(GL_LINK_WARNING ("connect is not always POSIX compliant - " \ _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
"use gnulib module connect for portability"), \ "use gnulib module connect for portability");
connect (s, a, l)) # endif
# endif # endif
# if @GNULIB_ACCEPT@ # if @GNULIB_ACCEPT@
@ -221,10 +221,10 @@ extern int rpl_accept (int, struct sockaddr *, int *);
# define accept accept_used_without_requesting_gnulib_module_accept # define accept accept_used_without_requesting_gnulib_module_accept
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef accept # undef accept
# define accept(s,a,l) \ # if HAVE_RAW_DECL_ACCEPT
(GL_LINK_WARNING ("accept is not always POSIX compliant - " \ _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - "
"use gnulib module accept for portability"), \ "use gnulib module accept for portability");
accept (s, a, l)) # endif
# endif # endif
# if @GNULIB_BIND@ # if @GNULIB_BIND@
@ -238,10 +238,10 @@ extern int rpl_bind (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
# define bind bind_used_without_requesting_gnulib_module_bind # define bind bind_used_without_requesting_gnulib_module_bind
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef bind # undef bind
# define bind(s,a,l) \ # if HAVE_RAW_DECL_BIND
(GL_LINK_WARNING ("bind is not always POSIX compliant - " \ _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
"use gnulib module bind for portability"), \ "use gnulib module bind for portability");
bind (s, a, l)) # endif
# endif # endif
# if @GNULIB_GETPEERNAME@ # if @GNULIB_GETPEERNAME@
@ -256,10 +256,10 @@ extern int rpl_getpeername (int, struct sockaddr *, int *)
# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef getpeername # undef getpeername
# define getpeername(s,a,l) \ # if HAVE_RAW_DECL_GETPEERNAME
(GL_LINK_WARNING ("getpeername is not always POSIX compliant - " \ _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
"use gnulib module getpeername for portability"), \ "use gnulib module getpeername for portability");
getpeername (s, a, l)) # endif
# endif # endif
# if @GNULIB_GETSOCKNAME@ # if @GNULIB_GETSOCKNAME@
@ -274,10 +274,10 @@ extern int rpl_getsockname (int, struct sockaddr *, int *)
# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef getsockname # undef getsockname
# define getsockname(s,a,l) \ # if HAVE_RAW_DECL_GETSOCKNAME
(GL_LINK_WARNING ("getsockname is not always POSIX compliant - " \ _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
"use gnulib module getsockname for portability"), \ "use gnulib module getsockname for portability");
getsockname (s, a, l)) # endif
# endif # endif
# if @GNULIB_GETSOCKOPT@ # if @GNULIB_GETSOCKOPT@
@ -292,10 +292,10 @@ extern int rpl_getsockopt (int, int, int, void *, socklen_t *)
# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef getsockopt # undef getsockopt
# define getsockopt(s,lvl,o,v,l) \ # if HAVE_RAW_DECL_GETSOCKOPT
(GL_LINK_WARNING ("getsockopt is not always POSIX compliant - " \ _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - "
"use gnulib module getsockopt for portability"), \ "use gnulib module getsockopt for portability");
getsockopt (s, lvl, o, v, l)) # endif
# endif # endif
# if @GNULIB_LISTEN@ # if @GNULIB_LISTEN@
@ -309,10 +309,10 @@ extern int rpl_listen (int, int);
# define listen listen_used_without_requesting_gnulib_module_listen # define listen listen_used_without_requesting_gnulib_module_listen
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef listen # undef listen
# define listen(s,b) \ # if HAVE_RAW_DECL_LISTEN
(GL_LINK_WARNING ("listen is not always POSIX compliant - " \ _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - "
"use gnulib module listen for portability"), \ "use gnulib module listen for portability");
listen (s, b)) # endif
# endif # endif
# if @GNULIB_RECV@ # if @GNULIB_RECV@
@ -326,10 +326,10 @@ extern int rpl_recv (int, void *, int, int) _GL_ARG_NONNULL ((2));
# define recv recv_used_without_requesting_gnulib_module_recv # define recv recv_used_without_requesting_gnulib_module_recv
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef recv # undef recv
# define recv(s,b,n,f) \ # if HAVE_RAW_DECL_RECV
(GL_LINK_WARNING ("recv is not always POSIX compliant - " \ _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - "
"use gnulib module recv for portability"), \ "use gnulib module recv for portability");
recv (s, b, n, f)) # endif
# endif # endif
# if @GNULIB_SEND@ # if @GNULIB_SEND@
@ -343,10 +343,10 @@ extern int rpl_send (int, const void *, int, int) _GL_ARG_NONNULL ((2));
# define send send_used_without_requesting_gnulib_module_send # define send send_used_without_requesting_gnulib_module_send
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef send # undef send
# define send(s,b,n,f) \ # if HAVE_RAW_DECL_SEND
(GL_LINK_WARNING ("send is not always POSIX compliant - " \ _GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
"use gnulib module send for portability"), \ "use gnulib module send for portability");
send (s, b, n, f)) # endif
# endif # endif
# if @GNULIB_RECVFROM@ # if @GNULIB_RECVFROM@
@ -361,10 +361,10 @@ extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *)
# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef recvfrom # undef recvfrom
# define recvfrom(s,b,n,f,a,l) \ # if HAVE_RAW_DECL_RECVFROM
(GL_LINK_WARNING ("recvfrom is not always POSIX compliant - " \ _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - "
"use gnulib module recvfrom for portability"), \ "use gnulib module recvfrom for portability");
recvfrom (s, b, n, f, a, l)) # endif
# endif # endif
# if @GNULIB_SENDTO@ # if @GNULIB_SENDTO@
@ -379,10 +379,10 @@ extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int)
# define sendto sendto_used_without_requesting_gnulib_module_sendto # define sendto sendto_used_without_requesting_gnulib_module_sendto
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef sendto # undef sendto
# define sendto(s,b,n,f,a,l) \ # if HAVE_RAW_DECL_SENDTO
(GL_LINK_WARNING ("sendto is not always POSIX compliant - " \ _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - "
"use gnulib module sendto for portability"), \ "use gnulib module sendto for portability");
sendto (s, b, n, f, a, l)) # endif
# endif # endif
# if @GNULIB_SETSOCKOPT@ # if @GNULIB_SETSOCKOPT@
@ -397,10 +397,10 @@ extern int rpl_setsockopt (int, int, int, const void *, socklen_t)
# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef setsockopt # undef setsockopt
# define setsockopt(s,lvl,o,v,l) \ # if HAVE_RAW_DECL_SETSOCKOPT
(GL_LINK_WARNING ("setsockopt is not always POSIX compliant - " \ _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - "
"use gnulib module setsockopt for portability"), \ "use gnulib module setsockopt for portability");
setsockopt (s, lvl, o, v, l)) # endif
# endif # endif
# if @GNULIB_SHUTDOWN@ # if @GNULIB_SHUTDOWN@
@ -414,10 +414,10 @@ extern int rpl_shutdown (int, int);
# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
# elif defined GNULIB_POSIXCHECK # elif defined GNULIB_POSIXCHECK
# undef shutdown # undef shutdown
# define shutdown(s,h) \ # if HAVE_RAW_DECL_SHUTDOWN
(GL_LINK_WARNING ("shutdown is not always POSIX compliant - " \ _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
"use gnulib module shutdown for portability"), \ "use gnulib module shutdown for portability");
shutdown (s, h)) # endif
# endif # endif
# if @HAVE_WINSOCK2_H@ # if @HAVE_WINSOCK2_H@
@ -448,10 +448,10 @@ extern int accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
int flags); int flags);
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef accept4 # undef accept4
# define accept4(s,a,l,f) \ # if HAVE_RAW_DECL_ACCEPT4
(GL_LINK_WARNING ("accept4 is unportable - " \ _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
"use gnulib module accept4 for portability"), \ "use gnulib module accept4 for portability");
accept4 (s, a, l, f)) # endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1,5 +1,5 @@
/* Provide a more complete sys/stat header file. /* Provide a more complete sys/stat header file.
Copyright (C) 2005-2009 Free Software Foundation, Inc. Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -47,10 +47,10 @@
#ifndef _GL_SYS_STAT_H #ifndef _GL_SYS_STAT_H
#define _GL_SYS_STAT_H #define _GL_SYS_STAT_H
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
headers that may declare mkdir(). */ headers that may declare mkdir(). */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@ -302,10 +302,10 @@ extern int fchmodat (int fd, char const *file, mode_t mode, int flag)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fchmodat # undef fchmodat
# define fchmodat(d,n,m,f) \ # if HAVE_RAW_DECL_FCHMODAT
(GL_LINK_WARNING ("fchmodat is not portable - " \ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
"use gnulib module openat for portability"), \ "use gnulib module openat for portability");
fchmodat (d, n, m, f)) # endif
#endif #endif
@ -326,10 +326,10 @@ extern int fstatat (int fd, char const *name, struct stat *st, int flags)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fstatat # undef fstatat
# define fstatat(d,n,s,f) \ # if HAVE_RAW_DECL_FSTATAT
(GL_LINK_WARNING ("fstatat is not portable - " \ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
"use gnulib module openat for portability"), \ "use gnulib module openat for portability");
fstatat (d, n, s, f)) # endif
#endif #endif
@ -343,10 +343,10 @@ extern int futimens (int fd, struct timespec const times[2]);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef futimens # undef futimens
# define futimens(f,t) \ # if HAVE_RAW_DECL_FUTIMENS
(GL_LINK_WARNING ("futimens is not portable - " \ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
"use gnulib module futimens for portability"), \ "use gnulib module futimens for portability");
futimens (f, t)) # endif
#endif #endif
@ -368,10 +368,10 @@ extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef lchmod # undef lchmod
# define lchmod(f,m) \ # if HAVE_RAW_DECL_LCHMOD
(GL_LINK_WARNING ("lchmod is unportable - " \ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
"use gnulib module lchmod for portability"), \ "use gnulib module lchmod for portability");
lchmod (f, m)) # endif
#endif #endif
@ -388,10 +388,10 @@ extern int rpl_lstat (const char *name, struct stat *buf)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef lstat # undef lstat
# define lstat(p,b) \ # if HAVE_RAW_DECL_LSTAT
(GL_LINK_WARNING ("lstat is unportable - " \ _GL_WARN_ON_USE (lstat, "lstat is unportable - "
"use gnulib module lstat for portability"), \ "use gnulib module lstat for portability");
lstat (p, b)) # endif
#endif #endif
@ -423,10 +423,10 @@ extern int mkdirat (int fd, char const *file, mode_t mode)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkdirat # undef mkdirat
# define mkdirat(d,n,m) \ # if HAVE_RAW_DECL_MKDIRAT
(GL_LINK_WARNING ("mkdirat is not portable - " \ _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
"use gnulib module openat for portability"), \ "use gnulib module openat for portability");
mkdirat (d, n, m)) # endif
#endif #endif
@ -440,10 +440,10 @@ extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkfifo # undef mkfifo
# define mkfifo(n,m) \ # if HAVE_RAW_DECL_MKFIFO
(GL_LINK_WARNING ("mkfifo is not portable - " \ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
"use gnulib module mkfifo for portability"), \ "use gnulib module mkfifo for portability");
mkfifo (n, m)) # endif
#endif #endif
@ -454,10 +454,10 @@ extern int mkfifoat (int fd, char const *file, mode_t mode)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mkfifoat # undef mkfifoat
# define mkfifoat(d,n,m) \ # if HAVE_RAW_DECL_MKFIFOAT
(GL_LINK_WARNING ("mkfifoat is not portable - " \ _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
"use gnulib module mkfifoat for portability"), \ "use gnulib module mkfifoat for portability");
mkfifoat (d, n, m)) # endif
#endif #endif
@ -472,10 +472,10 @@ extern int mknod (char const *file, mode_t mode, dev_t dev)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mknod # undef mknod
# define mknod(n,m,d) \ # if HAVE_RAW_DECL_MKNOD
(GL_LINK_WARNING ("mknod is not portable - " \ _GL_WARN_ON_USE (mknod, "mknod is not portable - "
"use gnulib module mknod for portability"), \ "use gnulib module mknod for portability");
mknod (n, m, d)) # endif
#endif #endif
@ -486,10 +486,10 @@ extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef mknodat # undef mknodat
# define mknodat(f,n,m,d) \ # if HAVE_RAW_DECL_MKNODAT
(GL_LINK_WARNING ("mknodat is not portable - " \ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
"use gnulib module mkfifoat for portability"), \ "use gnulib module mkfifoat for portability");
mknodat (f, n, m, d)) # endif
#endif #endif
@ -512,10 +512,10 @@ extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef stat # undef stat
# define stat(p,b) \ # if HAVE_RAW_DECL_STAT
(GL_LINK_WARNING ("stat is unportable - " \ _GL_WARN_ON_USE (stat, "stat is unportable - "
"use gnulib module stat for portability"), \ "use gnulib module stat for portability");
stat (p, b)) # endif
#endif #endif
@ -531,10 +531,10 @@ extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef utimensat # undef utimensat
# define utimensat(d,n,t,f) \ # if HAVE_RAW_DECL_UTIMENSAT
(GL_LINK_WARNING ("utimensat is not portable - " \ _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
"use gnulib module utimensat for portability"), \ "use gnulib module utimensat for portability");
utimensat (d, n, t, f)) # endif
#endif #endif

View file

@ -1,6 +1,6 @@
/* A more-standard <time.h>. /* A more-standard <time.h>.
Copyright (C) 2007-2009 Free Software Foundation, Inc. Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Reentrant time functions like localtime_r. /* Reentrant time functions like localtime_r.
Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. Copyright (C) 2003, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>. /* Substitute for and wrapper around <unistd.h>.
Copyright (C) 2003-2009 Free Software Foundation, Inc. Copyright (C) 2003-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -33,23 +33,43 @@
#include <stddef.h> #include <stddef.h>
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
|| (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
&& ! defined __GLIBC__
# include <stdio.h> # include <stdio.h>
#endif #endif
/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
# include <fcntl.h>
#endif
/* mingw fails to declare _exit in <unistd.h>. */ /* mingw fails to declare _exit in <unistd.h>. */
/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
#include <stdlib.h> /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# include <stdlib.h>
#endif
#if ((@GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@) \ /* mingw declares getcwd in <io.h>, not in <unistd.h>. */
|| (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
|| (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@)) && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
# include <io.h>
#endif
#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
|| @GNULIB_PREAD@ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */ /* Get ssize_t. */
# include <sys/types.h> # include <sys/types.h>
#endif #endif
/* Get getopt(), optarg, optind, opterr, optopt. */ /* Get getopt(), optarg, optind, opterr, optopt.
#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT But avoid namespace pollution on glibc systems. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
# include <getopt.h> # include <getopt.h>
#endif #endif
@ -94,10 +114,10 @@
# endif # endif
#endif #endif
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* OS/2 EMX lacks these macros. */ /* OS/2 EMX lacks these macros. */
#ifndef STDIN_FILENO #ifndef STDIN_FILENO
@ -142,11 +162,11 @@ extern int chown (const char *file, uid_t uid, gid_t gid)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef chown # undef chown
# define chown(f,u,g) \ # if HAVE_RAW_DECL_CHOWN
(GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
"doesn't treat a uid or gid of -1 on some systems - " \ "doesn't treat a uid or gid of -1 on some systems - "
"use gnulib module chown for portability"), \ "use gnulib module chown for portability");
chown (f, u, g)) # endif
#endif #endif
@ -162,10 +182,9 @@ extern int close (int);
# define close close_used_without_requesting_gnulib_module_close # define close close_used_without_requesting_gnulib_module_close
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef close # undef close
# define close(f) \ /* Assume close is always declared. */
(GL_LINK_WARNING ("close does not portably work on sockets - " \ _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
"use gnulib module close for portability"), \ "use gnulib module close for portability");
close (f))
#endif #endif
@ -189,10 +208,10 @@ extern int dup2 (int oldfd, int newfd);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef dup2 # undef dup2
# define dup2(o,n) \ # if HAVE_RAW_DECL_DUP2
(GL_LINK_WARNING ("dup2 is unportable - " \ _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
"use gnulib module dup2 for portability"), \ "use gnulib module dup2 for portability");
dup2 (o, n)) # endif
#endif #endif
@ -211,10 +230,10 @@ extern int dup2 (int oldfd, int newfd);
extern int dup3 (int oldfd, int newfd, int flags); extern int dup3 (int oldfd, int newfd, int flags);
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef dup3 # undef dup3
# define dup3(o,n,f) \ # if HAVE_RAW_DECL_DUP3
(GL_LINK_WARNING ("dup3 is unportable - " \ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
"use gnulib module dup3 for portability"), \ "use gnulib module dup3 for portability");
dup3 (o, n, f)) # endif
#endif #endif
@ -230,11 +249,17 @@ extern char **environ;
# endif # endif
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef environ # if HAVE_RAW_DECL_ENVIRON
# define environ \ static inline char ***
(GL_LINK_WARNING ("environ is unportable - " \ rpl_environ (void)
"use gnulib module environ for portability"), \ {
environ) return &environ;
}
_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
"use gnulib module environ for portability");
# undef environ
# define environ (*rpl_environ ())
# endif
#endif #endif
@ -246,10 +271,10 @@ extern int euidaccess (const char *filename, int mode) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef euidaccess # undef euidaccess
# define euidaccess(f,m) \ # if HAVE_RAW_DECL_EUIDACCESS
(GL_LINK_WARNING ("euidaccess is unportable - " \ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
"use gnulib module euidaccess for portability"), \ "use gnulib module euidaccess for portability");
euidaccess (f, m)) # endif
#endif #endif
@ -260,10 +285,10 @@ extern int faccessat (int fd, char const *file, int mode, int flag)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef faccessat # undef faccessat
# define faccessat(d,n,m,f) \ # if HAVE_RAW_DECL_FACCESSAT
(GL_LINK_WARNING ("faccessat is not portable - " \ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
"use gnulib module faccessat for portability"), \ "use gnulib module faccessat for portability");
faccessat (d, n, m, f)) # endif
#endif #endif
@ -286,10 +311,10 @@ extern const char *_gl_directory_name (int fd);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fchdir # undef fchdir
# define fchdir(f) \ # if HAVE_RAW_DECL_FCHDIR
(GL_LINK_WARNING ("fchdir is unportable - " \ _GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
"use gnulib module fchdir for portability"), \ "use gnulib module fchdir for portability");
fchdir (f)) # endif
#endif #endif
@ -304,10 +329,10 @@ extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int fla
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fchownat # undef fchownat
# define fchownat(d,n,o,g,f) \ # if HAVE_RAW_DECL_FCHOWNAT
(GL_LINK_WARNING ("fchownat is not portable - " \ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
"use gnulib module openat for portability"), \ "use gnulib module openat for portability");
fchownat (d, n, o, g, f)) # endif
#endif #endif
@ -321,10 +346,10 @@ extern int fsync (int fd);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef fsync # undef fsync
# define fsync(fd) \ # if HAVE_RAW_DECL_FSYNC
(GL_LINK_WARNING ("fsync is unportable - " \ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
"use gnulib module fsync for portability"), \ "use gnulib module fsync for portability");
fsync (fd)) # endif
#endif #endif
@ -338,17 +363,14 @@ extern int ftruncate (int fd, off_t length);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef ftruncate # undef ftruncate
# define ftruncate(f,l) \ # if HAVE_RAW_DECL_FTRUNCATE
(GL_LINK_WARNING ("ftruncate is unportable - " \ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
"use gnulib module ftruncate for portability"), \ "use gnulib module ftruncate for portability");
ftruncate (f, l)) # endif
#endif #endif
#if @GNULIB_GETCWD@ #if @GNULIB_GETCWD@
/* Include the headers that might declare getcwd so that they will not
cause confusion if included after this file. */
# include <stdlib.h>
# if @REPLACE_GETCWD@ # if @REPLACE_GETCWD@
/* Get the name of the current working directory, and put it in SIZE bytes /* Get the name of the current working directory, and put it in SIZE bytes
of BUF. of BUF.
@ -365,10 +387,10 @@ extern char * getcwd (char *buf, size_t size);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getcwd # undef getcwd
# define getcwd(b,s) \ # if HAVE_RAW_DECL_GETCWD
(GL_LINK_WARNING ("getcwd is unportable - " \ _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
"use gnulib module getcwd for portability"), \ "use gnulib module getcwd for portability");
getcwd (b, s)) # endif
#endif #endif
@ -388,10 +410,10 @@ extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getdomainname # undef getdomainname
# define getdomainname(n,l) \ # if HAVE_RAW_DECL_GETDOMAINNAME
(GL_LINK_WARNING ("getdomainname is unportable - " \ _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
"use gnulib module getdomainname for portability"), \ "use gnulib module getdomainname for portability");
getdomainname (n, l)) # endif
#endif #endif
@ -403,10 +425,10 @@ extern int getdtablesize (void);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getdtablesize # undef getdtablesize
# define getdtablesize() \ # if HAVE_RAW_DECL_GETDTABLESIZE
(GL_LINK_WARNING ("getdtablesize is unportable - " \ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
"use gnulib module getdtablesize for portability"), \ "use gnulib module getdtablesize for portability");
getdtablesize ()) # endif
#endif #endif
@ -425,10 +447,10 @@ int getgroups (int n, gid_t *groups);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getgroups # undef getgroups
# define getgroups(n,g) \ # if HAVE_RAW_DECL_GETGROUPS
(GL_LINK_WARNING ("getgroups is unportable - " \ _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
"use gnulib module getgroups for portability"), \ "use gnulib module getgroups for portability");
getgroups (n, g)) # endif
#endif #endif
@ -452,10 +474,33 @@ extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1));
# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef gethostname # undef gethostname
# define gethostname(n,l) \ # if HAVE_RAW_DECL_GETHOSTNAME
(GL_LINK_WARNING ("gethostname is unportable - " \ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
"use gnulib module gethostname for portability"), \ "use gnulib module gethostname for portability");
gethostname (n, l)) # endif
#endif
#if @GNULIB_GETLOGIN@
/* Returns the user's login name, or NULL if it cannot be found. Upon error,
returns NULL with errno set.
See <http://www.opengroup.org/susv3xsh/getlogin.html>.
Most programs don't need to use this function, because the information is
available through environment variables:
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/
# if !@HAVE_GETLOGIN@
extern char *getlogin (void);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getlogin
# if HAVE_RAW_DECL_GETLOGIN
_GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
"use gnulib module getlogin for portability");
# endif
#endif #endif
@ -468,16 +513,21 @@ extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1));
provided (this case is hopefully rare but is left open by the POSIX spec). provided (this case is hopefully rare but is left open by the POSIX spec).
See <http://www.opengroup.org/susv3xsh/getlogin.html>. See <http://www.opengroup.org/susv3xsh/getlogin.html>.
Most programs don't need to use this function, because the information is
available through environment variables:
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/ */
# if !@HAVE_DECL_GETLOGIN_R@ # if !@HAVE_DECL_GETLOGIN_R@
extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1)); extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getlogin_r # undef getlogin_r
# define getlogin_r(n,s) \ # if HAVE_RAW_DECL_GETLOGIN_R
(GL_LINK_WARNING ("getlogin_r is unportable - " \ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
"use gnulib module getlogin_r for portability"), \ "use gnulib module getlogin_r for portability");
getlogin_r (n, s)) # endif
#endif #endif
@ -532,10 +582,10 @@ extern int getpagesize (void);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getpagesize # undef getpagesize
# define getpagesize() \ # if HAVE_RAW_DECL_GETPAGESIZE
(GL_LINK_WARNING ("getpagesize is unportable - " \ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
"use gnulib module getpagesize for portability"), \ "use gnulib module getpagesize for portability");
getpagesize ()) # endif
#endif #endif
@ -552,20 +602,20 @@ extern void endusershell (void);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef getusershell # undef getusershell
# define getusershell() \ # if HAVE_RAW_DECL_GETUSERSHELL
(GL_LINK_WARNING ("getusershell is unportable - " \ _GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
"use gnulib module getusershell for portability"), \ "use gnulib module getusershell for portability");
getusershell ()) # endif
# undef setusershell # undef setusershell
# define setusershell() \ # if HAVE_RAW_DECL_SETUSERSHELL
(GL_LINK_WARNING ("setusershell is unportable - " \ _GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
"use gnulib module getusershell for portability"), \ "use gnulib module getusershell for portability");
setusershell ()) # endif
# undef endusershell # undef endusershell
# define endusershell() \ # if HAVE_RAW_DECL_ENDUSERSHELL
(GL_LINK_WARNING ("endusershell is unportable - " \ _GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
"use gnulib module getusershell for portability"), \ "use gnulib module getusershell for portability");
endusershell ()) # endif
#endif #endif
@ -585,10 +635,10 @@ extern int lchown (char const *file, uid_t owner, gid_t group)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef lchown # undef lchown
# define lchown(f,u,g) \ # if HAVE_RAW_DECL_LCHOWN
(GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
"systems - use gnulib module lchown for portability"), \ "use gnulib module lchown for portability");
lchown (f, u, g)) # endif
#endif #endif
@ -606,10 +656,10 @@ extern int link (const char *path1, const char *path2)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef link # undef link
# define link(path1,path2) \ # if HAVE_RAW_DECL_LINK
(GL_LINK_WARNING ("link is unportable - " \ _GL_WARN_ON_USE (link, "link is unportable - "
"use gnulib module link for portability"), \ "use gnulib module link for portability");
link (path1, path2)) # endif
#endif #endif
#if @GNULIB_LINKAT@ #if @GNULIB_LINKAT@
@ -627,10 +677,10 @@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef linkat # undef linkat
# define link(f1,path1,f2,path2,f) \ # if HAVE_RAW_DECL_LINKAT
(GL_LINK_WARNING ("linkat is unportable - " \ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
"use gnulib module linkat for portability"), \ "use gnulib module linkat for portability");
linkat (f1, path1, f2, path2,f)) # endif
#endif #endif
#if @GNULIB_LSEEK@ #if @GNULIB_LSEEK@
@ -644,10 +694,10 @@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef lseek # undef lseek
# define lseek(f,o,w) \ # if HAVE_RAW_DECL_LSEEK
(GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \ _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
"systems - use gnulib module lseek for portability"), \ "systems - use gnulib module lseek for portability");
lseek (f, o, w)) # endif
#endif #endif
@ -666,10 +716,10 @@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1)); extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef pipe2 # undef pipe2
# define pipe2(f,o) \ # if HAVE_RAW_DECL_PIPE2
(GL_LINK_WARNING ("pipe2 is unportable - " \ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
"use gnulib module pipe2 for portability"), \ "use gnulib module pipe2 for portability");
pipe2 (f, o)) # endif
#endif #endif
@ -687,10 +737,10 @@ extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef pread # undef pread
# define pread(f,b,s,o) \ # if HAVE_RAW_DECL_PREAD
(GL_LINK_WARNING ("pread is unportable - " \ _GL_WARN_ON_USE (pread, "pread is unportable - "
"use gnulib module pread for portability"), \ "use gnulib module pread for portability");
pread (f, b, s, o)) # endif
#endif #endif
@ -709,10 +759,10 @@ extern ssize_t readlink (const char *file, char *buf, size_t bufsize)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef readlink # undef readlink
# define readlink(f,b,s) \ # if HAVE_RAW_DECL_READLINK
(GL_LINK_WARNING ("readlink is unportable - " \ _GL_WARN_ON_USE (readlink, "readlink is unportable - "
"use gnulib module readlink for portability"), \ "use gnulib module readlink for portability");
readlink (f, b, s)) # endif
#endif #endif
@ -723,10 +773,10 @@ extern ssize_t readlinkat (int fd, char const *file, char *buf, size_t len)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef readlinkat # undef readlinkat
# define readlinkat(d,n,b,l) \ # if HAVE_RAW_DECL_READLINKAT
(GL_LINK_WARNING ("readlinkat is not portable - " \ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
"use gnulib module symlinkat for portability"), \ "use gnulib module symlinkat for portability");
readlinkat (d, n, b, l)) # endif
#endif #endif
@ -738,10 +788,10 @@ extern int rmdir (char const *name) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef rmdir # undef rmdir
# define rmdir(n) \ # if HAVE_RAW_DECL_RMDIR
(GL_LINK_WARNING ("rmdir is unportable - " \ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
"use gnulib module rmdir for portability"), \ "use gnulib module rmdir for portability");
rmdir (n)) # endif
#endif #endif
@ -759,10 +809,10 @@ extern unsigned int sleep (unsigned int n);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef sleep # undef sleep
# define sleep(n) \ # if HAVE_RAW_DECL_SLEEP
(GL_LINK_WARNING ("sleep is unportable - " \ _GL_WARN_ON_USE (sleep, "sleep is unportable - "
"use gnulib module sleep for portability"), \ "use gnulib module sleep for portability");
sleep (n)) # endif
#endif #endif
@ -777,10 +827,10 @@ extern int symlink (char const *contents, char const *file)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef symlink # undef symlink
# define symlink(c,n) \ # if HAVE_RAW_DECL_SYMLINK
(GL_LINK_WARNING ("symlink is not portable - " \ _GL_WARN_ON_USE (symlink, "symlink is not portable - "
"use gnulib module symlink for portability"), \ "use gnulib module symlink for portability");
symlink (c, n)) # endif
#endif #endif
@ -791,10 +841,10 @@ extern int symlinkat (char const *contents, int fd, char const *file)
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef symlinkat # undef symlinkat
# define symlinkat(c,d,n) \ # if HAVE_RAW_DECL_SYMLINKAT
(GL_LINK_WARNING ("symlinkat is not portable - " \ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
"use gnulib module symlinkat for portability"), \ "use gnulib module symlinkat for portability");
symlinkat (c, d, n)) # endif
#endif #endif
@ -806,10 +856,10 @@ extern int unlink (char const *file) _GL_ARG_NONNULL ((1));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef unlink # undef unlink
# define unlink(n) \ # if HAVE_RAW_DECL_UNLINK
(GL_LINK_WARNING ("unlink is not portable - " \ _GL_WARN_ON_USE (unlink, "unlink is not portable - "
"use gnulib module unlink for portability"), \ "use gnulib module unlink for portability");
unlink (n)) # endif
#endif #endif
@ -823,10 +873,10 @@ extern int unlinkat (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2));
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef unlinkat # undef unlinkat
# define unlinkat(d,n,f) \ # if HAVE_RAW_DECL_UNLINKAT
(GL_LINK_WARNING ("unlinkat is not portable - " \ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
"use gnulib module openat for portability"), \ "use gnulib module openat for portability");
unlinkat (d, n, f)) # endif
#endif #endif
@ -844,10 +894,10 @@ extern int usleep (useconds_t n);
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef usleep # undef usleep
# define usleep(n) \ # if HAVE_RAW_DECL_USLEEP
(GL_LINK_WARNING ("usleep is unportable - " \ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
"use gnulib module usleep for portability"), \ "use gnulib module usleep for portability");
usleep (n)) # endif
#endif #endif

View file

@ -1,5 +1,5 @@
/* Elementary Unicode string functions. /* Elementary Unicode string functions.
Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc. Copyright (C) 2001-2002, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published under the terms of the GNU Lesser General Public License as published
@ -19,6 +19,9 @@
#include "unitypes.h" #include "unitypes.h"
/* Get common macros for C. */
#include "unused-parameter.h"
/* Get bool. */ /* Get bool. */
#include <stdbool.h> #include <stdbool.h>
@ -183,7 +186,8 @@ extern int
u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n); u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
# else # else
static inline int static inline int
u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_) u32_mbtouc_unsafe (ucs4_t *puc,
const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
{ {
uint32_t c = *s; uint32_t c = *s;
@ -253,7 +257,7 @@ extern int
u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
# else # else
static inline int static inline int
u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_) u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
{ {
uint32_t c = *s; uint32_t c = *s;
@ -525,8 +529,8 @@ extern uint16_t *
extern uint32_t * extern uint32_t *
u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n); u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n);
/* Copy no more than N units of SRC to DEST, returning the address of /* Copy no more than N units of SRC to DEST. Return a pointer past the last
the last unit written into DEST. */ non-NUL unit written into DEST. */
/* Similar to stpncpy(). */ /* Similar to stpncpy(). */
extern uint8_t * extern uint8_t *
u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n); u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n);

View file

@ -1,5 +1,5 @@
/* Conversion UTF-8 to UCS-4. /* Conversion UTF-8 to UCS-4.
Copyright (C) 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc. Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Conversion UTF-8 to UCS-4. /* Conversion UTF-8 to UCS-4.
Copyright (C) 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc. Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Look at first character in UTF-8 string. /* Look at first character in UTF-8 string.
Copyright (C) 1999-2002, 2006-2007, 2009 Free Software Foundation, Inc. Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Look at first character in UTF-8 string. /* Look at first character in UTF-8 string.
Copyright (C) 1999-2002, 2006-2007, 2009 Free Software Foundation, Inc. Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Look at first character in UTF-8 string, returning an error code. /* Look at first character in UTF-8 string, returning an error code.
Copyright (C) 1999-2002, 2006-2007 Free Software Foundation, Inc. Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Iterate over previous character in UTF-8 string. /* Iterate over previous character in UTF-8 string.
Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc. Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002. Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it

Some files were not shown because too many files have changed in this diff Show more