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
# 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
# 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
# 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
# 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.
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
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
# 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
# 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
# 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.
#
# This program is free software: you can redistribute it and/or modify
@ -268,7 +268,7 @@ else
fi
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
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
# 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
# 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
# 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 under the terms of the GNU General Public License as published by

View file

@ -1,9 +1,10 @@
#!/bin/sh
# 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
# it under the terms of the GNU General Public License as published by
@ -32,10 +33,11 @@ delete_symlinks=
collect_var=
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
<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>.
Sign all FILES, and process them at selected destinations according to CMD.
<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
explains further.
Commands:
--delete delete FILES from destination
@ -96,6 +98,11 @@ Examples:
--delete oopsbar-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>.
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
# 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
# it under the terms of the GNU General Public License as published by

View file

@ -4,7 +4,7 @@
# Print a version string.
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
# 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!
## 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
# 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.
#
# 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
@ -71,6 +71,11 @@ EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
## 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
# 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.
@ -90,11 +95,11 @@ EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
## 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
# 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_GEN)rm -f $@-t $@ && \
{ 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|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|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_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/arpa_inet.in.h; \
} > $@-t && \
mv $@-t $@
@ -310,6 +315,15 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gendocs.sh
## 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
libgnu_la_SOURCES += gettext.h
@ -445,25 +459,6 @@ AM_CFLAGS += $(CFLAG_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
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
BUILT_SOURCES += $(LOCALE_H)
BUILT_SOURCES += locale.h
# We need the following in order to create <locale.h> when the system
# 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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
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|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
-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; \
} > $@-t && \
mv $@-t $@
@ -631,6 +627,35 @@ EXTRA_libgnu_la_SOURCES += memchr.c
## 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
BUILT_SOURCES += $(NETINET_IN_H)
@ -704,6 +729,15 @@ libgnu_la_SOURCES += size_max.h
## 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
@ -823,7 +857,7 @@ BUILT_SOURCES += stdio.h
# We need the following in order to create <stdio.h> when the system
# 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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
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_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|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_GETLINE''@|$(HAVE_DECL_GETLINE)|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_FTELL''@|$(REPLACE_FTELL)|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_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|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_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|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)' \
< $(srcdir)/stdio.in.h; \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-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
# 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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
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_STRTOD''@|$(REPLACE_STRTOD)|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_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/stdlib.in.h; \
} > $@-t && \
mv $@-t $@
@ -1035,7 +1070,7 @@ BUILT_SOURCES += string.h
# We need the following in order to create <string.h> when the system
# 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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
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_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|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_MEMPCPY''@|$(HAVE_MEMPCPY)|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_STRTOK_R''@|$(REPLACE_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_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
@ -1118,7 +1155,7 @@ BUILT_SOURCES += strings.h
# We need the following in order to create <strings.h> when the system
# 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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
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|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|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_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/strings.in.h; \
} > $@-t && \
mv $@-t $@
@ -1139,11 +1176,11 @@ EXTRA_DIST += strings.in.h
## 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
# 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_GEN)rm -f $@-t $@ && \
{ 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/@''HAVE_FLOCK''@/$(HAVE_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; \
} > $@-t && \
mv $@-t $@
@ -1165,11 +1203,11 @@ EXTRA_DIST += sys_file.in.h
## 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
# 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_GEN)rm -f $@-t $@ && \
{ 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_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|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_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_socket.in.h; \
} > $@-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
# 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_GEN)rm -f $@-t $@ && \
{ 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_STAT''@|$(REPLACE_STAT)|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_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_stat.in.h; \
} > $@-t && \
mv $@-t $@
@ -1311,7 +1349,7 @@ BUILT_SOURCES += unistd.h
# We need the following in order to create an empty placeholder for
# <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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
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_GETGROUPS''@|$(GNULIB_GETGROUPS)|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_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|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_USLEEP''@|$(GNULIB_USLEEP)|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_DUP3''@|$(HAVE_DUP3)|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_GETGROUPS''@|$(HAVE_GETGROUPS)|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_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|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|@''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 '/definition of GL_LINK_WARNING/r $(LINK_WARNING_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 && \
mv $@-t $@
MOSTLYCLEANFILES += unistd.h unistd.h-t
@ -1464,6 +1504,31 @@ EXTRA_DIST += unitypes.h
## 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
@ -1514,13 +1579,32 @@ EXTRA_libgnu_la_SOURCES += vsnprintf.c
## 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
BUILT_SOURCES += $(WCHAR_H)
BUILT_SOURCES += wchar.h
# We need the following in order to create <wchar.h> when the system
# 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 $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
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_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|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_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/wchar.in.h; \
} > $@-t && \
mv $@-t $@

View file

@ -1,5 +1,5 @@
/* 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
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.
Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software
Foundation, Inc.
Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
Inc.
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

View file

@ -1,6 +1,6 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by
@ -19,8 +19,11 @@
#ifndef _GL_ARPA_INET_H
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
under MinGW. */
under MinGW.
But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# include <sys/socket.h>
#endif
#if @HAVE_ARPA_INET_H@
@ -36,10 +39,10 @@
#ifndef _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_WARN_ON_USE is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
@ -67,10 +70,10 @@ extern const char *inet_ntop (int af, const void *restrict src,
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_ntop
# define inet_ntop(af,src,dst,cnt) \
(GL_LINK_WARNING ("inet_ntop is unportable - " \
"use gnulib module inet_ntop for portability"), \
inet_ntop (af, src, dst, cnt))
# if HAVE_RAW_DECL_INET_NTOP
_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - "
"use gnulib module inet_ntop for portability");
# endif
#endif
#if @GNULIB_INET_PTON@
@ -80,10 +83,10 @@ extern int inet_pton (int af, const char *restrict src, void *restrict dst)
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_pton
# define inet_pton(af,src,dst) \
(GL_LINK_WARNING ("inet_pton is unportable - " \
"use gnulib module inet_pton for portability"), \
inet_pton (af, src, dst))
# if HAVE_RAW_DECL_INET_PTON
_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
"use gnulib module inet_pton for portability");
# endif
#endif
#ifdef __cplusplus

View file

@ -1,5 +1,5 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* 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
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
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
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.
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
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
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
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.
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
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
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
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.
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 program is free software: you can redistribute it and/or modify

View file

@ -1,7 +1,7 @@
#! /bin/sh
# 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
# it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

@ -1,6 +1,6 @@
/* 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
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>
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
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.
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
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.
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
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.
Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 1993-1994, 1997-2006, 2009-2010 Free Software Foundation, Inc.
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

View file

@ -1,6 +1,6 @@
/* 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
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>.
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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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
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>.
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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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
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.
Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible.
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
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
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
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
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.
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
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.
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 program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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
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_WARN_ON_USE is copied here. */
/* 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. */
#if !defined LC_MESSAGES
@ -50,10 +52,10 @@ extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef duplocale
# define duplocale(l) \
(GL_LINK_WARNING ("duplocale is buggy on some glibc systems - " \
"use gnulib module duplocale for portability"), \
duplocale (l))
# if HAVE_RAW_DECL_DUPLOCALE
_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
"use gnulib module duplocale for portability");
# endif
#endif
#endif /* _GL_LOCALE_H */

View file

@ -1,7 +1,6 @@
/* Work around a bug of lstat on some systems
Copyright (C) 1997-1999, 2000-2006, 2008-2009 Free Software
Foundation, Inc.
Copyright (C) 1997-2006, 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 Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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.
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.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),

View file

@ -1,5 +1,5 @@
/* 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
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.
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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,6 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,6 @@
/* 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
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
Free Software Foundation, Inc.
/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2010 Free Software
Foundation, Inc.
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.

View file

@ -1,5 +1,5 @@
/* 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
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. */
ssize_t
readlink (const char *name, char *buf _UNUSED_PARAMETER_,
size_t bufsize _UNUSED_PARAMETER_)
readlink (const char *name, char *buf _GL_UNUSED,
size_t bufsize _GL_UNUSED)
{
struct stat statbuf;

View file

@ -1,6 +1,6 @@
# 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
# 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.
#
# 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
# 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.
Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 Free
Software Foundation, Inc.
Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2010 Free Software
Foundation, Inc.
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

View file

@ -1,5 +1,5 @@
/* 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
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.
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
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.
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
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
Copyright (C) 2005-2006 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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
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>.
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
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.
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.
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 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.
This file is part of gnulib.

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by
@ -36,35 +36,31 @@
#ifndef _GL_STDIO_H
#define _GL_STDIO_H
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
#include <stddef.h>
#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
|| (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
|| (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
|| (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
/* Get off_t and ssize_t. */
/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */
#include <sys/types.h>
#endif
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The __-protected variants of the attributes 'format' and 'printf' are
accepted by gcc versions 2.6.4 (effectively 2.7) and later.
We enable __attribute__ only if these are supported too, because
gnulib and libintl do '#define printf __printf__' when they override
the 'printf' function. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
#endif
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus
extern "C" {
@ -80,10 +76,10 @@ extern int dprintf (int fd, const char *format, ...)
# endif
#elif defined GNULIB_POSIXCHECK
# undef dprintf
# define dprintf(d,f,a) \
(GL_LINK_WARNING ("dprintf is unportable - " \
"use gnulib module dprintf for portability"), \
dprintf (d, f, a))
# if HAVE_RAW_DECL_DPRINTF
_GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
"use gnulib module dprintf for portability");
# endif
#endif
#if @GNULIB_FCLOSE@
@ -94,11 +90,9 @@ extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fclose
# define fclose(f) \
(GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
"use gnulib module fclose for portable " \
"POSIX compliance"), \
fclose (f))
/* Assume fclose is always declared. */
_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
"use gnulib module fclose for portable POSIX compliance");
#endif
#if @GNULIB_FFLUSH@
@ -114,13 +108,17 @@ extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fflush
# define fflush(f) \
(GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
"use gnulib module fflush for portable " \
"POSIX compliance"), \
fflush (f))
/* Assume fflush is always declared. */
_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
"use gnulib module fflush for portable POSIX compliance");
#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 @REPLACE_FOPEN@
# undef fopen
@ -130,10 +128,9 @@ extern FILE * fopen (const char *filename, const char *mode)
# endif
#elif defined GNULIB_POSIXCHECK
# undef fopen
# define fopen(f,m) \
(GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \
"use gnulib module fopen for portability"), \
fopen (f, m))
/* Assume fopen is always declared. */
_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
"use gnulib module fopen for portability");
#endif
#if @GNULIB_FPRINTF_POSIX@
@ -150,11 +147,10 @@ extern int fprintf (FILE *fp, const char *format, ...)
_GL_ARG_NONNULL ((1, 2));
#elif defined GNULIB_POSIXCHECK
# undef fprintf
# define fprintf \
(GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
"use gnulib module fprintf-posix for portable " \
"POSIX compliance"), \
fprintf)
/* Assume fprintf is always declared. */
_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
"use gnulib module fprintf-posix for portable "
"POSIX compliance");
#endif
#if @GNULIB_FPURGE@
@ -172,10 +168,10 @@ extern int fprintf (FILE *fp, const char *format, ...)
# endif
#elif defined GNULIB_POSIXCHECK
# undef fpurge
# define fpurge(f) \
(GL_LINK_WARNING ("fpurge is not always present - " \
"use gnulib module fpurge for portability"), \
fpurge (f))
# if HAVE_RAW_DECL_FPURGE
_GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
"use gnulib module fpurge for portability");
# endif
#endif
#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
#elif defined GNULIB_POSIXCHECK
# undef freopen
# define freopen(f,m,s) \
(GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \
"use gnulib module freopen for portability"), \
freopen (f, m, s))
/* Assume freopen is always declared. */
_GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - "
"use gnulib module freopen for portability");
#endif
#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
extern int rpl_fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1));
/* Set up the following warnings, based on which modules are in use.
GNU Coding Standards discourage the use of fseek, since it imposes
an arbitrary limitation on some 32-bit hosts. Remember that the
fseek module depends on the fseeko module, so we only have three
cases to consider:
1. The developer is not using either module. Issue a warning under
GNULIB_POSIXCHECK for both functions, to remind them that both
functions have bugs on some systems. _GL_NO_LARGE_FILES has no
impact on this warning.
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
# if defined GNULIB_POSIXCHECK
# define fseek(f,o,w) \
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use fseeko function for handling of large files"), \
rpl_fseek (f, o, w))
# else
# define fseek rpl_fseek
# endif
#elif defined GNULIB_POSIXCHECK
# ifndef fseek
# define fseek(f,o,w) \
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use fseeko function for handling of large files"), \
fseek (f, o, w))
# if @REPLACE_FSEEK@
# undef fseek
# define fseek rpl_fseek
extern int fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1));
# endif
#endif
#if @GNULIB_FSEEKO@
# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
# define _GL_FSEEK_WARN /* Category 3, above. */
# undef fseek
# endif
# if @REPLACE_FSEEKO@
/* Provide fseek, fseeko functions that are aware of a preceding
fflush(), and which detect pipes. */
# undef fseeko
# define fseeko rpl_fseeko
extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1));
# if !@GNULIB_FSEEK@
# undef fseek
# define fseek(f,o,w) \
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use fseeko function for handling of large files"), \
fseeko (f, o, w))
# define fseek rpl_fseek
static inline int _GL_ARG_NONNULL ((1))
rpl_fseek (FILE *fp, long offset, int whence)
{
return fseeko (fp, offset, whence);
}
# endif
# endif
#elif defined GNULIB_POSIXCHECK
# define _GL_FSEEK_WARN /* Category 1, above. */
# undef fseek
# undef fseeko
# define fseeko(f,o,w) \
(GL_LINK_WARNING ("fseeko is unportable - " \
"use gnulib module fseeko for portability"), \
fseeko (f, o, w))
# if HAVE_RAW_DECL_FSEEKO
_GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
"use gnulib module fseeko for portability");
# endif
#endif
#if @GNULIB_FTELL@ && @REPLACE_FTELL@
extern long rpl_ftell (FILE *fp) _GL_ARG_NONNULL ((1));
# undef ftell
# if GNULIB_POSIXCHECK
# define ftell(f) \
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use ftello function for handling of large files"), \
rpl_ftell (f))
# else
# define ftell rpl_ftell
#ifdef _GL_FSEEK_WARN
# undef _GL_FSEEK_WARN
/* Here, either fseek is undefined (but C89 guarantees that it is
declared), or it is defined as rpl_fseek (declared above). */
_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
"on 32-bit platforms - "
"use fseeko function for handling of large files");
#endif
#elif defined GNULIB_POSIXCHECK
# ifndef ftell
# define ftell(f) \
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use ftello function for handling of large files"), \
ftell (f))
/* See the comments on fseek/fseeko. */
#if @GNULIB_FTELL@
# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
# define _GL_FTELL_WARN /* Category 2, above. */
# undef ftell
# endif
# if @REPLACE_FTELL@
# undef ftell
# define ftell rpl_ftell
extern long ftell (FILE *fp) _GL_ARG_NONNULL ((1));
# endif
#endif
#if @GNULIB_FTELLO@
# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
# define _GL_FTELL_WARN /* Category 3, above. */
# undef ftell
# endif
# if @REPLACE_FTELLO@
# undef ftello
# define ftello rpl_ftello
extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1));
# if !@GNULIB_FTELL@
# undef ftell
# define ftell(f) \
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use ftello function for handling of large files"), \
ftello (f))
# define ftell rpl_ftell
static inline long _GL_ARG_NONNULL ((1))
rpl_ftell (FILE *f)
{
return ftello (f);
}
# endif
# endif
#elif defined GNULIB_POSIXCHECK
# define _GL_FTELL_WARN /* Category 1, above. */
# undef ftell
# undef ftello
# define ftello(f) \
(GL_LINK_WARNING ("ftello is unportable - " \
"use gnulib module ftello for portability"), \
ftello (f))
# if HAVE_RAW_DECL_FTELLO
_GL_WARN_ON_USE (ftello, "ftello is unportable - "
"use gnulib module ftello for portability");
# 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
#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
#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
STREAM, store it in *LINEPTR (and NUL-terminate it).
*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
#elif defined GNULIB_POSIXCHECK
# undef getdelim
# define getdelim(l, s, d, f) \
(GL_LINK_WARNING ("getdelim is unportable - " \
"use gnulib module getdelim for portability"), \
getdelim (l, s, d, f))
# if HAVE_RAW_DECL_GETDELIM
_GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
"use gnulib module getdelim for portability");
# endif
#endif
#if @GNULIB_GETLINE@
@ -337,13 +380,13 @@ extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream)
# endif
#elif defined GNULIB_POSIXCHECK
# undef getline
# define getline(l, s, f) \
(GL_LINK_WARNING ("getline is unportable - " \
"use gnulib module getline for portability"), \
getline (l, s, f))
# if HAVE_RAW_DECL_GETLINE
_GL_WARN_ON_USE (getline, "getline is unportable - "
"use gnulib module getline for portability");
# endif
#endif
#if @GNULIB_OBSTACK_PRINTF@
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
# if @REPLACE_OBSTACK_PRINTF@
# define obstack_printf rpl_osbtack_printf
# define obstack_vprintf rpl_obstack_vprintf
@ -373,10 +416,9 @@ extern void perror (const char *string);
# endif
#elif defined GNULIB_POSIXCHECK
# undef perror
# define perror(s) \
(GL_LINK_WARNING ("perror is not always POSIX compliant - " \
"use gnulib module perror for portability"), \
perror (s))
/* Assume perror is always declared. */
_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
"use gnulib module perror for portability");
#endif
#if @GNULIB_POPEN@
@ -388,10 +430,10 @@ extern FILE *popen (const char *cmd, const char *mode)
# endif
#elif defined GNULIB_POSIXCHECK
# undef popen
# define popen(c,m) \
(GL_LINK_WARNING ("popen is buggy on some platforms - " \
"use gnulib module popen or pipe for more portability"), \
popen (c, m))
# if HAVE_RAW_DECL_POPEN
_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
"use gnulib module popen or pipe for more portability");
# endif
#endif
#if @GNULIB_PRINTF_POSIX@
@ -408,18 +450,10 @@ extern int printf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK
# undef printf
# define printf \
(GL_LINK_WARNING ("printf is not always POSIX compliant - " \
"use gnulib module printf-posix for portable " \
"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__
/* Assume printf is always declared. */
_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
"use gnulib module printf-posix for portable "
"POSIX compliance");
#endif
#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
#elif defined GNULIB_POSIXCHECK
# undef remove
# define remove(n) \
(GL_LINK_WARNING ("remove cannot handle directories on some platforms - " \
"use gnulib module remove for more portability"), \
remove (n))
/* Assume remove is always declared. */
_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
"use gnulib module remove for more portability");
#endif
#if @GNULIB_RENAME@
@ -463,10 +496,9 @@ extern int rename (const char *old_filename, const char *new_filename)
# endif
#elif defined GNULIB_POSIXCHECK
# undef rename
# define rename(o,n) \
(GL_LINK_WARNING ("rename is buggy on some platforms - " \
"use gnulib module rename for more portability"), \
rename (o, n))
/* Assume rename is always declared. */
_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
"use gnulib module rename for more portability");
#endif
#if @GNULIB_RENAMEAT@
@ -480,10 +512,10 @@ extern int renameat (int fd1, char const *file1, int fd2, char const *file2)
# endif
#elif defined GNULIB_POSIXCHECK
# undef renameat
# define renameat(d1,f1,d2,f2) \
(GL_LINK_WARNING ("renameat is not portable - " \
"use gnulib module renameat for portability"), \
renameat (d1, f1, d2, f2))
# if HAVE_RAW_DECL_RENAMEAT
_GL_WARN_ON_USE (renameat, "renameat is not portable - "
"use gnulib module renameat for portability");
# endif
#endif
#if @GNULIB_SNPRINTF@
@ -497,11 +529,20 @@ extern int snprintf (char *str, size_t size, const char *format, ...)
# endif
#elif defined GNULIB_POSIXCHECK
# undef snprintf
# define snprintf \
(GL_LINK_WARNING ("snprintf is unportable - " \
"use gnulib module snprintf for portability"), \
snprintf)
# if HAVE_RAW_DECL_SNPRINTF
_GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
"use gnulib module snprintf for portability");
# 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 @REPLACE_SPRINTF@
@ -512,11 +553,10 @@ extern int sprintf (char *str, const char *format, ...)
# endif
#elif defined GNULIB_POSIXCHECK
# undef sprintf
# define sprintf \
(GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
"use gnulib module sprintf-posix for portable " \
"POSIX compliance"), \
sprintf)
/* Assume sprintf is always declared. */
_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
"use gnulib module sprintf-posix for portable "
"POSIX compliance");
#endif
#if @GNULIB_VASPRINTF@
@ -546,10 +586,10 @@ extern int vdprintf (int fd, const char *format, va_list args)
# endif
#elif defined GNULIB_POSIXCHECK
# undef vdprintf
# define vdprintf(d,f,a) \
(GL_LINK_WARNING ("vdprintf is unportable - " \
"use gnulib module vdprintf for portability"), \
vdprintf (d, f, a))
# if HAVE_RAW_DECL_VDPRINTF
_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
"use gnulib module vdprintf for portability");
# endif
#endif
#if @GNULIB_VFPRINTF_POSIX@
@ -566,11 +606,10 @@ extern int vfprintf (FILE *fp, const char *format, va_list args)
_GL_ARG_NONNULL ((1, 2));
#elif defined GNULIB_POSIXCHECK
# undef vfprintf
# define vfprintf(s,f,a) \
(GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
"use gnulib module vfprintf-posix for portable " \
"POSIX compliance"), \
vfprintf (s, f, a))
/* Assume vfprintf is always declared. */
_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
"use gnulib module vfprintf-posix for portable "
"POSIX compliance");
#endif
#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));
#elif defined GNULIB_POSIXCHECK
# undef vprintf
# define vprintf(f,a) \
(GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
"use gnulib module vprintf-posix for portable " \
"POSIX compliance"), \
vprintf (f, a))
/* Assume vprintf is always declared. */
_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
"use gnulib module vprintf-posix for portable "
"POSIX compliance");
#endif
#if @GNULIB_VSNPRINTF@
@ -603,10 +641,10 @@ extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
# endif
#elif defined GNULIB_POSIXCHECK
# undef vsnprintf
# define vsnprintf(b,s,f,a) \
(GL_LINK_WARNING ("vsnprintf is unportable - " \
"use gnulib module vsnprintf for portability"), \
vsnprintf (b, s, f, a))
# if HAVE_RAW_DECL_VSNPRINTF
_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
"use gnulib module vsnprintf for portability");
# endif
#endif
#if @GNULIB_VSPRINTF_POSIX@
@ -618,11 +656,10 @@ extern int vsprintf (char *str, const char *format, va_list args)
# endif
#elif defined GNULIB_POSIXCHECK
# undef vsprintf
# define vsprintf(b,f,a) \
(GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
"use gnulib module vsprintf-posix for portable " \
"POSIX compliance"), \
vsprintf (b, f, a))
/* Assume vsprintf is always declared. */
_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"use gnulib module vsprintf-posix for portable "
"POSIX compliance");
#endif
#ifdef __cplusplus

View file

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

View file

@ -1,5 +1,5 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* 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
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
Foundation, Inc.
/* Copyright (C) 1991-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
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.

View file

@ -1,6 +1,6 @@
/* 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
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.
Copyright (C) 2001-2009 Free Software Foundation, Inc.
Copyright (C) 2001-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* 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.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by
@ -31,6 +31,11 @@
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
/* MirBSD defines mbslen as a macro. */
#if @GNULIB_MBSLEN@ && defined __MirBSD__
# include <wchar.h>
#endif
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
@ -43,10 +48,10 @@
#endif
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifdef __cplusplus
extern "C" {
@ -62,10 +67,9 @@ extern void *memchr (void const *__s, int __c, size_t __n)
# endif
#elif defined GNULIB_POSIXCHECK
# undef memchr
# define memchr(s,c,n) \
(GL_LINK_WARNING ("memchr has platform-specific bugs - " \
"use gnulib module memchr for portability" ), \
memchr (s, c, n))
/* Assume memchr is always declared. */
_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
"use gnulib module memchr for portability" );
#endif
/* Return the first occurrence of NEEDLE in HAYSTACK. */
@ -80,11 +84,11 @@ extern void *memmem (void const *__haystack, size_t __haystack_len,
# endif
#elif defined GNULIB_POSIXCHECK
# undef memmem
# define memmem(a,al,b,bl) \
(GL_LINK_WARNING ("memmem is unportable and often quadratic - " \
"use gnulib module memmem-simple for portability, " \
"and module memmem for speed" ), \
memmem (a, al, b, bl))
# if HAVE_RAW_DECL_MEMMEM
_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
"use gnulib module memmem-simple for portability, "
"and module memmem for speed" );
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef mempcpy
# define mempcpy(a,b,n) \
(GL_LINK_WARNING ("mempcpy is unportable - " \
"use gnulib module mempcpy for portability"), \
mempcpy (a, b, n))
# if HAVE_RAW_DECL_MEMPCPY
_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
"use gnulib module mempcpy for portability");
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef memrchr
# define memrchr(a,b,c) \
(GL_LINK_WARNING ("memrchr is unportable - " \
"use gnulib module memrchr for portability"), \
memrchr (a, b, c))
# if HAVE_RAW_DECL_MEMRCHR
_GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
"use gnulib module memrchr for portability");
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef rawmemchr
# define rawmemchr(a,b) \
(GL_LINK_WARNING ("rawmemchr is unportable - " \
"use gnulib module rawmemchr for portability"), \
rawmemchr (a, b))
# if HAVE_RAW_DECL_RAWMEMCHR
_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
"use gnulib module rawmemchr for portability");
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef stpcpy
# define stpcpy(a,b) \
(GL_LINK_WARNING ("stpcpy is unportable - " \
"use gnulib module stpcpy for portability"), \
stpcpy (a, b))
# if HAVE_RAW_DECL_STPCPY
_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
"use gnulib module stpcpy for portability");
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef stpncpy
# define stpncpy(a,b,n) \
(GL_LINK_WARNING ("stpncpy is unportable - " \
"use gnulib module stpncpy for portability"), \
stpncpy (a, b, n))
# if HAVE_RAW_DECL_STPNCPY
_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
"use gnulib module stpncpy for portability");
# endif
#endif
#if defined GNULIB_POSIXCHECK
/* strchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
# undef strchr
# define strchr(s,c) \
(GL_LINK_WARNING ("strchr cannot work correctly on character strings " \
"in some multibyte locales - " \
"use mbschr if you care about internationalization"), \
strchr (s, c))
/* Assume strchr is always declared. */
_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
"in some multibyte locales - "
"use mbschr if you care about internationalization");
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef strchrnul
# define strchrnul(a,b) \
(GL_LINK_WARNING ("strchrnul is unportable - " \
"use gnulib module strchrnul for portability"), \
strchrnul (a, b))
# if HAVE_RAW_DECL_STRCHRNUL
_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
"use gnulib module strchrnul for portability");
# endif
#endif
/* Duplicate S, returning an identical malloc'd string. */
@ -200,10 +203,10 @@ extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strdup
# define strdup(a) \
(GL_LINK_WARNING ("strdup is unportable - " \
"use gnulib module strdup for portability"), \
strdup (a))
# if HAVE_RAW_DECL_STRDUP
_GL_WARN_ON_USE (strdup, "strdup is unportable - "
"use gnulib module strdup for portability");
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef strndup
# define strndup(a,n) \
(GL_LINK_WARNING ("strndup is unportable - " \
"use gnulib module strndup for portability"), \
strndup (a, n))
# if HAVE_RAW_DECL_STRNDUP
_GL_WARN_ON_USE (strndup, "strndup is unportable - "
"use gnulib module strndup for portability");
# endif
#endif
/* 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
#elif defined GNULIB_POSIXCHECK
# undef strnlen
# define strnlen(a,n) \
(GL_LINK_WARNING ("strnlen is unportable - " \
"use gnulib module strnlen for portability"), \
strnlen (a, n))
# if HAVE_RAW_DECL_STRNLEN
_GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
"use gnulib module strnlen for portability");
# endif
#endif
#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
digit. */
# undef strcspn
# define strcspn(s,a) \
(GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbscspn if you care about internationalization"), \
strcspn (s, a))
/* Assume strcspn is always declared. */
_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
"in multibyte locales - "
"use mbscspn if you care about internationalization");
#endif
/* 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
digit. */
# undef strpbrk
# define strpbrk(s,a) \
(GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbspbrk if you care about internationalization"), \
strpbrk (s, a))
_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
"in multibyte locales - "
"use mbspbrk if you care about internationalization");
# endif
#elif defined GNULIB_POSIXCHECK
# undef strpbrk
# define strpbrk(s,a) \
(GL_LINK_WARNING ("strpbrk is unportable - " \
"use gnulib module strpbrk for portability"), \
strpbrk (s, a))
# if HAVE_RAW_DECL_STRPBRK
_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
"use gnulib module strpbrk for portability");
# endif
#endif
#if defined GNULIB_POSIXCHECK
/* strspn() assumes the second argument is a list of single-byte characters.
Even in this simple case, it cannot work with multibyte strings. */
# undef strspn
# define strspn(s,a) \
(GL_LINK_WARNING ("strspn cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbsspn if you care about internationalization"), \
strspn (s, a))
/* Assume strspn is always declared. */
_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
"in multibyte locales - "
"use mbsspn if you care about internationalization");
#endif
#if defined GNULIB_POSIXCHECK
/* strrchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
# undef strrchr
# define strrchr(s,c) \
(GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \
"in some multibyte locales - " \
"use mbsrchr if you care about internationalization"), \
strrchr (s, c))
/* Assume strrchr is always declared. */
_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
"in some multibyte locales - "
"use mbsrchr if you care about internationalization");
#endif
/* 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
# if defined GNULIB_POSIXCHECK
# undef strsep
# define strsep(s,d) \
(GL_LINK_WARNING ("strsep cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbssep if you care about internationalization"), \
strsep (s, d))
_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
"in multibyte locales - "
"use mbssep if you care about internationalization");
# endif
#elif defined GNULIB_POSIXCHECK
# undef strsep
# define strsep(s,d) \
(GL_LINK_WARNING ("strsep is unportable - " \
"use gnulib module strsep for portability"), \
strsep (s, d))
# if HAVE_RAW_DECL_STRSEP
_GL_WARN_ON_USE (strsep, "strsep is unportable - "
"use gnulib module strsep for portability");
# endif
#endif
#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
as a sequence of bytes, not of characters. */
# undef strstr
# define strstr(a,b) \
(GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \
"work correctly on character strings in most " \
"multibyte locales - " \
"use mbsstr if you care about internationalization, " \
"or use strstr if you care about speed"), \
strstr (a, b))
/* Assume strstr is always declared. */
_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
"work correctly on character strings in most "
"multibyte locales - "
"use mbsstr if you care about internationalization, "
"or use strstr if you care about speed");
#endif
/* 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
locales. */
# undef strcasestr
# define strcasestr(a,b) \
(GL_LINK_WARNING ("strcasestr does work correctly on character strings " \
"in multibyte locales - " \
"use mbscasestr if you care about " \
"internationalization, or use c-strcasestr if you want " \
"a locale independent function"), \
strcasestr (a, b))
# if HAVE_RAW_DECL_STRCASESTR
_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
"strings in multibyte locales - "
"use mbscasestr if you care about "
"internationalization, or use c-strcasestr if you want "
"a locale independent function");
# endif
#endif
/* 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@
# undef strtok_r
# define strtok_r rpl_strtok_r
# elif @UNDEFINE_STRTOK_R@
# elif @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
# undef strtok_r
# endif
# 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));
# endif
# if defined GNULIB_POSIXCHECK
# undef strtok_r
# define strtok_r(s,d,p) \
(GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbstok_r if you care about internationalization"), \
strtok_r (s, d, p))
_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
"strings in multibyte locales - "
"use mbstok_r if you care about internationalization");
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtok_r
# define strtok_r(s,d,p) \
(GL_LINK_WARNING ("strtok_r is unportable - " \
"use gnulib module strtok_r for portability"), \
strtok_r (s, d, p))
# if HAVE_RAW_DECL_STRTOK_R
_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
"use gnulib module strtok_r for portability");
# endif
#endif
@ -439,6 +431,12 @@ extern char *strtok_r (char *restrict s, char const *restrict delim,
#if @GNULIB_MBSLEN@
/* Return the number of multibyte characters in the character string STRING.
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));
#endif
@ -603,10 +601,9 @@ extern char *strerror (int);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strerror
# define strerror(e) \
(GL_LINK_WARNING ("strerror is unportable - " \
"use gnulib module strerror to guarantee non-NULL result"), \
strerror (e))
/* Assume strerror is always declared. */
_GL_WARN_ON_USE (strerror, "strerror is unportable - "
"use gnulib module strerror to guarantee non-NULL result");
#endif
#if @GNULIB_STRSIGNAL@
@ -618,10 +615,10 @@ extern char *strsignal (int __sig);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strsignal
# define strsignal(a) \
(GL_LINK_WARNING ("strsignal is unportable - " \
"use gnulib module strsignal for portability"), \
strsignal (a))
# if HAVE_RAW_DECL_STRSIGNAL
_GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
"use gnulib module strsignal for portability");
# endif
#endif
#if @GNULIB_STRVERSCMP@
@ -630,10 +627,10 @@ extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strverscmp
# define strverscmp(a, b) \
(GL_LINK_WARNING ("strverscmp is unportable - " \
"use gnulib module strverscmp for portability"), \
strverscmp (a, b))
# if HAVE_RAW_DECL_STRVERSCMP
_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
"use gnulib module strverscmp for portability");
# endif
#endif

View file

@ -1,6 +1,6 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by
@ -29,10 +29,9 @@
#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_WARN_ON_USE is copied here. */
#ifdef __cplusplus
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
as a sequence of bytes, not of characters. */
# undef strcasecmp
# define strcasecmp(a,b) \
(GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbscasecmp if you care about " \
"internationalization, or use c_strcasecmp (from " \
"gnulib module c-strcase) if you want a locale " \
"independent function"), \
strcasecmp (a, b))
# if HAVE_RAW_DECL_STRCASECMP
_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
"strings in multibyte locales - "
"use mbscasecmp if you care about "
"internationalization, or use c_strcasecmp , "
"gnulib module c-strcase) if you want a locale "
"independent function");
# endif
#endif
/* 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
as a sequence of bytes, not of characters. */
# undef strncasecmp
# define strncasecmp(a,b,n) \
(GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \
"strings in multibyte locales - " \
"use mbsncasecmp or mbspcasecmp if you care about " \
"internationalization, or use c_strncasecmp (from " \
"gnulib module c-strcase) if you want a locale " \
"independent function"), \
strncasecmp (a, b, n))
# if HAVE_RAW_DECL_STRNCASECMP
_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
"strings in multibyte locales - "
"use mbsncasecmp or mbspcasecmp if you care about "
"internationalization, or use c_strncasecmp , "
"gnulib module c-strcase) if you want a locale "
"independent function");
# endif
#endif

View file

@ -1,5 +1,5 @@
/* 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
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.
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
it under the terms of the GNU Lesser General Public License as published by
@ -31,13 +31,7 @@
#ifndef _GL_SYS_FILE_H
#define _GL_SYS_FILE_H
#if @GNULIB_FLOCK@
/* Apply or remove advisory locks on an open file.
Return 0 if successful, otherwise -1 and errno set. */
# if !@HAVE_FLOCK@
extern int flock (int fd, int operation);
#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. */
@ -45,14 +39,22 @@ extern int flock (int fd, int operation);
/* 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@
/* Apply or remove advisory locks on an open file.
Return 0 if successful, otherwise -1 and errno set. */
# if !@HAVE_FLOCK@
extern int flock (int fd, int operation);
# endif
#elif defined GNULIB_POSIXCHECK
# undef flock
# define flock(fd,op) \
(GL_LINK_WARNING ("flock is unportable - " \
"use gnulib module flock for portability"), \
flock ((fd), (op)))
# if HAVE_RAW_DECL_FLOCK
_GL_WARN_ON_USE (flock, "flock is unportable - "
"use gnulib module flock for portability");
# endif
#endif

View file

@ -1,6 +1,6 @@
/* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete.
Copyright (C) 2005-2009 Free Software Foundation, Inc.
Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@ -126,7 +126,7 @@ struct sockaddr_storage
# define SHUT_RDWR SD_BOTH
# endif
/* The definition of GL_LINK_WARNING is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
# if @HAVE_WINSOCK2_H@
/* 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
# elif defined GNULIB_POSIXCHECK
# undef socket
# define socket(d,t,p) \
(GL_LINK_WARNING ("socket is not always POSIX compliant - " \
"use gnulib module socket for portability"), \
socket (d, t, p))
# if HAVE_RAW_DECL_SOCKET
_GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - "
"use gnulib module socket for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef connect
# define connect(s,a,l) \
(GL_LINK_WARNING ("connect is not always POSIX compliant - " \
"use gnulib module connect for portability"), \
connect (s, a, l))
# if HAVE_RAW_DECL_CONNECT
_GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
"use gnulib module connect for portability");
# endif
# endif
# if @GNULIB_ACCEPT@
@ -221,10 +221,10 @@ extern int rpl_accept (int, struct sockaddr *, int *);
# define accept accept_used_without_requesting_gnulib_module_accept
# elif defined GNULIB_POSIXCHECK
# undef accept
# define accept(s,a,l) \
(GL_LINK_WARNING ("accept is not always POSIX compliant - " \
"use gnulib module accept for portability"), \
accept (s, a, l))
# if HAVE_RAW_DECL_ACCEPT
_GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - "
"use gnulib module accept for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef bind
# define bind(s,a,l) \
(GL_LINK_WARNING ("bind is not always POSIX compliant - " \
"use gnulib module bind for portability"), \
bind (s, a, l))
# if HAVE_RAW_DECL_BIND
_GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
"use gnulib module bind for portability");
# endif
# endif
# if @GNULIB_GETPEERNAME@
@ -256,10 +256,10 @@ extern int rpl_getpeername (int, struct sockaddr *, int *)
# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
# elif defined GNULIB_POSIXCHECK
# undef getpeername
# define getpeername(s,a,l) \
(GL_LINK_WARNING ("getpeername is not always POSIX compliant - " \
"use gnulib module getpeername for portability"), \
getpeername (s, a, l))
# if HAVE_RAW_DECL_GETPEERNAME
_GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
"use gnulib module getpeername for portability");
# endif
# endif
# if @GNULIB_GETSOCKNAME@
@ -274,10 +274,10 @@ extern int rpl_getsockname (int, struct sockaddr *, int *)
# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
# elif defined GNULIB_POSIXCHECK
# undef getsockname
# define getsockname(s,a,l) \
(GL_LINK_WARNING ("getsockname is not always POSIX compliant - " \
"use gnulib module getsockname for portability"), \
getsockname (s, a, l))
# if HAVE_RAW_DECL_GETSOCKNAME
_GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
"use gnulib module getsockname for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef getsockopt
# define getsockopt(s,lvl,o,v,l) \
(GL_LINK_WARNING ("getsockopt is not always POSIX compliant - " \
"use gnulib module getsockopt for portability"), \
getsockopt (s, lvl, o, v, l))
# if HAVE_RAW_DECL_GETSOCKOPT
_GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - "
"use gnulib module getsockopt for portability");
# endif
# endif
# if @GNULIB_LISTEN@
@ -309,10 +309,10 @@ extern int rpl_listen (int, int);
# define listen listen_used_without_requesting_gnulib_module_listen
# elif defined GNULIB_POSIXCHECK
# undef listen
# define listen(s,b) \
(GL_LINK_WARNING ("listen is not always POSIX compliant - " \
"use gnulib module listen for portability"), \
listen (s, b))
# if HAVE_RAW_DECL_LISTEN
_GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - "
"use gnulib module listen for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef recv
# define recv(s,b,n,f) \
(GL_LINK_WARNING ("recv is not always POSIX compliant - " \
"use gnulib module recv for portability"), \
recv (s, b, n, f))
# if HAVE_RAW_DECL_RECV
_GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - "
"use gnulib module recv for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef send
# define send(s,b,n,f) \
(GL_LINK_WARNING ("send is not always POSIX compliant - " \
"use gnulib module send for portability"), \
send (s, b, n, f))
# if HAVE_RAW_DECL_SEND
_GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
"use gnulib module send for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef recvfrom
# define recvfrom(s,b,n,f,a,l) \
(GL_LINK_WARNING ("recvfrom is not always POSIX compliant - " \
"use gnulib module recvfrom for portability"), \
recvfrom (s, b, n, f, a, l))
# if HAVE_RAW_DECL_RECVFROM
_GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - "
"use gnulib module recvfrom for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef sendto
# define sendto(s,b,n,f,a,l) \
(GL_LINK_WARNING ("sendto is not always POSIX compliant - " \
"use gnulib module sendto for portability"), \
sendto (s, b, n, f, a, l))
# if HAVE_RAW_DECL_SENDTO
_GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - "
"use gnulib module sendto for portability");
# endif
# endif
# 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
# elif defined GNULIB_POSIXCHECK
# undef setsockopt
# define setsockopt(s,lvl,o,v,l) \
(GL_LINK_WARNING ("setsockopt is not always POSIX compliant - " \
"use gnulib module setsockopt for portability"), \
setsockopt (s, lvl, o, v, l))
# if HAVE_RAW_DECL_SETSOCKOPT
_GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - "
"use gnulib module setsockopt for portability");
# endif
# endif
# if @GNULIB_SHUTDOWN@
@ -414,10 +414,10 @@ extern int rpl_shutdown (int, int);
# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
# elif defined GNULIB_POSIXCHECK
# undef shutdown
# define shutdown(s,h) \
(GL_LINK_WARNING ("shutdown is not always POSIX compliant - " \
"use gnulib module shutdown for portability"), \
shutdown (s, h))
# if HAVE_RAW_DECL_SHUTDOWN
_GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
"use gnulib module shutdown for portability");
# endif
# endif
# if @HAVE_WINSOCK2_H@
@ -448,10 +448,10 @@ extern int accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
int flags);
#elif defined GNULIB_POSIXCHECK
# undef accept4
# define accept4(s,a,l,f) \
(GL_LINK_WARNING ("accept4 is unportable - " \
"use gnulib module accept4 for portability"), \
accept4 (s, a, l, f))
# if HAVE_RAW_DECL_ACCEPT4
_GL_WARN_ON_USE (accept4, "accept4 is unportable - "
"use gnulib module accept4 for portability");
# endif
#endif
#ifdef __cplusplus

View file

@ -1,5 +1,5 @@
/* 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
it under the terms of the GNU Lesser General Public License as published by
@ -47,10 +47,10 @@
#ifndef _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_WARN_ON_USE is copied here. */
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
headers that may declare mkdir(). */
#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
#elif defined GNULIB_POSIXCHECK
# undef fchmodat
# define fchmodat(d,n,m,f) \
(GL_LINK_WARNING ("fchmodat is not portable - " \
"use gnulib module openat for portability"), \
fchmodat (d, n, m, f))
# if HAVE_RAW_DECL_FCHMODAT
_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
@ -326,10 +326,10 @@ extern int fstatat (int fd, char const *name, struct stat *st, int flags)
# endif
#elif defined GNULIB_POSIXCHECK
# undef fstatat
# define fstatat(d,n,s,f) \
(GL_LINK_WARNING ("fstatat is not portable - " \
"use gnulib module openat for portability"), \
fstatat (d, n, s, f))
# if HAVE_RAW_DECL_FSTATAT
_GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
@ -343,10 +343,10 @@ extern int futimens (int fd, struct timespec const times[2]);
# endif
#elif defined GNULIB_POSIXCHECK
# undef futimens
# define futimens(f,t) \
(GL_LINK_WARNING ("futimens is not portable - " \
"use gnulib module futimens for portability"), \
futimens (f, t))
# if HAVE_RAW_DECL_FUTIMENS
_GL_WARN_ON_USE (futimens, "futimens is not portable - "
"use gnulib module futimens for portability");
# endif
#endif
@ -368,10 +368,10 @@ extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef lchmod
# define lchmod(f,m) \
(GL_LINK_WARNING ("lchmod is unportable - " \
"use gnulib module lchmod for portability"), \
lchmod (f, m))
# if HAVE_RAW_DECL_LCHMOD
_GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
"use gnulib module lchmod for portability");
# endif
#endif
@ -388,10 +388,10 @@ extern int rpl_lstat (const char *name, struct stat *buf)
# endif
#elif defined GNULIB_POSIXCHECK
# undef lstat
# define lstat(p,b) \
(GL_LINK_WARNING ("lstat is unportable - " \
"use gnulib module lstat for portability"), \
lstat (p, b))
# if HAVE_RAW_DECL_LSTAT
_GL_WARN_ON_USE (lstat, "lstat is unportable - "
"use gnulib module lstat for portability");
# endif
#endif
@ -423,10 +423,10 @@ extern int mkdirat (int fd, char const *file, mode_t mode)
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkdirat
# define mkdirat(d,n,m) \
(GL_LINK_WARNING ("mkdirat is not portable - " \
"use gnulib module openat for portability"), \
mkdirat (d, n, m))
# if HAVE_RAW_DECL_MKDIRAT
_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
@ -440,10 +440,10 @@ extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkfifo
# define mkfifo(n,m) \
(GL_LINK_WARNING ("mkfifo is not portable - " \
"use gnulib module mkfifo for portability"), \
mkfifo (n, m))
# if HAVE_RAW_DECL_MKFIFO
_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
"use gnulib module mkfifo for portability");
# endif
#endif
@ -454,10 +454,10 @@ extern int mkfifoat (int fd, char const *file, mode_t mode)
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkfifoat
# define mkfifoat(d,n,m) \
(GL_LINK_WARNING ("mkfifoat is not portable - " \
"use gnulib module mkfifoat for portability"), \
mkfifoat (d, n, m))
# if HAVE_RAW_DECL_MKFIFOAT
_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
"use gnulib module mkfifoat for portability");
# endif
#endif
@ -472,10 +472,10 @@ extern int mknod (char const *file, mode_t mode, dev_t dev)
# endif
#elif defined GNULIB_POSIXCHECK
# undef mknod
# define mknod(n,m,d) \
(GL_LINK_WARNING ("mknod is not portable - " \
"use gnulib module mknod for portability"), \
mknod (n, m, d))
# if HAVE_RAW_DECL_MKNOD
_GL_WARN_ON_USE (mknod, "mknod is not portable - "
"use gnulib module mknod for portability");
# endif
#endif
@ -486,10 +486,10 @@ extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
# endif
#elif defined GNULIB_POSIXCHECK
# undef mknodat
# define mknodat(f,n,m,d) \
(GL_LINK_WARNING ("mknodat is not portable - " \
"use gnulib module mkfifoat for portability"), \
mknodat (f, n, m, d))
# if HAVE_RAW_DECL_MKNODAT
_GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
"use gnulib module mkfifoat for portability");
# endif
#endif
@ -512,10 +512,10 @@ extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef stat
# define stat(p,b) \
(GL_LINK_WARNING ("stat is unportable - " \
"use gnulib module stat for portability"), \
stat (p, b))
# if HAVE_RAW_DECL_STAT
_GL_WARN_ON_USE (stat, "stat is unportable - "
"use gnulib module stat for portability");
# endif
#endif
@ -531,10 +531,10 @@ extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef utimensat
# define utimensat(d,n,t,f) \
(GL_LINK_WARNING ("utimensat is not portable - " \
"use gnulib module utimensat for portability"), \
utimensat (d, n, t, f))
# if HAVE_RAW_DECL_UTIMENSAT
_GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
"use gnulib module utimensat for portability");
# endif
#endif

View file

@ -1,6 +1,6 @@
/* 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
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.
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
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>.
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
it under the terms of the GNU Lesser General Public License as published by
@ -33,23 +33,43 @@
#include <stddef.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>
#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, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.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@) \
|| (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \
|| (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@))
/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
&& ((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. */
# include <sys/types.h>
#endif
/* Get getopt(), optarg, optind, opterr, optopt. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
/* Get getopt(), optarg, optind, opterr, optopt.
But avoid namespace pollution on glibc systems. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
# include <getopt.h>
#endif
@ -94,10 +114,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_WARN_ON_USE is copied here. */
/* OS/2 EMX lacks these macros. */
#ifndef STDIN_FILENO
@ -142,11 +162,11 @@ extern int chown (const char *file, uid_t uid, gid_t gid)
# endif
#elif defined GNULIB_POSIXCHECK
# undef chown
# define chown(f,u,g) \
(GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \
"doesn't treat a uid or gid of -1 on some systems - " \
"use gnulib module chown for portability"), \
chown (f, u, g))
# if HAVE_RAW_DECL_CHOWN
_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 - "
"use gnulib module chown for portability");
# endif
#endif
@ -162,10 +182,9 @@ extern int close (int);
# define close close_used_without_requesting_gnulib_module_close
#elif defined GNULIB_POSIXCHECK
# undef close
# define close(f) \
(GL_LINK_WARNING ("close does not portably work on sockets - " \
"use gnulib module close for portability"), \
close (f))
/* Assume close is always declared. */
_GL_WARN_ON_USE (close, "close does not portably work on sockets - "
"use gnulib module close for portability");
#endif
@ -189,10 +208,10 @@ extern int dup2 (int oldfd, int newfd);
# endif
#elif defined GNULIB_POSIXCHECK
# undef dup2
# define dup2(o,n) \
(GL_LINK_WARNING ("dup2 is unportable - " \
"use gnulib module dup2 for portability"), \
dup2 (o, n))
# if HAVE_RAW_DECL_DUP2
_GL_WARN_ON_USE (dup2, "dup2 is unportable - "
"use gnulib module dup2 for portability");
# endif
#endif
@ -211,10 +230,10 @@ extern int dup2 (int oldfd, int newfd);
extern int dup3 (int oldfd, int newfd, int flags);
#elif defined GNULIB_POSIXCHECK
# undef dup3
# define dup3(o,n,f) \
(GL_LINK_WARNING ("dup3 is unportable - " \
"use gnulib module dup3 for portability"), \
dup3 (o, n, f))
# if HAVE_RAW_DECL_DUP3
_GL_WARN_ON_USE (dup3, "dup3 is unportable - "
"use gnulib module dup3 for portability");
# endif
#endif
@ -230,11 +249,17 @@ extern char **environ;
# endif
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
static inline char ***
rpl_environ (void)
{
return &environ;
}
_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
"use gnulib module environ for portability");
# undef environ
# define environ \
(GL_LINK_WARNING ("environ is unportable - " \
"use gnulib module environ for portability"), \
environ)
# define environ (*rpl_environ ())
# endif
#endif
@ -246,10 +271,10 @@ extern int euidaccess (const char *filename, int mode) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef euidaccess
# define euidaccess(f,m) \
(GL_LINK_WARNING ("euidaccess is unportable - " \
"use gnulib module euidaccess for portability"), \
euidaccess (f, m))
# if HAVE_RAW_DECL_EUIDACCESS
_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
"use gnulib module euidaccess for portability");
# endif
#endif
@ -260,10 +285,10 @@ extern int faccessat (int fd, char const *file, int mode, int flag)
# endif
#elif defined GNULIB_POSIXCHECK
# undef faccessat
# define faccessat(d,n,m,f) \
(GL_LINK_WARNING ("faccessat is not portable - " \
"use gnulib module faccessat for portability"), \
faccessat (d, n, m, f))
# if HAVE_RAW_DECL_FACCESSAT
_GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
"use gnulib module faccessat for portability");
# endif
#endif
@ -286,10 +311,10 @@ extern const char *_gl_directory_name (int fd);
# endif
#elif defined GNULIB_POSIXCHECK
# undef fchdir
# define fchdir(f) \
(GL_LINK_WARNING ("fchdir is unportable - " \
"use gnulib module fchdir for portability"), \
fchdir (f))
# if HAVE_RAW_DECL_FCHDIR
_GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
"use gnulib module fchdir for portability");
# endif
#endif
@ -304,10 +329,10 @@ extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int fla
# endif
#elif defined GNULIB_POSIXCHECK
# undef fchownat
# define fchownat(d,n,o,g,f) \
(GL_LINK_WARNING ("fchownat is not portable - " \
"use gnulib module openat for portability"), \
fchownat (d, n, o, g, f))
# if HAVE_RAW_DECL_FCHOWNAT
_GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
@ -321,10 +346,10 @@ extern int fsync (int fd);
# endif
#elif defined GNULIB_POSIXCHECK
# undef fsync
# define fsync(fd) \
(GL_LINK_WARNING ("fsync is unportable - " \
"use gnulib module fsync for portability"), \
fsync (fd))
# if HAVE_RAW_DECL_FSYNC
_GL_WARN_ON_USE (fsync, "fsync is unportable - "
"use gnulib module fsync for portability");
# endif
#endif
@ -338,17 +363,14 @@ extern int ftruncate (int fd, off_t length);
# endif
#elif defined GNULIB_POSIXCHECK
# undef ftruncate
# define ftruncate(f,l) \
(GL_LINK_WARNING ("ftruncate is unportable - " \
"use gnulib module ftruncate for portability"), \
ftruncate (f, l))
# if HAVE_RAW_DECL_FTRUNCATE
_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
"use gnulib module ftruncate for portability");
# endif
#endif
#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@
/* Get the name of the current working directory, and put it in SIZE bytes
of BUF.
@ -365,10 +387,10 @@ extern char * getcwd (char *buf, size_t size);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getcwd
# define getcwd(b,s) \
(GL_LINK_WARNING ("getcwd is unportable - " \
"use gnulib module getcwd for portability"), \
getcwd (b, s))
# if HAVE_RAW_DECL_GETCWD
_GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
"use gnulib module getcwd for portability");
# endif
#endif
@ -388,10 +410,10 @@ extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getdomainname
# define getdomainname(n,l) \
(GL_LINK_WARNING ("getdomainname is unportable - " \
"use gnulib module getdomainname for portability"), \
getdomainname (n, l))
# if HAVE_RAW_DECL_GETDOMAINNAME
_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
"use gnulib module getdomainname for portability");
# endif
#endif
@ -403,10 +425,10 @@ extern int getdtablesize (void);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getdtablesize
# define getdtablesize() \
(GL_LINK_WARNING ("getdtablesize is unportable - " \
"use gnulib module getdtablesize for portability"), \
getdtablesize ())
# if HAVE_RAW_DECL_GETDTABLESIZE
_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
"use gnulib module getdtablesize for portability");
# endif
#endif
@ -425,10 +447,10 @@ int getgroups (int n, gid_t *groups);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getgroups
# define getgroups(n,g) \
(GL_LINK_WARNING ("getgroups is unportable - " \
"use gnulib module getgroups for portability"), \
getgroups (n, g))
# if HAVE_RAW_DECL_GETGROUPS
_GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
"use gnulib module getgroups for portability");
# 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
#elif defined GNULIB_POSIXCHECK
# undef gethostname
# define gethostname(n,l) \
(GL_LINK_WARNING ("gethostname is unportable - " \
"use gnulib module gethostname for portability"), \
gethostname (n, l))
# if HAVE_RAW_DECL_GETHOSTNAME
_GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
"use gnulib module gethostname for portability");
# 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
@ -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).
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@
extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getlogin_r
# define getlogin_r(n,s) \
(GL_LINK_WARNING ("getlogin_r is unportable - " \
"use gnulib module getlogin_r for portability"), \
getlogin_r (n, s))
# if HAVE_RAW_DECL_GETLOGIN_R
_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
"use gnulib module getlogin_r for portability");
# endif
#endif
@ -532,10 +582,10 @@ extern int getpagesize (void);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getpagesize
# define getpagesize() \
(GL_LINK_WARNING ("getpagesize is unportable - " \
"use gnulib module getpagesize for portability"), \
getpagesize ())
# if HAVE_RAW_DECL_GETPAGESIZE
_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
"use gnulib module getpagesize for portability");
# endif
#endif
@ -552,20 +602,20 @@ extern void endusershell (void);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getusershell
# define getusershell() \
(GL_LINK_WARNING ("getusershell is unportable - " \
"use gnulib module getusershell for portability"), \
getusershell ())
# if HAVE_RAW_DECL_GETUSERSHELL
_GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
"use gnulib module getusershell for portability");
# endif
# undef setusershell
# define setusershell() \
(GL_LINK_WARNING ("setusershell is unportable - " \
"use gnulib module getusershell for portability"), \
setusershell ())
# if HAVE_RAW_DECL_SETUSERSHELL
_GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
"use gnulib module getusershell for portability");
# endif
# undef endusershell
# define endusershell() \
(GL_LINK_WARNING ("endusershell is unportable - " \
"use gnulib module getusershell for portability"), \
endusershell ())
# if HAVE_RAW_DECL_ENDUSERSHELL
_GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
"use gnulib module getusershell for portability");
# endif
#endif
@ -585,10 +635,10 @@ extern int lchown (char const *file, uid_t owner, gid_t group)
# endif
#elif defined GNULIB_POSIXCHECK
# undef lchown
# define lchown(f,u,g) \
(GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \
"systems - use gnulib module lchown for portability"), \
lchown (f, u, g))
# if HAVE_RAW_DECL_LCHOWN
_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
"use gnulib module lchown for portability");
# endif
#endif
@ -606,10 +656,10 @@ extern int link (const char *path1, const char *path2)
# endif
#elif defined GNULIB_POSIXCHECK
# undef link
# define link(path1,path2) \
(GL_LINK_WARNING ("link is unportable - " \
"use gnulib module link for portability"), \
link (path1, path2))
# if HAVE_RAW_DECL_LINK
_GL_WARN_ON_USE (link, "link is unportable - "
"use gnulib module link for portability");
# endif
#endif
#if @GNULIB_LINKAT@
@ -627,10 +677,10 @@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
# endif
#elif defined GNULIB_POSIXCHECK
# undef linkat
# define link(f1,path1,f2,path2,f) \
(GL_LINK_WARNING ("linkat is unportable - " \
"use gnulib module linkat for portability"), \
linkat (f1, path1, f2, path2,f))
# if HAVE_RAW_DECL_LINKAT
_GL_WARN_ON_USE (linkat, "linkat is unportable - "
"use gnulib module linkat for portability");
# endif
#endif
#if @GNULIB_LSEEK@
@ -644,10 +694,10 @@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
# endif
#elif defined GNULIB_POSIXCHECK
# undef lseek
# define lseek(f,o,w) \
(GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \
"systems - use gnulib module lseek for portability"), \
lseek (f, o, w))
# if HAVE_RAW_DECL_LSEEK
_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
"systems - use gnulib module lseek for portability");
# 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));
#elif defined GNULIB_POSIXCHECK
# undef pipe2
# define pipe2(f,o) \
(GL_LINK_WARNING ("pipe2 is unportable - " \
"use gnulib module pipe2 for portability"), \
pipe2 (f, o))
# if HAVE_RAW_DECL_PIPE2
_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
"use gnulib module pipe2 for portability");
# endif
#endif
@ -687,10 +737,10 @@ extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef pread
# define pread(f,b,s,o) \
(GL_LINK_WARNING ("pread is unportable - " \
"use gnulib module pread for portability"), \
pread (f, b, s, o))
# if HAVE_RAW_DECL_PREAD
_GL_WARN_ON_USE (pread, "pread is unportable - "
"use gnulib module pread for portability");
# endif
#endif
@ -709,10 +759,10 @@ extern ssize_t readlink (const char *file, char *buf, size_t bufsize)
# endif
#elif defined GNULIB_POSIXCHECK
# undef readlink
# define readlink(f,b,s) \
(GL_LINK_WARNING ("readlink is unportable - " \
"use gnulib module readlink for portability"), \
readlink (f, b, s))
# if HAVE_RAW_DECL_READLINK
_GL_WARN_ON_USE (readlink, "readlink is unportable - "
"use gnulib module readlink for portability");
# endif
#endif
@ -723,10 +773,10 @@ extern ssize_t readlinkat (int fd, char const *file, char *buf, size_t len)
# endif
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
# define readlinkat(d,n,b,l) \
(GL_LINK_WARNING ("readlinkat is not portable - " \
"use gnulib module symlinkat for portability"), \
readlinkat (d, n, b, l))
# if HAVE_RAW_DECL_READLINKAT
_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
"use gnulib module symlinkat for portability");
# endif
#endif
@ -738,10 +788,10 @@ extern int rmdir (char const *name) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef rmdir
# define rmdir(n) \
(GL_LINK_WARNING ("rmdir is unportable - " \
"use gnulib module rmdir for portability"), \
rmdir (n))
# if HAVE_RAW_DECL_RMDIR
_GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
"use gnulib module rmdir for portability");
# endif
#endif
@ -759,10 +809,10 @@ extern unsigned int sleep (unsigned int n);
# endif
#elif defined GNULIB_POSIXCHECK
# undef sleep
# define sleep(n) \
(GL_LINK_WARNING ("sleep is unportable - " \
"use gnulib module sleep for portability"), \
sleep (n))
# if HAVE_RAW_DECL_SLEEP
_GL_WARN_ON_USE (sleep, "sleep is unportable - "
"use gnulib module sleep for portability");
# endif
#endif
@ -777,10 +827,10 @@ extern int symlink (char const *contents, char const *file)
# endif
#elif defined GNULIB_POSIXCHECK
# undef symlink
# define symlink(c,n) \
(GL_LINK_WARNING ("symlink is not portable - " \
"use gnulib module symlink for portability"), \
symlink (c, n))
# if HAVE_RAW_DECL_SYMLINK
_GL_WARN_ON_USE (symlink, "symlink is not portable - "
"use gnulib module symlink for portability");
# endif
#endif
@ -791,10 +841,10 @@ extern int symlinkat (char const *contents, int fd, char const *file)
# endif
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
# define symlinkat(c,d,n) \
(GL_LINK_WARNING ("symlinkat is not portable - " \
"use gnulib module symlinkat for portability"), \
symlinkat (c, d, n))
# if HAVE_RAW_DECL_SYMLINKAT
_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
"use gnulib module symlinkat for portability");
# endif
#endif
@ -806,10 +856,10 @@ extern int unlink (char const *file) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef unlink
# define unlink(n) \
(GL_LINK_WARNING ("unlink is not portable - " \
"use gnulib module unlink for portability"), \
unlink (n))
# if HAVE_RAW_DECL_UNLINK
_GL_WARN_ON_USE (unlink, "unlink is not portable - "
"use gnulib module unlink for portability");
# endif
#endif
@ -823,10 +873,10 @@ extern int unlinkat (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef unlinkat
# define unlinkat(d,n,f) \
(GL_LINK_WARNING ("unlinkat is not portable - " \
"use gnulib module openat for portability"), \
unlinkat (d, n, f))
# if HAVE_RAW_DECL_UNLINKAT
_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
@ -844,10 +894,10 @@ extern int usleep (useconds_t n);
# endif
#elif defined GNULIB_POSIXCHECK
# undef usleep
# define usleep(n) \
(GL_LINK_WARNING ("usleep is unportable - " \
"use gnulib module usleep for portability"), \
usleep (n))
# if HAVE_RAW_DECL_USLEEP
_GL_WARN_ON_USE (usleep, "usleep is unportable - "
"use gnulib module usleep for portability");
# endif
#endif

View file

@ -1,5 +1,5 @@
/* 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
under the terms of the GNU Lesser General Public License as published
@ -19,6 +19,9 @@
#include "unitypes.h"
/* Get common macros for C. */
#include "unused-parameter.h"
/* Get bool. */
#include <stdbool.h>
@ -183,7 +186,8 @@ extern int
u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
# else
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;
@ -253,7 +257,7 @@ extern int
u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
# else
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;
@ -525,8 +529,8 @@ extern uint16_t *
extern uint32_t *
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
the last unit written into DEST. */
/* Copy no more than N units of SRC to DEST. Return a pointer past the last
non-NUL unit written into DEST. */
/* Similar to stpncpy(). */
extern uint8_t *
u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n);

View file

@ -1,5 +1,5 @@
/* 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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