mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Use Gnulib's `sys_stat' module; update Gnulib.
* .x-sc_prohibit_S_IS_definition: New file. * m4/gnulib-cache.m4: Add `sys_stat'. * libguile/filesys.c: Remove `S_IS*' macro definitions for Ultrix and MinGW.
This commit is contained in:
parent
20ccae8dbb
commit
1cd4fffcde
95 changed files with 9327 additions and 9148 deletions
1
.x-sc_prohibit_S_IS_definition
Normal file
1
.x-sc_prohibit_S_IS_definition
Normal file
|
@ -0,0 +1 @@
|
|||
lib/*
|
26
build-aux/arg-nonnull.h
Normal file
26
build-aux/arg-nonnull.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* A C macro for declaring that specific arguments must not be NULL.
|
||||
Copyright (C) 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_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
|
||||
that the values passed as arguments n, ..., m must be non-NULL pointers.
|
||||
n = 1 stands for the first argument, n = 2 for the second argument etc. */
|
||||
#ifndef _GL_ARG_NONNULL
|
||||
# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
|
||||
# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
|
||||
# else
|
||||
# define _GL_ARG_NONNULL(params)
|
||||
# endif
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Sign files and upload them.
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2009-11-29.20; # UTC
|
||||
|
||||
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
|
||||
#
|
||||
|
@ -73,34 +73,28 @@ actual command line options. Use this to keep your defaults. Comments
|
|||
(#) and empty lines in $conffile are allowed.
|
||||
|
||||
Examples:
|
||||
1. Upload automake-1.8.2b.tar.gz and automake-1.8.2b.tar.bz2 to two sites:
|
||||
gnupload --to sources.redhat.com:~ftp/pub/automake \\
|
||||
--to alpha.gnu.org:automake \\
|
||||
automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
|
||||
1. Upload foobar-1.0.tar.gz to ftp.gnu.org:
|
||||
gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz
|
||||
|
||||
2. Same as above, but also create symbolic links to automake-latest.tar.*:
|
||||
gnupload --to sources.redhat.com:~ftp/pub/automake \\
|
||||
--to alpha.gnu.org:automake \\
|
||||
2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org:
|
||||
gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz
|
||||
|
||||
3. Same as above, and also create symbolic links to foobar-latest.tar.*:
|
||||
gnupload --to ftp.gnu.org:foobar \\
|
||||
--symlink-regex \\
|
||||
automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
|
||||
foobar-1.0.tar.gz foobar-1.0.tar.xz
|
||||
|
||||
3. Symlink automake-1.8.2b.tar.gz to automake-latest.tar.gz and
|
||||
automake-1.8.2b.tar.bz2 to automake-latest.tar.bz2 on both sites:
|
||||
4. Upload foobar-0.9.90.tar.gz to two sites:
|
||||
gnupload --to alpha.gnu.org:foobar \\
|
||||
--to sources.redhat.com:~ftp/pub/foobar \\
|
||||
foobar-0.9.90.tar.gz
|
||||
|
||||
gnupload --to sources.redhat.com:~ftp/pub/automake \\
|
||||
--to alpha.gnu.org:automake \\
|
||||
--symlink automake-1.8.2b.tar.gz automake-latest.tar.gz \\
|
||||
automake-1.8.2b.tar.bz2 automake-latest.tar.bz2
|
||||
|
||||
4. Delete automake-1.8.2a.tar.gz and .bz2, remove symlink
|
||||
automake-latest.tar.gz and upload automake-1.8.2b.tar.gz:
|
||||
|
||||
gnupload --to sources.redhat.com:~ftp/pub/automake \\
|
||||
--to alpha.gnu.org:automake \\
|
||||
--delete automake-1.8.2a.tar.gz automake-1.8.2a.tar.bz2 \\
|
||||
--rmsymlink automake-latest.tar.gz \\
|
||||
-- \\
|
||||
automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
|
||||
5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz
|
||||
(the -- terminates the list of files to delete):
|
||||
gnupload --to alpha.gnu.org:foobar \\
|
||||
--to sources.redhat.com:~ftp/pub/foobar \\
|
||||
--delete oopsbar-0.9.91.tar.gz \\
|
||||
-- foobar-0.9.91.tar.gz
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
Send patches to <automake-patches@gnu.org>."
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/* 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
|
||||
|
|
|
@ -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 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 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
|
||||
|
||||
|
@ -69,13 +69,32 @@ EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
|
|||
|
||||
## end gnulib module announce-gen
|
||||
|
||||
## begin gnulib module arg-nonnull
|
||||
|
||||
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.
|
||||
arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
sed -n -e '/GL_ARG_NONNULL/,$$p' \
|
||||
< $(top_srcdir)/build-aux/arg-nonnull.h \
|
||||
> $@-t && \
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
|
||||
|
||||
ARG_NONNULL_H=arg-nonnull.h
|
||||
|
||||
EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
|
||||
|
||||
## end gnulib module arg-nonnull
|
||||
|
||||
## begin gnulib module arpa_inet
|
||||
|
||||
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
|
||||
arpa/inet.h: arpa_inet.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_at)$(MKDIR_P) arpa
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
|
@ -88,6 +107,7 @@ arpa/inet.h: arpa_inet.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/arpa_inet.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -346,7 +366,7 @@ BUILT_SOURCES += $(ICONV_H)
|
|||
|
||||
# We need the following in order to create <iconv.h> when the system
|
||||
# doesn't have one that works with the given compiler.
|
||||
iconv.h: iconv.in.h
|
||||
iconv.h: iconv.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' \
|
||||
|
@ -356,6 +376,7 @@ iconv.h: iconv.in.h
|
|||
-e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
|
||||
-e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
|
||||
-e 's|@''REPLACE_ICONV_UTF''@|$(REPLACE_ICONV_UTF)|g' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
< $(srcdir)/iconv.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -426,7 +447,18 @@ AM_CFLAGS += $(CFLAG_VISIBILITY)
|
|||
|
||||
## begin gnulib module link-warning
|
||||
|
||||
LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
|
||||
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
|
||||
|
||||
|
@ -512,7 +544,7 @@ 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
|
||||
locale.h: locale.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' \
|
||||
|
@ -521,6 +553,7 @@ locale.h: locale.in.h
|
|||
-e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
|
||||
-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)' \
|
||||
< $(srcdir)/locale.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -790,7 +823,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
|
||||
stdio.h: stdio.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -875,6 +908,7 @@ stdio.h: stdio.in.h
|
|||
-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; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -892,7 +926,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
|
||||
stdlib.h: stdlib.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -949,6 +983,7 @@ stdlib.h: stdlib.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/stdlib.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1000,7 +1035,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
|
||||
string.h: string.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -1067,6 +1102,7 @@ string.h: string.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/string.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1082,7 +1118,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
|
||||
strings.h: strings.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -1091,6 +1127,7 @@ strings.h: strings.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/strings.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1132,7 +1169,7 @@ 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
|
||||
sys/socket.h: sys_socket.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_at)$(MKDIR_P) sys
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
|
@ -1162,6 +1199,7 @@ sys/socket.h: sys_socket.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/sys_socket.in.h; \
|
||||
} > $@-t && \
|
||||
mv -f $@-t $@
|
||||
|
@ -1178,7 +1216,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
|
||||
sys/stat.h: sys_stat.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_at)$(MKDIR_P) sys
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
|
@ -1218,6 +1256,7 @@ sys/stat.h: sys_stat.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/sys_stat.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1234,7 +1273,7 @@ BUILT_SOURCES += time.h
|
|||
|
||||
# We need the following in order to create <time.h> when the system
|
||||
# doesn't have one that works with the given compiler.
|
||||
time.h: time.in.h
|
||||
time.h: time.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' \
|
||||
|
@ -1247,6 +1286,7 @@ time.h: time.in.h
|
|||
-e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
|
||||
-e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
|
||||
-e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
< $(srcdir)/time.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1271,7 +1311,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
|
||||
unistd.h: unistd.in.h $(LINK_WARNING_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' \
|
||||
|
@ -1302,6 +1342,7 @@ unistd.h: unistd.in.h
|
|||
-e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
|
||||
-e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
|
||||
-e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
|
||||
-e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
|
||||
-e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
|
||||
-e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
|
||||
-e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
|
||||
|
@ -1332,6 +1373,7 @@ unistd.h: unistd.in.h
|
|||
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
|
||||
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
|
||||
-e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
|
||||
-e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
|
||||
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
|
||||
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
|
||||
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
|
||||
|
@ -1356,6 +1398,7 @@ unistd.h: unistd.in.h
|
|||
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
|
||||
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
|
||||
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
|
||||
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
|
||||
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
|
||||
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
|
||||
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
|
||||
|
@ -1367,6 +1410,7 @@ unistd.h: unistd.in.h
|
|||
-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; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1476,7 +1520,7 @@ 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
|
||||
wchar.h: wchar.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -1519,6 +1563,7 @@ wchar.h: wchar.in.h
|
|||
-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)' \
|
||||
< $(srcdir)/wchar.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* A GNU-like <arpa/inet.h>.
|
||||
|
||||
Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2008-2009 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
|
||||
|
@ -38,6 +38,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -60,7 +62,8 @@ extern "C" {
|
|||
For more details, see the POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
|
||||
extern const char *inet_ntop (int af, const void *restrict src,
|
||||
char *restrict dst, socklen_t cnt);
|
||||
char *restrict dst, socklen_t cnt)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef inet_ntop
|
||||
|
@ -72,7 +75,8 @@ extern const char *inet_ntop (int af, const void *restrict src,
|
|||
|
||||
#if @GNULIB_INET_PTON@
|
||||
# if !@HAVE_DECL_INET_PTON@
|
||||
extern int inet_pton (int af, const char *restrict src, void *restrict dst);
|
||||
extern int inet_pton (int af, const char *restrict src, void *restrict dst)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef inet_pton
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
|
||||
|
||||
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
|
||||
optimizes away the name == NULL test below. */
|
||||
#define _GL_ARG_NONNULL(params)
|
||||
|
||||
/* Specification. */
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
0
lib/config.charset
Executable file → Normal file
0
lib/config.charset
Executable file → Normal file
|
@ -37,7 +37,7 @@ rpl_duplocale (locale_t locale)
|
|||
{
|
||||
/* Create a copy of the locale by fetching the name of each locale
|
||||
category, starting with LC_CTYPE. */
|
||||
static struct { int cat; int mask; } categories[] =
|
||||
static struct { int cat; int mask; } const categories[] =
|
||||
{
|
||||
{ LC_NUMERIC, LC_NUMERIC_MASK },
|
||||
{ LC_TIME, LC_TIME_MASK },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* A GNU-like <iconv.h>.
|
||||
|
||||
Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 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 Lesser General Public License as published by
|
||||
|
@ -28,6 +28,8 @@
|
|||
#ifndef _GL_ICONV_H
|
||||
#define _GL_ICONV_H
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -37,7 +39,8 @@ extern "C" {
|
|||
/* An iconv_open wrapper that supports the IANA standardized encoding names
|
||||
("ISO-8859-1" etc.) as far as possible. */
|
||||
# define iconv_open rpl_iconv_open
|
||||
extern iconv_t iconv_open (const char *tocode, const char *fromcode);
|
||||
extern iconv_t iconv_open (const char *tocode, const char *fromcode)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @REPLACE_ICONV_UTF@
|
||||
|
|
|
@ -369,7 +369,7 @@ locale_charset (void)
|
|||
codeset = nl_langinfo (CODESET);
|
||||
|
||||
# ifdef __CYGWIN__
|
||||
/* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
|
||||
/* Cygwin 1.5.x does not have locales. nl_langinfo (CODESET) always
|
||||
returns "US-ASCII". As long as this is not fixed, return the suffix
|
||||
of the locale name from the environment variables (if present) or
|
||||
the codepage as a number. */
|
||||
|
@ -409,7 +409,17 @@ locale_charset (void)
|
|||
}
|
||||
}
|
||||
|
||||
/* Woe32 has a function returning the locale's codepage as a number. */
|
||||
/* Woe32 has a function returning the locale's codepage as a number:
|
||||
GetACP(). This encoding is used by Cygwin, unless the user has set
|
||||
the environment variable CYGWIN=codepage:oem (which very few people
|
||||
do).
|
||||
Output directed to console windows needs to be converted (to
|
||||
GetOEMCP() if the console is using a raster font, or to
|
||||
GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
|
||||
this conversion transparently (see winsup/cygwin/fhandler_console.cc),
|
||||
converting to GetConsoleOutputCP(). This leads to correct results,
|
||||
except when SetConsoleOutputCP has been called and a raster font is
|
||||
in use. */
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
codeset = buf;
|
||||
}
|
||||
|
@ -449,7 +459,13 @@ locale_charset (void)
|
|||
|
||||
static char buf[2 + 10 + 1];
|
||||
|
||||
/* Woe32 has a function returning the locale's codepage as a number. */
|
||||
/* Woe32 has a function returning the locale's codepage as a number:
|
||||
GetACP().
|
||||
When the output goes to a console window, it needs to be provided in
|
||||
GetOEMCP() encoding if the console is using a raster font, or in
|
||||
GetConsoleOutputCP() encoding if it is using a TrueType font.
|
||||
But in GUI programs and for output sent to files and pipes, GetACP()
|
||||
encoding is the best bet. */
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
codeset = buf;
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
# include <xlocale.h>
|
||||
#endif
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL 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
|
||||
|
@ -44,7 +46,7 @@
|
|||
# if @REPLACE_DUPLOCALE@
|
||||
# undef duplocale
|
||||
# define duplocale rpl_duplocale
|
||||
extern locale_t duplocale (locale_t locale);
|
||||
extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef duplocale
|
||||
|
|
|
@ -63,6 +63,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -74,7 +76,7 @@ extern "C" {
|
|||
# endif
|
||||
# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
|
||||
extern int dprintf (int fd, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef dprintf
|
||||
|
@ -88,7 +90,7 @@ extern int dprintf (int fd, const char *format, ...)
|
|||
# if @REPLACE_FCLOSE@
|
||||
# define fclose rpl_fclose
|
||||
/* Close STREAM and its underlying file descriptor. */
|
||||
extern int fclose (FILE *stream);
|
||||
extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fclose
|
||||
|
@ -123,7 +125,8 @@ extern int fclose (FILE *stream);
|
|||
# if @REPLACE_FOPEN@
|
||||
# undef fopen
|
||||
# define fopen rpl_fopen
|
||||
extern FILE * fopen (const char *filename, const char *mode);
|
||||
extern FILE * fopen (const char *filename, const char *mode)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fopen
|
||||
|
@ -137,12 +140,14 @@ extern FILE * fopen (const char *filename, const char *mode);
|
|||
# if @REPLACE_FPRINTF@
|
||||
# define fprintf rpl_fprintf
|
||||
extern int fprintf (FILE *fp, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)))
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# define fprintf rpl_fprintf
|
||||
extern int fprintf (FILE *fp, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)))
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fprintf
|
||||
# define fprintf \
|
||||
|
@ -163,7 +168,7 @@ extern int fprintf (FILE *fp, const char *format, ...)
|
|||
was before the write calls. When discarding pending input, the file
|
||||
position is advanced to match the end of the previously read input.
|
||||
Return 0 if successful. Upon error, return -1 and set errno. */
|
||||
extern int fpurge (FILE *gl_stream);
|
||||
extern int fpurge (FILE *gl_stream) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fpurge
|
||||
|
@ -176,20 +181,21 @@ extern int fprintf (FILE *fp, const char *format, ...)
|
|||
#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# undef fputc
|
||||
# define fputc rpl_fputc
|
||||
extern int fputc (int c, FILE *stream);
|
||||
extern int fputc (int c, FILE *stream) _GL_ARG_NONNULL ((2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# undef fputs
|
||||
# define fputs rpl_fputs
|
||||
extern int fputs (const char *string, FILE *stream);
|
||||
extern int fputs (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FREOPEN@
|
||||
# if @REPLACE_FREOPEN@
|
||||
# undef freopen
|
||||
# define freopen rpl_freopen
|
||||
extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
|
||||
extern FILE * freopen (const char *filename, const char *mode, FILE *stream)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef freopen
|
||||
|
@ -200,7 +206,7 @@ extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
|
|||
#endif
|
||||
|
||||
#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
|
||||
extern int rpl_fseek (FILE *fp, long offset, int whence);
|
||||
extern int rpl_fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1));
|
||||
# undef fseek
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
# define fseek(f,o,w) \
|
||||
|
@ -226,7 +232,7 @@ extern int rpl_fseek (FILE *fp, long offset, int whence);
|
|||
/* Provide fseek, fseeko functions that are aware of a preceding
|
||||
fflush(), and which detect pipes. */
|
||||
# define fseeko rpl_fseeko
|
||||
extern int fseeko (FILE *fp, off_t offset, int whence);
|
||||
extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1));
|
||||
# if !@GNULIB_FSEEK@
|
||||
# undef fseek
|
||||
# define fseek(f,o,w) \
|
||||
|
@ -245,7 +251,7 @@ extern int fseeko (FILE *fp, off_t offset, int whence);
|
|||
#endif
|
||||
|
||||
#if @GNULIB_FTELL@ && @REPLACE_FTELL@
|
||||
extern long rpl_ftell (FILE *fp);
|
||||
extern long rpl_ftell (FILE *fp) _GL_ARG_NONNULL ((1));
|
||||
# undef ftell
|
||||
# if GNULIB_POSIXCHECK
|
||||
# define ftell(f) \
|
||||
|
@ -269,7 +275,7 @@ extern long rpl_ftell (FILE *fp);
|
|||
#if @GNULIB_FTELLO@
|
||||
# if @REPLACE_FTELLO@
|
||||
# define ftello rpl_ftello
|
||||
extern off_t ftello (FILE *fp);
|
||||
extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1));
|
||||
# if !@GNULIB_FTELL@
|
||||
# undef ftell
|
||||
# define ftell(f) \
|
||||
|
@ -290,7 +296,8 @@ extern off_t ftello (FILE *fp);
|
|||
#if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# undef fwrite
|
||||
# define fwrite rpl_fwrite
|
||||
extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
|
||||
extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
|
||||
_GL_ARG_NONNULL ((1, 4));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_GETDELIM@
|
||||
|
@ -302,7 +309,8 @@ extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
|
|||
Return the number of bytes read and stored at *LINEPTR (not including the
|
||||
NUL terminator), or -1 on error or EOF. */
|
||||
extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
|
||||
FILE *stream);
|
||||
FILE *stream)
|
||||
_GL_ARG_NONNULL ((1, 2, 4));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getdelim
|
||||
|
@ -324,7 +332,8 @@ extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
|
|||
bytes of space. It is realloc'd as necessary.
|
||||
Return the number of bytes read and stored at *LINEPTR (not including the
|
||||
NUL terminator), or -1 on error or EOF. */
|
||||
extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream);
|
||||
extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream)
|
||||
_GL_ARG_NONNULL ((1, 2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getline
|
||||
|
@ -347,10 +356,10 @@ extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream);
|
|||
memory allocation error, call obstack_alloc_failed_handler. Upon
|
||||
other error, return -1. */
|
||||
extern int obstack_printf (struct obstack *obs, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2));
|
||||
extern int obstack_vprintf (struct obstack *obs, const char *format,
|
||||
va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -374,7 +383,8 @@ extern void perror (const char *string);
|
|||
# if @REPLACE_POPEN@
|
||||
# undef popen
|
||||
# define popen rpl_popen
|
||||
extern FILE *popen (const char *cmd, const char *mode);
|
||||
extern FILE *popen (const char *cmd, const char *mode)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef popen
|
||||
|
@ -389,13 +399,13 @@ extern FILE *popen (const char *cmd, const char *mode);
|
|||
/* Don't break __attribute__((format(printf,M,N))). */
|
||||
# define printf __printf__
|
||||
extern int printf (const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 1, 2)));
|
||||
__attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
/* Don't break __attribute__((format(printf,M,N))). */
|
||||
# define printf __printf__
|
||||
extern int printf (const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 1, 2)));
|
||||
__attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef printf
|
||||
# define printf \
|
||||
|
@ -415,7 +425,7 @@ extern int printf (const char *format, ...)
|
|||
#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# undef putc
|
||||
# define putc rpl_fputc
|
||||
extern int putc (int c, FILE *stream);
|
||||
extern int putc (int c, FILE *stream) _GL_ARG_NONNULL ((2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
|
@ -427,14 +437,14 @@ extern int putchar (int c);
|
|||
#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# undef puts
|
||||
# define puts rpl_puts
|
||||
extern int puts (const char *string);
|
||||
extern int puts (const char *string) _GL_ARG_NONNULL ((1));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_REMOVE@
|
||||
# if @REPLACE_REMOVE@
|
||||
# undef remove
|
||||
# define remove rpl_remove
|
||||
extern int remove (const char *name);
|
||||
extern int remove (const char *name) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef remove
|
||||
|
@ -448,7 +458,8 @@ extern int remove (const char *name);
|
|||
# if @REPLACE_RENAME@
|
||||
# undef rename
|
||||
# define rename rpl_rename
|
||||
extern int rename (const char *old, const char *new);
|
||||
extern int rename (const char *old_filename, const char *new_filename)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef rename
|
||||
|
@ -464,7 +475,8 @@ extern int rename (const char *old, const char *new);
|
|||
# define renameat rpl_renameat
|
||||
# endif
|
||||
# if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@
|
||||
extern int renameat (int fd1, char const *file1, int fd2, char const *file2);
|
||||
extern int renameat (int fd1, char const *file1, int fd2, char const *file2)
|
||||
_GL_ARG_NONNULL ((2, 4));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef renameat
|
||||
|
@ -480,7 +492,8 @@ extern int renameat (int fd1, char const *file1, int fd2, char const *file2);
|
|||
# endif
|
||||
# if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
|
||||
extern int snprintf (char *str, size_t size, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)))
|
||||
_GL_ARG_NONNULL ((3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef snprintf
|
||||
|
@ -494,7 +507,8 @@ extern int snprintf (char *str, size_t size, const char *format, ...)
|
|||
# if @REPLACE_SPRINTF@
|
||||
# define sprintf rpl_sprintf
|
||||
extern int sprintf (char *str, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)))
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef sprintf
|
||||
|
@ -516,9 +530,9 @@ extern int sprintf (char *str, const char *format, ...)
|
|||
*RESULT and return the number of resulting bytes, excluding the trailing
|
||||
NUL. Upon memory allocation error, or some other error, return -1. */
|
||||
extern int asprintf (char **result, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2));
|
||||
extern int vasprintf (char **result, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -528,7 +542,7 @@ extern int sprintf (char *str, const char *format, ...)
|
|||
# endif
|
||||
# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
|
||||
extern int vdprintf (int fd, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef vdprintf
|
||||
|
@ -542,12 +556,14 @@ extern int vdprintf (int fd, const char *format, va_list args)
|
|||
# if @REPLACE_VFPRINTF@
|
||||
# define vfprintf rpl_vfprintf
|
||||
extern int vfprintf (FILE *fp, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)))
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# define vfprintf rpl_vfprintf
|
||||
extern int vfprintf (FILE *fp, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)))
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef vfprintf
|
||||
# define vfprintf(s,f,a) \
|
||||
|
@ -561,12 +577,12 @@ extern int vfprintf (FILE *fp, const char *format, va_list args)
|
|||
# if @REPLACE_VPRINTF@
|
||||
# define vprintf rpl_vprintf
|
||||
extern int vprintf (const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 1, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
|
||||
# define vprintf rpl_vprintf
|
||||
extern int vprintf (const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 1, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1));
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef vprintf
|
||||
# define vprintf(f,a) \
|
||||
|
@ -582,7 +598,8 @@ extern int vprintf (const char *format, va_list args)
|
|||
# endif
|
||||
# if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
|
||||
extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 3, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 3, 0)))
|
||||
_GL_ARG_NONNULL ((3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef vsnprintf
|
||||
|
@ -596,7 +613,8 @@ extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
|
|||
# if @REPLACE_VSPRINTF@
|
||||
# define vsprintf rpl_vsprintf
|
||||
extern int vsprintf (char *str, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)))
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef vsprintf
|
||||
|
|
|
@ -68,6 +68,8 @@ struct random_data
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
|
||||
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
|
||||
#ifndef EXIT_SUCCESS
|
||||
|
@ -91,7 +93,7 @@ extern "C" {
|
|||
# if !@HAVE_ATOLL@
|
||||
/* Parse a signed decimal integer.
|
||||
Returns the value of the integer. Errors are not detected. */
|
||||
extern long long atoll (const char *string);
|
||||
extern long long atoll (const char *string) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef atoll
|
||||
|
@ -120,7 +122,7 @@ extern void * calloc (size_t nmemb, size_t size);
|
|||
# define canonicalize_file_name rpl_canonicalize_file_name
|
||||
# endif
|
||||
# if !@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@
|
||||
extern char *canonicalize_file_name (const char *name);
|
||||
extern char *canonicalize_file_name (const char *name) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef canonicalize_file_name
|
||||
|
@ -136,7 +138,7 @@ extern char *canonicalize_file_name (const char *name);
|
|||
The three numbers are the load average of the last 1 minute, the last 5
|
||||
minutes, and the last 15 minutes, respectively.
|
||||
LOADAVG is an array of NELEM numbers. */
|
||||
extern int getloadavg (double loadavg[], int nelem);
|
||||
extern int getloadavg (double loadavg[], int nelem) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getloadavg
|
||||
|
@ -159,7 +161,8 @@ extern int getloadavg (double loadavg[], int nelem);
|
|||
For more details see the POSIX:2001 specification.
|
||||
http://www.opengroup.org/susv3xsh/getsubopt.html */
|
||||
# if !@HAVE_GETSUBOPT@
|
||||
extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
|
||||
extern int getsubopt (char **optionp, char *const *tokens, char **valuep)
|
||||
_GL_ARG_NONNULL ((1, 2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getsubopt
|
||||
|
@ -190,7 +193,7 @@ extern void * malloc (size_t size);
|
|||
they are replaced with a string that makes the directory name unique.
|
||||
Returns TEMPLATE, or a null pointer if it cannot get a unique name.
|
||||
The directory is created mode 700. */
|
||||
extern char * mkdtemp (char * /*template*/);
|
||||
extern char * mkdtemp (char * /*template*/) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkdtemp
|
||||
|
@ -214,7 +217,7 @@ extern char * mkdtemp (char * /*template*/);
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
extern int mkostemp (char * /*template*/, int /*flags*/);
|
||||
extern int mkostemp (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkostemp
|
||||
|
@ -239,7 +242,8 @@ extern int mkostemp (char * /*template*/, int /*flags*/);
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/);
|
||||
extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkostemps
|
||||
|
@ -261,7 +265,7 @@ extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/);
|
|||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
# define mkstemp rpl_mkstemp
|
||||
extern int mkstemp (char * /*template*/);
|
||||
extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1));
|
||||
# else
|
||||
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
|
||||
# include <unistd.h>
|
||||
|
@ -286,7 +290,8 @@ extern int mkstemp (char * /*template*/);
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
extern int mkstemps (char * /*template*/, int /*suffixlen*/);
|
||||
extern int mkstemps (char * /*template*/, int /*suffixlen*/)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkstemps
|
||||
|
@ -300,7 +305,7 @@ extern int mkstemps (char * /*template*/, int /*suffixlen*/);
|
|||
# if @REPLACE_PUTENV@
|
||||
# undef putenv
|
||||
# define putenv rpl_putenv
|
||||
extern int putenv (char *string);
|
||||
extern int putenv (char *string) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -311,11 +316,15 @@ extern int putenv (char *string);
|
|||
# define RAND_MAX 2147483647
|
||||
# endif
|
||||
|
||||
int srandom_r (unsigned int seed, struct random_data *rand_state);
|
||||
int srandom_r (unsigned int seed, struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
int initstate_r (unsigned int seed, char *buf, size_t buf_size,
|
||||
struct random_data *rand_state);
|
||||
int setstate_r (char *arg_state, struct random_data *rand_state);
|
||||
int random_r (struct random_data *buf, int32_t *result);
|
||||
struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((2, 4));
|
||||
int setstate_r (char *arg_state, struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
int random_r (struct random_data *buf, int32_t *result)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef random_r
|
||||
|
@ -359,7 +368,7 @@ extern void * realloc (void *ptr, size_t size);
|
|||
# define realpath rpl_realpath
|
||||
# endif
|
||||
# if !@HAVE_REALPATH@ || @REPLACE_REALPATH@
|
||||
extern char *realpath (const char *name, char *resolved);
|
||||
extern char *realpath (const char *name, char *resolved) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef realpath
|
||||
|
@ -373,7 +382,7 @@ extern char *realpath (const char *name, char *resolved);
|
|||
# if !@HAVE_RPMATCH@
|
||||
/* Test a user response to a question.
|
||||
Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
|
||||
extern int rpmatch (const char *response);
|
||||
extern int rpmatch (const char *response) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef rpmatch
|
||||
|
@ -391,7 +400,8 @@ extern int rpmatch (const char *response);
|
|||
# if !@HAVE_SETENV@ || @REPLACE_SETENV@
|
||||
/* Set NAME to VALUE in the environment.
|
||||
If REPLACE is nonzero, overwrite an existing value. */
|
||||
extern int setenv (const char *name, const char *value, int replace);
|
||||
extern int setenv (const char *name, const char *value, int replace)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef setenv
|
||||
|
@ -407,7 +417,7 @@ extern int setenv (const char *name, const char *value, int replace);
|
|||
# endif
|
||||
# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
|
||||
/* Parse a double from STRING, updating ENDP if appropriate. */
|
||||
extern double strtod (const char *str, char **endp);
|
||||
extern double strtod (const char *str, char **endp) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtod
|
||||
|
@ -427,7 +437,8 @@ extern double strtod (const char *str, char **endp);
|
|||
stored in *ENDPTR.
|
||||
Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
|
||||
to ERANGE. */
|
||||
extern long long strtoll (const char *string, char **endptr, int base);
|
||||
extern long long strtoll (const char *string, char **endptr, int base)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtoll
|
||||
|
@ -447,7 +458,8 @@ extern long long strtoll (const char *string, char **endptr, int base);
|
|||
stored in *ENDPTR.
|
||||
Upon overflow, the return value is ULLONG_MAX, and errno is set to
|
||||
ERANGE. */
|
||||
extern unsigned long long strtoull (const char *string, char **endptr, int base);
|
||||
extern unsigned long long strtoull (const char *string, char **endptr, int base)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtoull
|
||||
|
@ -464,7 +476,7 @@ extern unsigned long long strtoull (const char *string, char **endptr, int base)
|
|||
# endif
|
||||
# if !@HAVE_UNSETENV@ || @REPLACE_UNSETENV@
|
||||
/* Remove the variable NAME from the environment. */
|
||||
extern int unsetenv (const char *name);
|
||||
extern int unsetenv (const char *name) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef unsetenv
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -56,7 +58,7 @@ extern "C" {
|
|||
# if @REPLACE_MEMCHR@
|
||||
# define memchr rpl_memchr
|
||||
extern void *memchr (void const *__s, int __c, size_t __n)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef memchr
|
||||
|
@ -74,7 +76,7 @@ extern void *memchr (void const *__s, int __c, size_t __n)
|
|||
# if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@
|
||||
extern void *memmem (void const *__haystack, size_t __haystack_len,
|
||||
void const *__needle, size_t __needle_len)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef memmem
|
||||
|
@ -90,7 +92,8 @@ extern void *memmem (void const *__haystack, size_t __haystack_len,
|
|||
#if @GNULIB_MEMPCPY@
|
||||
# if ! @HAVE_MEMPCPY@
|
||||
extern void *mempcpy (void *restrict __dest, void const *restrict __src,
|
||||
size_t __n);
|
||||
size_t __n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mempcpy
|
||||
|
@ -104,7 +107,7 @@ extern void *mempcpy (void *restrict __dest, void const *restrict __src,
|
|||
#if @GNULIB_MEMRCHR@
|
||||
# if ! @HAVE_DECL_MEMRCHR@
|
||||
extern void *memrchr (void const *, int, size_t)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef memrchr
|
||||
|
@ -120,7 +123,7 @@ extern void *memrchr (void const *, int, size_t)
|
|||
#if @GNULIB_RAWMEMCHR@
|
||||
# if ! @HAVE_RAWMEMCHR@
|
||||
extern void *rawmemchr (void const *__s, int __c_in)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef rawmemchr
|
||||
|
@ -133,7 +136,8 @@ extern void *rawmemchr (void const *__s, int __c_in)
|
|||
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
|
||||
#if @GNULIB_STPCPY@
|
||||
# if ! @HAVE_STPCPY@
|
||||
extern char *stpcpy (char *restrict __dst, char const *restrict __src);
|
||||
extern char *stpcpy (char *restrict __dst, char const *restrict __src)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stpcpy
|
||||
|
@ -149,7 +153,8 @@ extern char *stpcpy (char *restrict __dst, char const *restrict __src);
|
|||
# if ! @HAVE_STPNCPY@
|
||||
# define stpncpy gnu_stpncpy
|
||||
extern char *stpncpy (char *restrict __dst, char const *restrict __src,
|
||||
size_t __n);
|
||||
size_t __n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stpncpy
|
||||
|
@ -174,7 +179,7 @@ extern char *stpncpy (char *restrict __dst, char const *restrict __src,
|
|||
#if @GNULIB_STRCHRNUL@
|
||||
# if ! @HAVE_STRCHRNUL@
|
||||
extern char *strchrnul (char const *__s, int __c_in)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strchrnul
|
||||
|
@ -191,7 +196,7 @@ extern char *strchrnul (char const *__s, int __c_in)
|
|||
# define strdup rpl_strdup
|
||||
# endif
|
||||
# if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
|
||||
extern char *strdup (char const *__s);
|
||||
extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strdup
|
||||
|
@ -208,7 +213,7 @@ extern char *strdup (char const *__s);
|
|||
# define strndup rpl_strndup
|
||||
# endif
|
||||
# if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
|
||||
extern char *strndup (char const *__string, size_t __n);
|
||||
extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strndup
|
||||
|
@ -224,7 +229,7 @@ extern char *strndup (char const *__string, size_t __n);
|
|||
#if @GNULIB_STRNLEN@
|
||||
# if ! @HAVE_DECL_STRNLEN@
|
||||
extern size_t strnlen (char const *__string, size_t __maxlen)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strnlen
|
||||
|
@ -251,7 +256,7 @@ extern size_t strnlen (char const *__string, size_t __maxlen)
|
|||
#if @GNULIB_STRPBRK@
|
||||
# if ! @HAVE_STRPBRK@
|
||||
extern char *strpbrk (char const *__s, char const *__accept)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
/* strpbrk() assumes the second argument is a list of single-byte characters.
|
||||
|
@ -313,7 +318,8 @@ extern char *strpbrk (char const *__s, char const *__accept)
|
|||
See also strtok_r(). */
|
||||
#if @GNULIB_STRSEP@
|
||||
# if ! @HAVE_STRSEP@
|
||||
extern char *strsep (char **restrict __stringp, char const *restrict __delim);
|
||||
extern char *strsep (char **restrict __stringp, char const *restrict __delim)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
# undef strsep
|
||||
|
@ -334,8 +340,8 @@ extern char *strsep (char **restrict __stringp, char const *restrict __delim);
|
|||
#if @GNULIB_STRSTR@
|
||||
# if @REPLACE_STRSTR@
|
||||
# define strstr rpl_strstr
|
||||
char *strstr (const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__));
|
||||
extern char *strstr (const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
/* strstr() does not work with multibyte strings if the locale encoding is
|
||||
|
@ -360,7 +366,7 @@ char *strstr (const char *haystack, const char *needle)
|
|||
# endif
|
||||
# if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@
|
||||
extern char *strcasestr (const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__));
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
/* strcasestr() does not work with multibyte strings:
|
||||
|
@ -407,7 +413,8 @@ extern char *strcasestr (const char *haystack, const char *needle)
|
|||
# endif
|
||||
# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
|
||||
extern char *strtok_r (char *restrict s, char const *restrict delim,
|
||||
char **restrict save_ptr);
|
||||
char **restrict save_ptr)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
# undef strtok_r
|
||||
|
@ -432,13 +439,13 @@ 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. */
|
||||
extern size_t mbslen (const char *string);
|
||||
extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSNLEN@
|
||||
/* Return the number of multibyte characters in the character string starting
|
||||
at STRING and ending at STRING + LEN. */
|
||||
extern size_t mbsnlen (const char *string, size_t len);
|
||||
extern size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSCHR@
|
||||
|
@ -447,7 +454,7 @@ extern size_t mbsnlen (const char *string, size_t len);
|
|||
Unlike strchr(), this function works correctly in multibyte locales with
|
||||
encodings such as GB18030. */
|
||||
# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
|
||||
extern char * mbschr (const char *string, int c);
|
||||
extern char * mbschr (const char *string, int c) _GL_ARG_NONNULL ((1));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSRCHR@
|
||||
|
@ -456,7 +463,7 @@ extern char * mbschr (const char *string, int c);
|
|||
Unlike strrchr(), this function works correctly in multibyte locales with
|
||||
encodings such as GB18030. */
|
||||
# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
|
||||
extern char * mbsrchr (const char *string, int c);
|
||||
extern char * mbsrchr (const char *string, int c) _GL_ARG_NONNULL ((1));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSSTR@
|
||||
|
@ -464,7 +471,8 @@ extern char * mbsrchr (const char *string, int c);
|
|||
string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
|
||||
Unlike strstr(), this function works correctly in multibyte locales with
|
||||
encodings different from UTF-8. */
|
||||
extern char * mbsstr (const char *haystack, const char *needle);
|
||||
extern char * mbsstr (const char *haystack, const char *needle)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSCASECMP@
|
||||
|
@ -474,7 +482,8 @@ extern char * mbsstr (const char *haystack, const char *needle);
|
|||
Note: This function may, in multibyte locales, return 0 for strings of
|
||||
different lengths!
|
||||
Unlike strcasecmp(), this function works correctly in multibyte locales. */
|
||||
extern int mbscasecmp (const char *s1, const char *s2);
|
||||
extern int mbscasecmp (const char *s1, const char *s2)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSNCASECMP@
|
||||
|
@ -487,7 +496,8 @@ extern int mbscasecmp (const char *s1, const char *s2);
|
|||
of different lengths!
|
||||
Unlike strncasecmp(), this function works correctly in multibyte locales.
|
||||
But beware that N is not a byte count but a character count! */
|
||||
extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
|
||||
extern int mbsncasecmp (const char *s1, const char *s2, size_t n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSPCASECMP@
|
||||
|
@ -500,7 +510,8 @@ extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
|
|||
smaller length than PREFIX!
|
||||
Unlike strncasecmp(), this function works correctly in multibyte
|
||||
locales. */
|
||||
extern char * mbspcasecmp (const char *string, const char *prefix);
|
||||
extern char * mbspcasecmp (const char *string, const char *prefix)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSCASESTR@
|
||||
|
@ -509,7 +520,8 @@ extern char * mbspcasecmp (const char *string, const char *prefix);
|
|||
Note: This function may, in multibyte locales, return success even if
|
||||
strlen (haystack) < strlen (needle) !
|
||||
Unlike strcasestr(), this function works correctly in multibyte locales. */
|
||||
extern char * mbscasestr (const char *haystack, const char *needle);
|
||||
extern char * mbscasestr (const char *haystack, const char *needle)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSCSPN@
|
||||
|
@ -518,7 +530,8 @@ extern char * mbscasestr (const char *haystack, const char *needle);
|
|||
beginning of the string to this occurrence, or to the end of the string
|
||||
if none exists.
|
||||
Unlike strcspn(), this function works correctly in multibyte locales. */
|
||||
extern size_t mbscspn (const char *string, const char *accept);
|
||||
extern size_t mbscspn (const char *string, const char *accept)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSPBRK@
|
||||
|
@ -527,7 +540,8 @@ extern size_t mbscspn (const char *string, const char *accept);
|
|||
exists.
|
||||
Unlike strpbrk(), this function works correctly in multibyte locales. */
|
||||
# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
|
||||
extern char * mbspbrk (const char *string, const char *accept);
|
||||
extern char * mbspbrk (const char *string, const char *accept)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSSPN@
|
||||
|
@ -536,7 +550,8 @@ extern char * mbspbrk (const char *string, const char *accept);
|
|||
beginning of the string to this occurrence, or to the end of the string
|
||||
if none exists.
|
||||
Unlike strspn(), this function works correctly in multibyte locales. */
|
||||
extern size_t mbsspn (const char *string, const char *reject);
|
||||
extern size_t mbsspn (const char *string, const char *reject)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSSEP@
|
||||
|
@ -554,7 +569,8 @@ extern size_t mbsspn (const char *string, const char *reject);
|
|||
Caveat: The identity of the delimiting character is lost.
|
||||
|
||||
See also mbstok_r(). */
|
||||
extern char * mbssep (char **stringp, const char *delim);
|
||||
extern char * mbssep (char **stringp, const char *delim)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSTOK_R@
|
||||
|
@ -574,7 +590,8 @@ extern char * mbssep (char **stringp, const char *delim);
|
|||
Caveat: The identity of the delimiting character is lost.
|
||||
|
||||
See also mbssep(). */
|
||||
extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
|
||||
extern char * mbstok_r (char *string, const char *delim, char **save_ptr)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
#endif
|
||||
|
||||
/* Map any int, typically from errno, into an error message. */
|
||||
|
@ -609,7 +626,7 @@ extern char *strsignal (int __sig);
|
|||
|
||||
#if @GNULIB_STRVERSCMP@
|
||||
# if !@HAVE_STRVERSCMP@
|
||||
extern int strverscmp (const char *, const char *);
|
||||
extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strverscmp
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* A substitute <strings.h>.
|
||||
|
||||
Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 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 Lesser General Public License as published by
|
||||
|
@ -31,6 +31,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -42,7 +44,8 @@ extern "C" {
|
|||
than S2.
|
||||
Note: This function does not work in multibyte locales. */
|
||||
#if ! @HAVE_STRCASECMP@
|
||||
extern int strcasecmp (char const *s1, char const *s2);
|
||||
extern int strcasecmp (char const *s1, char const *s2)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
#if defined GNULIB_POSIXCHECK
|
||||
/* strcasecmp() does not work with multibyte strings:
|
||||
|
@ -64,7 +67,8 @@ extern int strcasecmp (char const *s1, char const *s2);
|
|||
lexicographically less than, equal to or greater than S2.
|
||||
Note: This function cannot work correctly in multibyte locales. */
|
||||
#if ! @HAVE_DECL_STRNCASECMP@
|
||||
extern int strncasecmp (char const *s1, char const *s2, size_t n);
|
||||
extern int strncasecmp (char const *s1, char const *s2, size_t n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
#if defined GNULIB_POSIXCHECK
|
||||
/* strncasecmp() does not work with multibyte strings:
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
#ifndef _GL_SYS_SOCKET_H
|
||||
#define _GL_SYS_SOCKET_H
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
#if !@HAVE_SA_FAMILY_T@
|
||||
typedef unsigned short sa_family_t;
|
||||
#endif
|
||||
|
@ -195,7 +197,7 @@ extern int rpl_socket (int, int, int protocol);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef connect
|
||||
# define connect rpl_connect
|
||||
extern int rpl_connect (int, struct sockaddr *, int);
|
||||
extern int rpl_connect (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef connect
|
||||
|
@ -229,7 +231,7 @@ extern int rpl_accept (int, struct sockaddr *, int *);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef bind
|
||||
# define bind rpl_bind
|
||||
extern int rpl_bind (int, struct sockaddr *, int);
|
||||
extern int rpl_bind (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef bind
|
||||
|
@ -246,7 +248,8 @@ extern int rpl_bind (int, struct sockaddr *, int);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef getpeername
|
||||
# define getpeername rpl_getpeername
|
||||
extern int rpl_getpeername (int, struct sockaddr *, int *);
|
||||
extern int rpl_getpeername (int, struct sockaddr *, int *)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef getpeername
|
||||
|
@ -263,7 +266,8 @@ extern int rpl_getpeername (int, struct sockaddr *, int *);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef getsockname
|
||||
# define getsockname rpl_getsockname
|
||||
extern int rpl_getsockname (int, struct sockaddr *, int *);
|
||||
extern int rpl_getsockname (int, struct sockaddr *, int *)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef getsockname
|
||||
|
@ -280,7 +284,8 @@ extern int rpl_getsockname (int, struct sockaddr *, int *);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef getsockopt
|
||||
# define getsockopt rpl_getsockopt
|
||||
extern int rpl_getsockopt (int, int, int, void *, socklen_t *);
|
||||
extern int rpl_getsockopt (int, int, int, void *, socklen_t *)
|
||||
_GL_ARG_NONNULL ((4, 5));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef getsockopt
|
||||
|
@ -314,7 +319,7 @@ extern int rpl_listen (int, int);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef recv
|
||||
# define recv rpl_recv
|
||||
extern int rpl_recv (int, void *, int, int);
|
||||
extern int rpl_recv (int, void *, int, int) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef recv
|
||||
|
@ -331,7 +336,7 @@ extern int rpl_recv (int, void *, int, int);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef send
|
||||
# define send rpl_send
|
||||
extern int rpl_send (int, const void *, int, int);
|
||||
extern int rpl_send (int, const void *, int, int) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef send
|
||||
|
@ -348,7 +353,8 @@ extern int rpl_send (int, const void *, int, int);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef recvfrom
|
||||
# define recvfrom rpl_recvfrom
|
||||
extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *);
|
||||
extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef recvfrom
|
||||
|
@ -365,7 +371,8 @@ extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef sendto
|
||||
# define sendto rpl_sendto
|
||||
extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int);
|
||||
extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef sendto
|
||||
|
@ -382,7 +389,8 @@ extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int);
|
|||
# if @HAVE_WINSOCK2_H@
|
||||
# undef setsockopt
|
||||
# define setsockopt rpl_setsockopt
|
||||
extern int rpl_setsockopt (int, int, int, const void *, socklen_t);
|
||||
extern int rpl_setsockopt (int, int, int, const void *, socklen_t)
|
||||
_GL_ARG_NONNULL ((4));
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef setsockopt
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL 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__
|
||||
|
@ -295,7 +297,8 @@ extern "C" {
|
|||
|
||||
#if @GNULIB_FCHMODAT@
|
||||
# if !@HAVE_FCHMODAT@
|
||||
extern int fchmodat (int fd, char const *file, mode_t mode, int flag);
|
||||
extern int fchmodat (int fd, char const *file, mode_t mode, int flag)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fchmodat
|
||||
|
@ -308,7 +311,7 @@ extern int fchmodat (int fd, char const *file, mode_t mode, int flag);
|
|||
|
||||
#if @REPLACE_FSTAT@
|
||||
# define fstat rpl_fstat
|
||||
extern int fstat (int fd, struct stat *buf);
|
||||
extern int fstat (int fd, struct stat *buf) _GL_ARG_NONNULL ((2));
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -318,7 +321,8 @@ extern int fstat (int fd, struct stat *buf);
|
|||
# define fstatat rpl_fstatat
|
||||
# endif
|
||||
# if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@
|
||||
extern int fstatat (int fd, char const *name, struct stat *st, int flags);
|
||||
extern int fstatat (int fd, char const *name, struct stat *st, int flags)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fstatat
|
||||
|
@ -360,7 +364,7 @@ extern int futimens (int fd, struct timespec const times[2]);
|
|||
# define lchmod chmod
|
||||
# endif
|
||||
# if 0 /* assume already declared */
|
||||
extern int lchmod (const char *filename, mode_t mode);
|
||||
extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef lchmod
|
||||
|
@ -379,7 +383,8 @@ extern int lchmod (const char *filename, mode_t mode);
|
|||
# elif @REPLACE_LSTAT@
|
||||
# undef lstat
|
||||
# define lstat rpl_lstat
|
||||
extern int rpl_lstat (const char *name, struct stat *buf);
|
||||
extern int rpl_lstat (const char *name, struct stat *buf)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef lstat
|
||||
|
@ -393,7 +398,7 @@ extern int rpl_lstat (const char *name, struct stat *buf);
|
|||
#if @REPLACE_MKDIR@
|
||||
# undef mkdir
|
||||
# define mkdir rpl_mkdir
|
||||
extern int mkdir (char const *name, mode_t mode);
|
||||
extern int mkdir (char const *name, mode_t mode) _GL_ARG_NONNULL ((1));
|
||||
#else
|
||||
/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
|
||||
Additionally, it declares _mkdir (and depending on compile flags, an
|
||||
|
@ -413,7 +418,8 @@ rpl_mkdir (char const *name, mode_t mode)
|
|||
|
||||
#if @GNULIB_MKDIRAT@
|
||||
# if !@HAVE_MKDIRAT@
|
||||
extern int mkdirat (int fd, char const *file, mode_t mode);
|
||||
extern int mkdirat (int fd, char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkdirat
|
||||
|
@ -430,7 +436,7 @@ extern int mkdirat (int fd, char const *file, mode_t mode);
|
|||
# define mkfifo rpl_mkfifo
|
||||
# endif
|
||||
# if !@HAVE_MKFIFO@ || @REPLACE_MKFIFO@
|
||||
int mkfifo (char const *file, mode_t mode);
|
||||
extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkfifo
|
||||
|
@ -443,7 +449,8 @@ int mkfifo (char const *file, mode_t mode);
|
|||
|
||||
#if @GNULIB_MKFIFOAT@
|
||||
# if !@HAVE_MKFIFOAT@
|
||||
int mkfifoat (int fd, char const *file, mode_t mode);
|
||||
extern int mkfifoat (int fd, char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkfifoat
|
||||
|
@ -460,7 +467,8 @@ int mkfifoat (int fd, char const *file, mode_t mode);
|
|||
# define mknod rpl_mknod
|
||||
# endif
|
||||
# if !@HAVE_MKNOD@ || @REPLACE_MKNOD@
|
||||
int mknod (char const *file, mode_t mode, dev_t dev);
|
||||
extern int mknod (char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mknod
|
||||
|
@ -473,7 +481,8 @@ int mknod (char const *file, mode_t mode, dev_t dev);
|
|||
|
||||
#if @GNULIB_MKNODAT@
|
||||
# if !@HAVE_MKNODAT@
|
||||
int mknodat (int fd, char const *file, mode_t mode, dev_t dev);
|
||||
extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mknodat
|
||||
|
@ -499,7 +508,7 @@ int mknodat (int fd, char const *file, mode_t mode, dev_t dev);
|
|||
# else /* !_LARGE_FILES */
|
||||
# define stat(name, st) rpl_stat (name, st)
|
||||
# endif /* !_LARGE_FILES */
|
||||
extern int stat (const char *name, struct stat *buf);
|
||||
extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stat
|
||||
|
@ -517,7 +526,8 @@ extern int stat (const char *name, struct stat *buf);
|
|||
# endif
|
||||
# if !@HAVE_UTIMENSAT@ || @REPLACE_UTIMENSAT@
|
||||
extern int utimensat (int fd, char const *name,
|
||||
struct timespec const times[2], int flag);
|
||||
struct timespec const times[2], int flag)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef utimensat
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
/* NetBSD 5.0 mis-defines NULL. */
|
||||
#include <stddef.h>
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
@ -66,13 +68,14 @@ struct timespec
|
|||
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
|
||||
# if @REPLACE_NANOSLEEP@
|
||||
# define nanosleep rpl_nanosleep
|
||||
int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
|
||||
extern int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
|
||||
/* Return the 'time_t' representation of TP and normalize TP. */
|
||||
# if @REPLACE_MKTIME@
|
||||
# define mktime rpl_mktime
|
||||
extern time_t mktime (struct tm *__tp);
|
||||
extern time_t mktime (struct tm *__tp) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
|
||||
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
|
||||
|
@ -83,10 +86,12 @@ extern time_t mktime (struct tm *__tp);
|
|||
# define localtime_r rpl_localtime_r
|
||||
# undef gmtime_r
|
||||
# define gmtime_r rpl_gmtime_r
|
||||
struct tm *localtime_r (time_t const *restrict __timer,
|
||||
struct tm *restrict __result);
|
||||
struct tm *gmtime_r (time_t const *restrict __timer,
|
||||
struct tm *restrict __result);
|
||||
extern struct tm *localtime_r (time_t const *restrict __timer,
|
||||
struct tm *restrict __result)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
extern struct tm *gmtime_r (time_t const *restrict __timer,
|
||||
struct tm *restrict __result)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
|
||||
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
|
||||
|
@ -95,15 +100,17 @@ struct tm *gmtime_r (time_t const *restrict __timer,
|
|||
# if @REPLACE_STRPTIME@
|
||||
# undef strptime
|
||||
# define strptime rpl_strptime
|
||||
char *strptime (char const *restrict __buf, char const *restrict __format,
|
||||
struct tm *restrict __tm);
|
||||
extern char *strptime (char const *restrict __buf,
|
||||
char const *restrict __format,
|
||||
struct tm *restrict __tm)
|
||||
_GL_ARG_NONNULL ((1, 2, 3));
|
||||
# endif
|
||||
|
||||
/* Convert TM to a time_t value, assuming UTC. */
|
||||
# if @REPLACE_TIMEGM@
|
||||
# undef timegm
|
||||
# define timegm rpl_timegm
|
||||
time_t timegm (struct tm *__tm);
|
||||
extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
|
||||
/* Encourage applications to avoid unsafe functions that can overrun
|
||||
|
|
|
@ -96,6 +96,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
|
||||
/* OS/2 EMX lacks these macros. */
|
||||
#ifndef STDIN_FILENO
|
||||
|
@ -135,7 +137,8 @@ extern "C" {
|
|||
Return 0 if successful, otherwise -1 and errno set.
|
||||
See the POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/chown.html>. */
|
||||
extern int chown (const char *file, uid_t uid, gid_t gid);
|
||||
extern int chown (const char *file, uid_t uid, gid_t gid)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef chown
|
||||
|
@ -239,7 +242,7 @@ extern char **environ;
|
|||
# if !@HAVE_EUIDACCESS@
|
||||
/* Like access(), except that it uses the effective user id and group id of
|
||||
the current process. */
|
||||
extern int euidaccess (const char *filename, int mode);
|
||||
extern int euidaccess (const char *filename, int mode) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef euidaccess
|
||||
|
@ -252,7 +255,8 @@ extern int euidaccess (const char *filename, int mode);
|
|||
|
||||
#if @GNULIB_FACCESSAT@
|
||||
# if !@HAVE_FACCESSAT@
|
||||
int faccessat (int fd, char const *file, int mode, int flag);
|
||||
extern int faccessat (int fd, char const *file, int mode, int flag)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef faccessat
|
||||
|
@ -273,7 +277,8 @@ int faccessat (int fd, char const *file, int mode, int flag);
|
|||
extern int fchdir (int /*fd*/);
|
||||
|
||||
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
|
||||
extern int _gl_register_fd (int fd, const char *filename);
|
||||
extern int _gl_register_fd (int fd, const char *filename)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
extern void _gl_unregister_fd (int fd);
|
||||
extern int _gl_register_dup (int oldfd, int newfd);
|
||||
extern const char *_gl_directory_name (int fd);
|
||||
|
@ -294,7 +299,8 @@ extern const char *_gl_directory_name (int fd);
|
|||
# define fchownat rpl_fchownat
|
||||
# endif
|
||||
# if !@HAVE_FCHOWNAT@ || @REPLACE_FCHOWNAT@
|
||||
extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag);
|
||||
extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fchownat
|
||||
|
@ -378,7 +384,7 @@ extern char * getcwd (char *buf, size_t size);
|
|||
If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
|
||||
Return 0 if successful, otherwise set errno and return -1. */
|
||||
# if !@HAVE_GETDOMAINNAME@
|
||||
extern int getdomainname(char *name, size_t len);
|
||||
extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getdomainname
|
||||
|
@ -439,7 +445,7 @@ int getgroups (int n, gid_t *groups);
|
|||
# define gethostname rpl_gethostname
|
||||
# endif
|
||||
# if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@
|
||||
extern int gethostname(char *name, size_t len);
|
||||
extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif @UNISTD_H_HAVE_WINSOCK2_H@
|
||||
# undef gethostname
|
||||
|
@ -464,7 +470,7 @@ extern int gethostname(char *name, size_t len);
|
|||
See <http://www.opengroup.org/susv3xsh/getlogin.html>.
|
||||
*/
|
||||
# if !@HAVE_DECL_GETLOGIN_R@
|
||||
extern int getlogin_r (char *name, size_t size);
|
||||
extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getlogin_r
|
||||
|
@ -574,7 +580,8 @@ extern void endusershell (void);
|
|||
Return 0 if successful, otherwise -1 and errno set.
|
||||
See the POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/lchown.html>. */
|
||||
extern int lchown (char const *file, uid_t owner, gid_t group);
|
||||
extern int lchown (char const *file, uid_t owner, gid_t group)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef lchown
|
||||
|
@ -594,7 +601,8 @@ extern int lchown (char const *file, uid_t owner, gid_t group);
|
|||
See POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/link.html>. */
|
||||
# if !@HAVE_LINK@ || @REPLACE_LINK@
|
||||
extern int link (const char *path1, const char *path2);
|
||||
extern int link (const char *path1, const char *path2)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef link
|
||||
|
@ -614,7 +622,8 @@ extern int link (const char *path1, const char *path2);
|
|||
Return 0 if successful, otherwise -1 and errno set. */
|
||||
# if !@HAVE_LINKAT@ || @REPLACE_LINKAT@
|
||||
extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
|
||||
int flag);
|
||||
int flag)
|
||||
_GL_ARG_NONNULL ((2, 4));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef linkat
|
||||
|
@ -654,7 +663,7 @@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
|
|||
# if @HAVE_PIPE2@
|
||||
# define pipe2 rpl_pipe2
|
||||
# endif
|
||||
extern int pipe2 (int fd[2], int flags);
|
||||
extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1));
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef pipe2
|
||||
# define pipe2(f,o) \
|
||||
|
@ -664,6 +673,27 @@ extern int pipe2 (int fd[2], int flags);
|
|||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_PREAD@
|
||||
# if @REPLACE_PREAD@
|
||||
# define pread rpl_pread
|
||||
# endif
|
||||
/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
|
||||
Return the number of bytes placed into BUF if successful, otherwise
|
||||
set errno and return -1. 0 indicates EOF. See the POSIX:2001
|
||||
specification <http://www.opengroup.org/susv3xsh/pread.html>. */
|
||||
# if !@HAVE_PREAD@ || @REPLACE_PREAD@
|
||||
extern ssize_t pread (int fd, void *buf, size_t bufsize, off_t offset)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# 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))
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_READLINK@
|
||||
# if @REPLACE_READLINK@
|
||||
# define readlink rpl_readlink
|
||||
|
@ -674,7 +704,8 @@ extern int pipe2 (int fd[2], int flags);
|
|||
See the POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/readlink.html>. */
|
||||
# if !@HAVE_READLINK@ || @REPLACE_READLINK@
|
||||
extern ssize_t readlink (const char *file, char *buf, size_t bufsize);
|
||||
extern ssize_t readlink (const char *file, char *buf, size_t bufsize)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef readlink
|
||||
|
@ -687,7 +718,8 @@ extern ssize_t readlink (const char *file, char *buf, size_t bufsize);
|
|||
|
||||
#if @GNULIB_READLINKAT@
|
||||
# if !@HAVE_READLINKAT@
|
||||
ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
|
||||
extern ssize_t readlinkat (int fd, char const *file, char *buf, size_t len)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef readlinkat
|
||||
|
@ -702,7 +734,7 @@ ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
|
|||
# if @REPLACE_RMDIR@
|
||||
# define rmdir rpl_rmdir
|
||||
/* Remove the directory DIR. */
|
||||
extern int rmdir (char const *name);
|
||||
extern int rmdir (char const *name) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef rmdir
|
||||
|
@ -740,7 +772,8 @@ extern unsigned int sleep (unsigned int n);
|
|||
# define symlink rpl_symlink
|
||||
# endif
|
||||
# if !@HAVE_SYMLINK@ || @REPLACE_SYMLINK@
|
||||
int symlink (char const *contents, char const *file);
|
||||
extern int symlink (char const *contents, char const *file)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef symlink
|
||||
|
@ -753,7 +786,8 @@ int symlink (char const *contents, char const *file);
|
|||
|
||||
#if @GNULIB_SYMLINKAT@
|
||||
# if !@HAVE_SYMLINKAT@
|
||||
int symlinkat (char const *contents, int fd, char const *file);
|
||||
extern int symlinkat (char const *contents, int fd, char const *file)
|
||||
_GL_ARG_NONNULL ((1, 3));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef symlinkat
|
||||
|
@ -768,7 +802,7 @@ int symlinkat (char const *contents, int fd, char const *file);
|
|||
# if @REPLACE_UNLINK@
|
||||
# undef unlink
|
||||
# define unlink rpl_unlink
|
||||
extern int unlink (char const *file);
|
||||
extern int unlink (char const *file) _GL_ARG_NONNULL ((1));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef unlink
|
||||
|
@ -785,7 +819,7 @@ extern int unlink (char const *file);
|
|||
# define unlinkat rpl_unlinkat
|
||||
# endif
|
||||
# if !@HAVE_UNLINKAT@ || @REPLACE_UNLINKAT@
|
||||
extern int unlinkat (int fd, char const *file, int flag);
|
||||
extern int unlinkat (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef unlinkat
|
||||
|
@ -823,7 +857,8 @@ extern int usleep (useconds_t n);
|
|||
<http://www.opengroup.org/susv3xsh/write.html>. */
|
||||
# undef write
|
||||
# define write rpl_write
|
||||
extern ssize_t write (int fd, const void *buf, size_t count);
|
||||
extern ssize_t write (int fd, const void *buf, size_t count)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,12 @@
|
|||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
/* If you use AM_INIT_AUTOMAKE's no-define option,
|
||||
PACKAGE is not defined. Use PACKAGE_TARNAME instead. */
|
||||
#if ! defined PACKAGE && defined PACKAGE_TARNAME
|
||||
# define PACKAGE PACKAGE_TARNAME
|
||||
#endif
|
||||
|
||||
enum { COPYRIGHT_YEAR = 2009 };
|
||||
|
||||
/* The three functions below display the --version information the
|
||||
|
@ -245,7 +251,7 @@ emit_bug_reporting_address (void)
|
|||
printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
|
||||
#else
|
||||
printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"),
|
||||
PACKAGE_NAME, PACKAGE_TARNAME);
|
||||
PACKAGE_NAME, PACKAGE);
|
||||
#endif
|
||||
fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
|
||||
stdout);
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -197,7 +199,8 @@ extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
|
|||
# define mbsrtowcs rpl_mbsrtowcs
|
||||
# endif
|
||||
# if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
|
||||
extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps);
|
||||
extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbsrtowcs
|
||||
|
@ -215,7 +218,8 @@ extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t
|
|||
# define mbsnrtowcs rpl_mbsnrtowcs
|
||||
# endif
|
||||
# if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
|
||||
extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps);
|
||||
extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbsnrtowcs
|
||||
|
@ -251,7 +255,8 @@ extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
|
|||
# define wcsrtombs rpl_wcsrtombs
|
||||
# endif
|
||||
# if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
|
||||
extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps);
|
||||
extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcsrtombs
|
||||
|
@ -269,7 +274,8 @@ extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t
|
|||
# define wcsnrtombs rpl_wcsnrtombs
|
||||
# endif
|
||||
# if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@
|
||||
extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
|
||||
extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcsnrtombs
|
||||
|
|
|
@ -115,69 +115,6 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/* Ultrix has S_IFSOCK, but no S_ISSOCK. Ipe! */
|
||||
#if defined (S_IFSOCK) && ! defined (S_ISSOCK)
|
||||
#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
|
||||
#endif
|
||||
|
||||
/* The MinGW gcc does not define the S_ISSOCK macro. Any other native Windows
|
||||
compiler like BorlandC or MSVC has none of these macros defined. */
|
||||
#ifdef __MINGW32__
|
||||
|
||||
# ifdef _S_IFIFO
|
||||
# undef _S_IFIFO
|
||||
# endif
|
||||
# ifdef _S_IFCHR
|
||||
# undef _S_IFCHR
|
||||
# endif
|
||||
# ifdef _S_IFBLK
|
||||
# undef _S_IFBLK
|
||||
# endif
|
||||
# ifdef _S_IFDIR
|
||||
# undef _S_IFDIR
|
||||
# endif
|
||||
# ifdef _S_IFREG
|
||||
# undef _S_IFREG
|
||||
# endif
|
||||
# ifdef _S_IFSOCK
|
||||
# undef _S_IFSOCK
|
||||
# endif
|
||||
|
||||
# define _S_IFIFO 0x1000 /* FIFO */
|
||||
# define _S_IFCHR 0x2000 /* Character */
|
||||
# define _S_IFBLK 0x3000 /* Block */
|
||||
# define _S_IFDIR 0x4000 /* Directory */
|
||||
# define _S_IFREG 0x8000 /* Regular */
|
||||
# define _S_IFSOCK 0xC000 /* Socket */
|
||||
|
||||
# ifdef S_ISBLK
|
||||
# undef S_ISBLK
|
||||
# endif
|
||||
# ifdef S_ISFIFO
|
||||
# undef S_ISFIFO
|
||||
# endif
|
||||
# ifdef S_ISCHR
|
||||
# undef S_ISCHR
|
||||
# endif
|
||||
# ifdef S_ISDIR
|
||||
# undef S_ISDIR
|
||||
# endif
|
||||
# ifdef S_ISREG
|
||||
# undef S_ISREG
|
||||
# endif
|
||||
# ifdef S_ISSOCK
|
||||
# undef S_ISSOCK
|
||||
# endif
|
||||
|
||||
# define S_ISBLK(mode) (((mode) & _S_IFMT) == _S_IFBLK)
|
||||
# define S_ISFIFO(mode) (((mode) & _S_IFMT) == _S_IFIFO)
|
||||
# define S_ISCHR(mode) (((mode) & _S_IFMT) == _S_IFCHR)
|
||||
# define S_ISDIR(mode) (((mode) & _S_IFMT) == _S_IFDIR)
|
||||
# define S_ISREG(mode) (((mode) & _S_IFMT) == _S_IFREG)
|
||||
# define S_ISSOCK(mode) (((mode) & _S_IFMT) == _S_IFSOCK)
|
||||
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
/* Some more definitions for the native Windows port. */
|
||||
#ifdef __MINGW32__
|
||||
# define mkdir(path, mode) mkdir (path)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
# Specification in the form of a command-line invocation:
|
||||
# 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 verify version-etc-fsf vsnprintf warnings
|
||||
# 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
|
||||
|
||||
# Specification in the form of a few gnulib-tool.m4 macro invocations:
|
||||
gl_LOCAL_DIR([])
|
||||
|
@ -52,6 +52,7 @@ gl_MODULES([
|
|||
strftime
|
||||
striconveh
|
||||
string
|
||||
sys_stat
|
||||
verify
|
||||
version-etc-fsf
|
||||
vsnprintf
|
||||
|
|
|
@ -179,7 +179,7 @@ AC_DEFUN([gl_INIT],
|
|||
if test -n "$gl_LIBOBJS"; then
|
||||
# Remove the extension.
|
||||
sed_drop_objext='s/\.o$//;s/\.obj$//'
|
||||
for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
|
||||
for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
|
||||
gl_libobjs="$gl_libobjs $i.$ac_objext"
|
||||
gl_ltlibobjs="$gl_ltlibobjs $i.lo"
|
||||
done
|
||||
|
@ -218,7 +218,7 @@ AC_DEFUN([gl_INIT],
|
|||
if test -n "$gltests_LIBOBJS"; then
|
||||
# Remove the extension.
|
||||
sed_drop_objext='s/\.o$//;s/\.obj$//'
|
||||
for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
|
||||
for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
|
||||
gltests_libobjs="$gltests_libobjs $i.$ac_objext"
|
||||
gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
|
||||
done
|
||||
|
@ -286,6 +286,7 @@ AC_DEFUN([gltests_LIBSOURCES], [
|
|||
# gnulib-tool and may be removed by future gnulib-tool invocations.
|
||||
AC_DEFUN([gl_FILE_LIST], [
|
||||
build-aux/announce-gen
|
||||
build-aux/arg-nonnull.h
|
||||
build-aux/config.rpath
|
||||
build-aux/gendocs.sh
|
||||
build-aux/gitlog-to-changelog
|
||||
|
|
|
@ -56,6 +56,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
|||
GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
|
||||
GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
|
||||
GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
|
||||
GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
|
||||
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
|
||||
GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
|
||||
GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
|
||||
|
@ -87,6 +88,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
|||
HAVE_LINK=1; AC_SUBST([HAVE_LINK])
|
||||
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
|
||||
HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
|
||||
HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
|
||||
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
|
||||
HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
|
||||
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
|
||||
|
@ -111,6 +113,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
|||
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
|
||||
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
|
||||
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
|
||||
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
|
||||
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
|
||||
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
|
||||
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
|
||||
|
|
38
maint.mk
38
maint.mk
|
@ -77,6 +77,11 @@ else
|
|||
url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
|
||||
endif
|
||||
|
||||
# Override this in cfg.mk if you are using a different format in your
|
||||
# NEWS file.
|
||||
today = $(shell date +%Y-%m-%d)
|
||||
news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
|
||||
|
||||
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
||||
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
|
||||
export LC_ALL = C
|
||||
|
@ -568,13 +573,12 @@ sc_makefile_check:
|
|||
$$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \
|
||||
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
|
||||
|
||||
news-date-check: NEWS
|
||||
today=`date +%Y-%m-%d`; \
|
||||
if head $(srcdir)/NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
|
||||
news-check: NEWS
|
||||
if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \
|
||||
>/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "version or today's date is not in NEWS" 1>&2; \
|
||||
echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
|
@ -678,17 +682,6 @@ vc-diff-check:
|
|||
rm vc-diffs; \
|
||||
fi
|
||||
|
||||
# Use this to make sure we don't run these programs when building
|
||||
# from a virgin tgz file, below.
|
||||
null_AM_MAKEFLAGS = \
|
||||
ACLOCAL=false \
|
||||
AUTOCONF=false \
|
||||
AUTOMAKE=false \
|
||||
AUTOHEADER=false \
|
||||
MAKEINFO=false
|
||||
|
||||
built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list)
|
||||
|
||||
rel-files = $(DIST_ARCHIVES)
|
||||
|
||||
gnulib_dir ?= $(srcdir)/gnulib
|
||||
|
@ -754,15 +747,24 @@ alpha beta stable: $(local-check) writable-files no-submodule-changes
|
|||
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|
||||
|| :
|
||||
$(MAKE) vc-diff-check
|
||||
$(MAKE) news-date-check
|
||||
$(MAKE) news-check
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) dist XZ_OPT=-9ev
|
||||
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
||||
$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
|
||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
||||
|
||||
# Override this in cfg.mk if you follow different procedures.
|
||||
release-prep-hook ?= release-prep
|
||||
|
||||
.PHONY: release-prep
|
||||
release-prep:
|
||||
case $$RELEASE_TYPE in alpha|beta|stable) ;; \
|
||||
*) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
|
||||
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
|
||||
if test -d $(release_archive_dir); then \
|
||||
ln $(rel-files) $(release_archive_dir); \
|
||||
chmod a-w $(rel-files); \
|
||||
fi
|
||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
$(MAKE) update-NEWS-hash
|
||||
perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue