mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Update Gnulib; use the `func' module.
Update Gnulib to v0.0-3575-g128e4b8. * m4/gnulib-cache.m4: Add `func'.
This commit is contained in:
parent
54eb59cf49
commit
f4c79b3c08
31 changed files with 3025 additions and 1026 deletions
233
build-aux/c++defs.h
Normal file
233
build-aux/c++defs.h
Normal file
|
@ -0,0 +1,233 @@
|
|||
/* C++ compatible function declaration macros.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published
|
||||
by the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GL_CXXDEFS_H
|
||||
#define _GL_CXXDEFS_H
|
||||
|
||||
/* The three most frequent use cases of these macros are:
|
||||
|
||||
* For providing a substitute for a function that is missing on some
|
||||
platforms, but is declared and works fine on the platforms on which
|
||||
it exists:
|
||||
|
||||
#if @GNULIB_FOO@
|
||||
# if !@HAVE_FOO@
|
||||
_GL_FUNCDECL_SYS (foo, ...);
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (foo, ...);
|
||||
_GL_CXXALIASWARN (foo);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
...
|
||||
#endif
|
||||
|
||||
* For providing a replacement for a function that exists on all platforms,
|
||||
but is broken/insufficient and needs to be replaced on some platforms:
|
||||
|
||||
#if @GNULIB_FOO@
|
||||
# if @REPLACE_FOO@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef foo
|
||||
# define foo rpl_foo
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (foo, ...);
|
||||
_GL_CXXALIAS_RPL (foo, ...);
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (foo, ...);
|
||||
# endif
|
||||
_GL_CXXALIASWARN (foo);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
...
|
||||
#endif
|
||||
|
||||
* For providing a replacement for a function that exists on some platforms
|
||||
but is broken/insufficient and needs to be replaced on some of them and
|
||||
is additionally either missing or undeclared on some other platforms:
|
||||
|
||||
#if @GNULIB_FOO@
|
||||
# if @REPLACE_FOO@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef foo
|
||||
# define foo rpl_foo
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (foo, ...);
|
||||
_GL_CXXALIAS_RPL (foo, ...);
|
||||
# else
|
||||
# if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
|
||||
_GL_FUNCDECL_SYS (foo, ...);
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (foo, ...);
|
||||
# endif
|
||||
_GL_CXXALIASWARN (foo);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
...
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* _GL_EXTERN_C declaration;
|
||||
performs the declaration with C linkage. */
|
||||
#if defined __cplusplus
|
||||
# define _GL_EXTERN_C extern "C"
|
||||
#else
|
||||
# define _GL_EXTERN_C extern
|
||||
#endif
|
||||
|
||||
/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
|
||||
declares a replacement function, named rpl_func, with the given prototype,
|
||||
consisting of return type, parameters, and attributes.
|
||||
Example:
|
||||
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
*/
|
||||
#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
|
||||
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
|
||||
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
|
||||
_GL_EXTERN_C rettype rpl_func parameters_and_attributes
|
||||
|
||||
/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
|
||||
declares the system function, named func, with the given prototype,
|
||||
consisting of return type, parameters, and attributes.
|
||||
Example:
|
||||
_GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
*/
|
||||
#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
|
||||
_GL_EXTERN_C rettype func parameters_and_attributes
|
||||
|
||||
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||
that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
|
||||
Example:
|
||||
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
|
||||
*/
|
||||
#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
|
||||
_GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
|
||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
|
||||
namespace GNULIB_NAMESPACE \
|
||||
{ \
|
||||
rettype (*const func) parameters = ::rpl_func; \
|
||||
} \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#else
|
||||
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
/* _GL_CXXALIAS_SYS (func, rettype, parameters);
|
||||
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||
that redirects to the system provided function func, if GNULIB_NAMESPACE
|
||||
is defined.
|
||||
Example:
|
||||
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
|
||||
*/
|
||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
/* If we were to write
|
||||
rettype (*const func) parameters = ::func;
|
||||
like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
|
||||
better (remove an indirection through a 'static' pointer variable),
|
||||
but then the _GL_CXXALIASWARN macro below would cause a warning not only
|
||||
for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
|
||||
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
|
||||
namespace GNULIB_NAMESPACE \
|
||||
{ \
|
||||
static rettype (*func) parameters = ::func; \
|
||||
} \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#else
|
||||
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
|
||||
is like _GL_CXXALIAS_SYS (func, rettype, parameters);
|
||||
except that the C function func may have a slightly different declaration.
|
||||
A cast is used to silence the "invalid conversion" error that would
|
||||
otherwise occur. */
|
||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
|
||||
namespace GNULIB_NAMESPACE \
|
||||
{ \
|
||||
static rettype (*func) parameters = \
|
||||
reinterpret_cast<rettype(*)parameters>(::func); \
|
||||
} \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#else
|
||||
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
|
||||
is like _GL_CXXALIAS_SYS (func, rettype, parameters);
|
||||
except that the C function is picked among a set of overloaded functions,
|
||||
namely the one with rettype2 and parameters2. Two consecutive casts
|
||||
are used to silence the "cannot find a match" and "invalid conversion"
|
||||
errors that would otherwise occur. */
|
||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
/* The outer cast must be a reinterpret_cast.
|
||||
The inner cast: When the function is defined as a set of overloaded
|
||||
functions, it works as a static_cast<>, choosing the designated variant.
|
||||
When the function is defined as a single variant, it works as a
|
||||
reinterpret_cast<>. The parenthesized cast syntax works both ways. */
|
||||
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
|
||||
namespace GNULIB_NAMESPACE \
|
||||
{ \
|
||||
static rettype (*func) parameters = \
|
||||
reinterpret_cast<rettype(*)parameters>( \
|
||||
(rettype2(*)parameters2)(::func)); \
|
||||
} \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#else
|
||||
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
/* _GL_CXXALIASWARN (func);
|
||||
causes a warning to be emitted when ::func is used but not when
|
||||
GNULIB_NAMESPACE::func is used. func must be defined without overloaded
|
||||
variants. */
|
||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# define _GL_CXXALIASWARN(func) \
|
||||
_GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
|
||||
# define _GL_CXXALIASWARN_1(func,namespace) \
|
||||
_GL_CXXALIASWARN_2 (func, namespace)
|
||||
# define _GL_CXXALIASWARN_2(func,namespace) \
|
||||
_GL_WARN_ON_USE (func, \
|
||||
"The symbol ::" #func " refers to the system function. " \
|
||||
"Use " #namespace "::" #func " instead.")
|
||||
#else
|
||||
# define _GL_CXXALIASWARN(func) \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
|
||||
causes a warning to be emitted when the given overloaded variant of ::func
|
||||
is used but not when GNULIB_NAMESPACE::func is used. */
|
||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
|
||||
_GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
|
||||
GNULIB_NAMESPACE)
|
||||
# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
|
||||
_GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
|
||||
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
|
||||
_GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
|
||||
"The symbol ::" #func " refers to the system function. " \
|
||||
"Use " #namespace "::" #func " instead.")
|
||||
#else
|
||||
# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
|
||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
#endif /* _GL_CXXDEFS_H */
|
|
@ -2,7 +2,7 @@
|
|||
# List version-controlled file names.
|
||||
|
||||
# Print a version string.
|
||||
scriptversion=2009-07-21.16; # UTC
|
||||
scriptversion=2010-02-21.13; # UTC
|
||||
|
||||
# Copyright (C) 2006-2010 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -85,7 +85,7 @@ elif test -d .hg; then
|
|||
eval exec hg locate '"$dir/*"' $postprocess
|
||||
elif test -d .bzr; then
|
||||
test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
|
||||
eval exec bzr ls --versioned '"$dir"' $postprocess
|
||||
eval exec bzr ls -R --versioned '"$dir"' $postprocess
|
||||
elif test -d CVS; then
|
||||
test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
|
||||
if test -x build-aux/cvsu; then
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* _GL_WARN_ON_USE(function, "literal string") issues a declaration
|
||||
/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
|
||||
for FUNCTION which will then trigger a compiler warning containing
|
||||
the text of "literal string" anywhere that function is called, if
|
||||
supported by the compiler. If the compiler does not support this
|
||||
|
@ -73,3 +73,20 @@ extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
|
|||
extern int _gl_warn_on_use
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
|
||||
is like _GL_WARN_ON_USE (function, "string"), except that the function is
|
||||
declared with the given prototype, consisting of return type, parameters,
|
||||
and attributes.
|
||||
This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
|
||||
not work in this case. */
|
||||
#ifndef _GL_WARN_ON_USE_CXX
|
||||
# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
|
||||
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
|
||||
extern rettype function parameters_and_attributes \
|
||||
__attribute__ ((__warning__ (msg)))
|
||||
# else /* Unsupported. */
|
||||
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
|
||||
extern int _gl_warn_on_use
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -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 getaddrinfo gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
||||
# 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 func gendocs getaddrinfo gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
|
||||
|
||||
|
@ -141,6 +141,30 @@ EXTRA_DIST += byteswap.in.h
|
|||
|
||||
## end gnulib module byteswap
|
||||
|
||||
## begin gnulib module c++defs
|
||||
|
||||
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
|
||||
# statements but through direct file reference. Therefore this snippet must be
|
||||
# present in all Makefile.am that need it. This is ensured by the applicability
|
||||
# 'all' defined above.
|
||||
|
||||
BUILT_SOURCES += c++defs.h
|
||||
# The c++defs.h that gets inserted into generated .h files is the same as
|
||||
# build-aux/c++defs.h, except that it has the copyright header cut off.
|
||||
c++defs.h: $(top_srcdir)/build-aux/c++defs.h
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
sed -n -e '/_GL_CXXDEFS/,$$p' \
|
||||
< $(top_srcdir)/build-aux/c++defs.h \
|
||||
> $@-t && \
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += c++defs.h c++defs.h-t
|
||||
|
||||
CXXDEFS_H=c++defs.h
|
||||
|
||||
EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
|
||||
|
||||
## end gnulib module c++defs
|
||||
|
||||
## begin gnulib module c-ctype
|
||||
|
||||
libgnu_la_SOURCES += c-ctype.h c-ctype.c
|
||||
|
@ -374,13 +398,13 @@ EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
|
|||
|
||||
## end gnulib module havelib
|
||||
|
||||
## begin gnulib module iconv_open
|
||||
## begin gnulib module iconv-h
|
||||
|
||||
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 $(ARG_NONNULL_H)
|
||||
iconv.h: iconv.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -390,12 +414,20 @@ iconv.h: iconv.in.h $(ARG_NONNULL_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 '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/iconv.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += iconv.h iconv.h-t
|
||||
|
||||
EXTRA_DIST += iconv.in.h
|
||||
|
||||
## end gnulib module iconv-h
|
||||
|
||||
## begin gnulib module iconv_open
|
||||
|
||||
iconv_open-aix.h: iconv_open-aix.gperf
|
||||
$(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > $(srcdir)/iconv_open-aix.h-t
|
||||
mv $(srcdir)/iconv_open-aix.h-t $(srcdir)/iconv_open-aix.h
|
||||
|
@ -416,7 +448,7 @@ MOSTLYCLEANFILES += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h
|
|||
MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
|
||||
EXTRA_DIST += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
|
||||
|
||||
EXTRA_DIST += iconv.in.h iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c
|
||||
EXTRA_DIST += iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c
|
||||
|
||||
EXTRA_libgnu_la_SOURCES += iconv_open.c
|
||||
|
||||
|
@ -539,15 +571,17 @@ 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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
|
||||
-e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
|
||||
-e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
|
||||
-e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
|
||||
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/locale.in.h; \
|
||||
|
@ -857,7 +891,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -943,6 +977,7 @@ stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
|
||||
-e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
|
||||
-e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
|
||||
} > $@-t && \
|
||||
|
@ -961,7 +996,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -1017,6 +1052,7 @@ stdlib.h: stdlib.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
|
||||
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
|
||||
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/stdlib.in.h; \
|
||||
|
@ -1070,7 +1106,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -1138,6 +1174,7 @@ string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
|
||||
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
|
||||
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
|
||||
< $(srcdir)/string.in.h; \
|
||||
|
@ -1207,7 +1244,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
sys/socket.h: sys_socket.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
$(AM_V_at)$(MKDIR_P) sys
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
|
@ -1236,6 +1273,7 @@ sys/socket.h: sys_socket.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
|
||||
-e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
|
||||
-e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/sys_socket.in.h; \
|
||||
|
@ -1254,7 +1292,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_at)$(MKDIR_P) sys
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
|
@ -1293,6 +1331,7 @@ sys/stat.h: sys_stat.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
|
||||
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
|
||||
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/sys_stat.in.h; \
|
||||
|
@ -1311,20 +1350,27 @@ 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 $(ARG_NONNULL_H)
|
||||
time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
|
||||
-e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
|
||||
-e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
|
||||
-e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
|
||||
-e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
|
||||
-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 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
|
||||
-e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
|
||||
-e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
|
||||
-e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
|
||||
-e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
|
||||
-e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
|
||||
-e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
|
||||
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
|
||||
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
|
||||
-e 's|@''REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
|
||||
-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 '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/time.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
@ -1349,7 +1395,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
|
||||
|
@ -1450,6 +1496,7 @@ unistd.h: unistd.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
|
||||
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
|
||||
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
|
||||
} > $@-t && \
|
||||
|
@ -1604,7 +1651,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 $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
||||
wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
|
@ -1646,6 +1693,7 @@ wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
|
|||
-e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
|
||||
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
|
||||
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/wchar.in.h; \
|
||||
|
|
|
@ -28,20 +28,29 @@
|
|||
#ifndef _GL_ICONV_H
|
||||
#define _GL_ICONV_H
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
|
||||
#if @REPLACE_ICONV_OPEN@
|
||||
/* 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)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define iconv_open rpl_iconv_open
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (iconv_open, iconv_t,
|
||||
(const char *tocode, const char *fromcode)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (iconv_open, iconv_t,
|
||||
(const char *tocode, const char *fromcode));
|
||||
#else
|
||||
_GL_CXXALIAS_SYS (iconv_open, iconv_t,
|
||||
(const char *tocode, const char *fromcode));
|
||||
#endif
|
||||
_GL_CXXALIASWARN (iconv_open);
|
||||
|
||||
#if @REPLACE_ICONV_UTF@
|
||||
/* Special constants for supporting UTF-{16,32}{BE,LE} encodings.
|
||||
|
@ -57,18 +66,36 @@ extern iconv_t iconv_open (const char *tocode, const char *fromcode)
|
|||
#endif
|
||||
|
||||
#if @REPLACE_ICONV@
|
||||
# define iconv rpl_iconv
|
||||
extern size_t iconv (iconv_t cd,
|
||||
@ICONV_CONST@ char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
# define iconv_close rpl_iconv_close
|
||||
extern int iconv_close (iconv_t cd);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define iconv rpl_iconv
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (iconv, size_t,
|
||||
(iconv_t cd,
|
||||
@ICONV_CONST@ char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft));
|
||||
_GL_CXXALIAS_RPL (iconv, size_t,
|
||||
(iconv_t cd,
|
||||
@ICONV_CONST@ char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft));
|
||||
#else
|
||||
_GL_CXXALIAS_SYS (iconv, size_t,
|
||||
(iconv_t cd,
|
||||
@ICONV_CONST@ char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft));
|
||||
#endif
|
||||
_GL_CXXALIASWARN (iconv);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#if @REPLACE_ICONV@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define iconv_close rpl_iconv_close
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (iconv_close, int, (iconv_t cd));
|
||||
_GL_CXXALIAS_RPL (iconv_close, int, (iconv_t cd));
|
||||
#else
|
||||
_GL_CXXALIAS_SYS (iconv_close, int, (iconv_t cd));
|
||||
#endif
|
||||
_GL_CXXALIASWARN (iconv_close);
|
||||
|
||||
|
||||
#endif /* _GL_ICONV_H */
|
||||
#endif /* _GL_ICONV_H */
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
# include <xlocale.h>
|
||||
#endif
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
@ -46,10 +48,18 @@
|
|||
|
||||
#if @GNULIB_DUPLOCALE@
|
||||
# if @REPLACE_DUPLOCALE@
|
||||
# undef duplocale
|
||||
# define duplocale rpl_duplocale
|
||||
extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef duplocale
|
||||
# define duplocale rpl_duplocale
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
|
||||
# else
|
||||
# if @HAVE_DUPLOCALE@
|
||||
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
|
||||
# endif
|
||||
# endif
|
||||
_GL_CXXALIASWARN (duplocale);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef duplocale
|
||||
# if HAVE_RAW_DECL_DUPLOCALE
|
||||
|
|
763
lib/stdio.in.h
763
lib/stdio.in.h
File diff suppressed because it is too large
Load diff
319
lib/stdlib.in.h
319
lib/stdlib.in.h
|
@ -74,6 +74,8 @@ struct random_data
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
@ -93,16 +95,14 @@ struct random_data
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if @GNULIB_ATOLL@
|
||||
# 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) _GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_ATOLL@
|
||||
_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
|
||||
_GL_CXXALIASWARN (atoll);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef atoll
|
||||
# if HAVE_RAW_DECL_ATOLL
|
||||
|
@ -113,10 +113,16 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - "
|
|||
|
||||
#if @GNULIB_CALLOC_POSIX@
|
||||
# if !@HAVE_CALLOC_POSIX@
|
||||
# undef calloc
|
||||
# define calloc rpl_calloc
|
||||
extern void * calloc (size_t nmemb, size_t size);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef calloc
|
||||
# define calloc rpl_calloc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
|
||||
_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (calloc);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef calloc
|
||||
/* Assume calloc is always declared. */
|
||||
|
@ -126,11 +132,20 @@ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
|
|||
|
||||
#if @GNULIB_CANONICALIZE_FILE_NAME@
|
||||
# if @REPLACE_CANONICALIZE_FILE_NAME@
|
||||
# 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) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define canonicalize_file_name rpl_canonicalize_file_name
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
|
||||
# else
|
||||
# if !@HAVE_CANONICALIZE_FILE_NAME@
|
||||
_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (canonicalize_file_name);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef canonicalize_file_name
|
||||
# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
|
||||
|
@ -140,13 +155,16 @@ _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable -
|
|||
#endif
|
||||
|
||||
#if @GNULIB_GETLOADAVG@
|
||||
# if !@HAVE_DECL_GETLOADAVG@
|
||||
/* Store max(NELEM,3) load average numbers in LOADAVG[].
|
||||
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) _GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_DECL_GETLOADAVG@
|
||||
_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
|
||||
_GL_CXXALIASWARN (getloadavg);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getloadavg
|
||||
# if HAVE_RAW_DECL_GETLOADAVG
|
||||
|
@ -168,9 +186,13 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
|
|||
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)
|
||||
_GL_ARG_NONNULL ((1, 2, 3));
|
||||
_GL_FUNCDECL_SYS (getsubopt, int,
|
||||
(char **optionp, char *const *tokens, char **valuep)
|
||||
_GL_ARG_NONNULL ((1, 2, 3)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (getsubopt, int,
|
||||
(char **optionp, char *const *tokens, char **valuep));
|
||||
_GL_CXXALIASWARN (getsubopt);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getsubopt
|
||||
# if HAVE_RAW_DECL_GETSUBOPT
|
||||
|
@ -181,10 +203,16 @@ _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
|
|||
|
||||
#if @GNULIB_MALLOC_POSIX@
|
||||
# if !@HAVE_MALLOC_POSIX@
|
||||
# undef malloc
|
||||
# define malloc rpl_malloc
|
||||
extern void * malloc (size_t size);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef malloc
|
||||
# define malloc rpl_malloc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (malloc, void *, (size_t size));
|
||||
_GL_CXXALIAS_RPL (malloc, void *, (size_t size));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (malloc);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef malloc
|
||||
/* Assume malloc is always declared. */
|
||||
|
@ -193,14 +221,16 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_MKDTEMP@
|
||||
# if !@HAVE_MKDTEMP@
|
||||
/* Create a unique temporary directory from TEMPLATE.
|
||||
The last six characters of TEMPLATE must be "XXXXXX";
|
||||
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*/) _GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_MKDTEMP@
|
||||
_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
|
||||
_GL_CXXALIASWARN (mkdtemp);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkdtemp
|
||||
# if HAVE_RAW_DECL_MKDTEMP
|
||||
|
@ -210,7 +240,6 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_MKOSTEMP@
|
||||
# if !@HAVE_MKOSTEMP@
|
||||
/* Create a unique temporary file from TEMPLATE.
|
||||
The last six characters of TEMPLATE must be "XXXXXX";
|
||||
they are replaced with a string that makes the file name unique.
|
||||
|
@ -223,8 +252,12 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
extern int mkostemp (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_MKOSTEMP@
|
||||
_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
|
||||
_GL_CXXALIASWARN (mkostemp);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkostemp
|
||||
# if HAVE_RAW_DECL_MKOSTEMP
|
||||
|
@ -234,7 +267,6 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_MKOSTEMPS@
|
||||
# if !@HAVE_MKOSTEMPS@
|
||||
/* Create a unique temporary file from TEMPLATE.
|
||||
The last six characters of TEMPLATE before a suffix of length
|
||||
SUFFIXLEN must be "XXXXXX";
|
||||
|
@ -248,9 +280,14 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_MKOSTEMPS@
|
||||
_GL_FUNCDECL_SYS (mkostemps, int,
|
||||
(char * /*template*/, int /*suffixlen*/, int /*flags*/)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkostemps, int,
|
||||
(char * /*template*/, int /*suffixlen*/, int /*flags*/));
|
||||
_GL_CXXALIASWARN (mkostemps);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkostemps
|
||||
# if HAVE_RAW_DECL_MKOSTEMPS
|
||||
|
@ -260,7 +297,6 @@ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_MKSTEMP@
|
||||
# if @REPLACE_MKSTEMP@
|
||||
/* Create a unique temporary file from TEMPLATE.
|
||||
The last six characters of TEMPLATE must be "XXXXXX";
|
||||
they are replaced with a string that makes the file name unique.
|
||||
|
@ -270,9 +306,16 @@ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
# define mkstemp rpl_mkstemp
|
||||
extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1));
|
||||
# if @REPLACE_MKSTEMP@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mkstemp rpl_mkstemp
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mkstemp);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkstemp
|
||||
# if HAVE_RAW_DECL_MKSTEMP
|
||||
|
@ -282,7 +325,6 @@ _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_MKSTEMPS@
|
||||
# if !@HAVE_MKSTEMPS@
|
||||
/* Create a unique temporary file from TEMPLATE.
|
||||
The last six characters of TEMPLATE prior to a suffix of length
|
||||
SUFFIXLEN must be "XXXXXX";
|
||||
|
@ -293,9 +335,12 @@ _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
|
|||
implementation.
|
||||
Returns the open file descriptor if successful, otherwise -1 and errno
|
||||
set. */
|
||||
extern int mkstemps (char * /*template*/, int /*suffixlen*/)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_MKSTEMPS@
|
||||
_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
|
||||
_GL_CXXALIASWARN (mkstemps);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkstemps
|
||||
# if HAVE_RAW_DECL_MKSTEMPS
|
||||
|
@ -306,45 +351,88 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
|
|||
|
||||
#if @GNULIB_PUTENV@
|
||||
# if @REPLACE_PUTENV@
|
||||
# undef putenv
|
||||
# define putenv rpl_putenv
|
||||
extern int putenv (char *string) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef putenv
|
||||
# define putenv rpl_putenv
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (putenv, int, (char *string));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (putenv, int, (char *string));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (putenv);
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_RANDOM_R@
|
||||
# if !@HAVE_RANDOM_R@
|
||||
# ifndef RAND_MAX
|
||||
# define RAND_MAX 2147483647
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM_R@
|
||||
# if !@HAVE_RANDOM_R@
|
||||
|
||||
# ifndef RAND_MAX
|
||||
# define RAND_MAX 2147483647
|
||||
# endif
|
||||
|
||||
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)
|
||||
_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));
|
||||
_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
|
||||
_GL_CXXALIASWARN (random_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef random_r
|
||||
# if HAVE_RAW_DECL_RANDOM_R
|
||||
_GL_WARN_ON_USE (random_r, "random_r is unportable - "
|
||||
"use gnulib module random_r for portability");
|
||||
# endif
|
||||
# undef initstate_r
|
||||
# if HAVE_RAW_DECL_INITSTATE_R
|
||||
_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
|
||||
"use gnulib module random_r for portability");
|
||||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM_R@
|
||||
# if !@HAVE_RANDOM_R@
|
||||
_GL_FUNCDECL_SYS (srandom_r, int,
|
||||
(unsigned int seed, struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (srandom_r, int,
|
||||
(unsigned int seed, struct random_data *rand_state));
|
||||
_GL_CXXALIASWARN (srandom_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef srandom_r
|
||||
# if HAVE_RAW_DECL_SRANDOM_R
|
||||
_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
|
||||
"use gnulib module random_r for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM_R@
|
||||
# if !@HAVE_RANDOM_R@
|
||||
_GL_FUNCDECL_SYS (initstate_r, int,
|
||||
(unsigned int seed, char *buf, size_t buf_size,
|
||||
struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((2, 4)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (initstate_r, int,
|
||||
(unsigned int seed, char *buf, size_t buf_size,
|
||||
struct random_data *rand_state));
|
||||
_GL_CXXALIASWARN (initstate_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef initstate_r
|
||||
# if HAVE_RAW_DECL_INITSTATE_R
|
||||
_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
|
||||
"use gnulib module random_r for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_RANDOM_R@
|
||||
# if !@HAVE_RANDOM_R@
|
||||
_GL_FUNCDECL_SYS (setstate_r, int,
|
||||
(char *arg_state, struct random_data *rand_state)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (setstate_r, int,
|
||||
(char *arg_state, struct random_data *rand_state));
|
||||
_GL_CXXALIASWARN (setstate_r);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef setstate_r
|
||||
# if HAVE_RAW_DECL_SETSTATE_R
|
||||
_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
|
||||
|
@ -352,12 +440,19 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_REALLOC_POSIX@
|
||||
# if !@HAVE_REALLOC_POSIX@
|
||||
# undef realloc
|
||||
# define realloc rpl_realloc
|
||||
extern void * realloc (void *ptr, size_t size);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef realloc
|
||||
# define realloc rpl_realloc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
|
||||
_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (realloc);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef realloc
|
||||
/* Assume realloc is always declared. */
|
||||
|
@ -367,11 +462,20 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
|
|||
|
||||
#if @GNULIB_REALPATH@
|
||||
# if @REPLACE_REALPATH@
|
||||
# define realpath rpl_realpath
|
||||
# endif
|
||||
# if !@HAVE_REALPATH@ || @REPLACE_REALPATH@
|
||||
extern char *realpath (const char *name, char *resolved) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define realpath rpl_realpath
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
|
||||
# else
|
||||
# if !@HAVE_REALPATH@
|
||||
_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (realpath);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef realpath
|
||||
# if HAVE_RAW_DECL_REALPATH
|
||||
|
@ -381,11 +485,13 @@ _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_RPMATCH@
|
||||
# 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) _GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_RPMATCH@
|
||||
_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
|
||||
_GL_CXXALIASWARN (rpmatch);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef rpmatch
|
||||
# if HAVE_RAW_DECL_RPMATCH
|
||||
|
@ -395,16 +501,28 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_SETENV@
|
||||
# if @REPLACE_SETENV@
|
||||
# undef setenv
|
||||
# define setenv rpl_setenv
|
||||
# endif
|
||||
# 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)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if @REPLACE_SETENV@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef setenv
|
||||
# define setenv rpl_setenv
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (setenv, int,
|
||||
(const char *name, const char *value, int replace)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (setenv, int,
|
||||
(const char *name, const char *value, int replace));
|
||||
# else
|
||||
# if !@HAVE_SETENV@
|
||||
_GL_FUNCDECL_SYS (setenv, int,
|
||||
(const char *name, const char *value, int replace)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (setenv, int,
|
||||
(const char *name, const char *value, int replace));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (setenv);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef setenv
|
||||
# if HAVE_RAW_DECL_SETENV
|
||||
|
@ -414,13 +532,22 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_STRTOD@
|
||||
# if @REPLACE_STRTOD@
|
||||
# define strtod rpl_strtod
|
||||
# endif
|
||||
# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
|
||||
/* Parse a double from STRING, updating ENDP if appropriate. */
|
||||
extern double strtod (const char *str, char **endp) _GL_ARG_NONNULL ((1));
|
||||
# if @REPLACE_STRTOD@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strtod rpl_strtod
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
|
||||
# else
|
||||
# if !@HAVE_STRTOD@
|
||||
_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strtod);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtod
|
||||
# if HAVE_RAW_DECL_STRTOD
|
||||
|
@ -430,7 +557,6 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_STRTOLL@
|
||||
# if !@HAVE_STRTOLL@
|
||||
/* Parse a signed integer whose textual representation starts at STRING.
|
||||
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
|
||||
it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
|
||||
|
@ -439,9 +565,14 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
|
|||
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)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_STRTOLL@
|
||||
_GL_FUNCDECL_SYS (strtoll, long long,
|
||||
(const char *string, char **endptr, int base)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtoll, long long,
|
||||
(const char *string, char **endptr, int base));
|
||||
_GL_CXXALIASWARN (strtoll);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtoll
|
||||
# if HAVE_RAW_DECL_STRTOLL
|
||||
|
@ -451,7 +582,6 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_STRTOULL@
|
||||
# if !@HAVE_STRTOULL@
|
||||
/* Parse an unsigned integer whose textual representation starts at STRING.
|
||||
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
|
||||
it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
|
||||
|
@ -460,9 +590,14 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
|
|||
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)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if !@HAVE_STRTOULL@
|
||||
_GL_FUNCDECL_SYS (strtoull, unsigned long long,
|
||||
(const char *string, char **endptr, int base)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtoull, unsigned long long,
|
||||
(const char *string, char **endptr, int base));
|
||||
_GL_CXXALIASWARN (strtoull);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtoull
|
||||
# if HAVE_RAW_DECL_STRTOULL
|
||||
|
@ -472,14 +607,21 @@ _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
|
|||
#endif
|
||||
|
||||
#if @GNULIB_UNSETENV@
|
||||
# if @REPLACE_UNSETENV@
|
||||
# undef unsetenv
|
||||
# define unsetenv rpl_unsetenv
|
||||
# endif
|
||||
# if !@HAVE_UNSETENV@ || @REPLACE_UNSETENV@
|
||||
/* Remove the variable NAME from the environment. */
|
||||
extern int unsetenv (const char *name) _GL_ARG_NONNULL ((1));
|
||||
# if @REPLACE_UNSETENV@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef unsetenv
|
||||
# define unsetenv rpl_unsetenv
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
|
||||
# else
|
||||
# if !@HAVE_UNSETENV@
|
||||
_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (unsetenv);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef unsetenv
|
||||
# if HAVE_RAW_DECL_UNSETENV
|
||||
|
@ -488,9 +630,6 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GL_STDLIB_H */
|
||||
#endif /* _GL_STDLIB_H */
|
||||
|
|
427
lib/string.in.h
427
lib/string.in.h
|
@ -48,22 +48,38 @@
|
|||
#endif
|
||||
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Return the first instance of C within N bytes of S, or NULL. */
|
||||
#if @GNULIB_MEMCHR@
|
||||
# if @REPLACE_MEMCHR@
|
||||
# define memchr rpl_memchr
|
||||
extern void *memchr (void const *__s, int __c, size_t __n)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define memchr rpl_memchr
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
|
||||
# else
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C" { const void * std::memchr (const void *, int, size_t); }
|
||||
extern "C++" { void * std::memchr (void *, int, size_t); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (memchr,
|
||||
void *, (void const *__s, int __c, size_t __n),
|
||||
void const *, (void const *__s, int __c, size_t __n));
|
||||
# endif
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
|
||||
_GL_CXXALIASWARN1 (memchr, void const *,
|
||||
(void const *__s, int __c, size_t __n));
|
||||
# else
|
||||
_GL_CXXALIASWARN (memchr);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef memchr
|
||||
|
@ -75,13 +91,28 @@ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
|
|||
/* Return the first occurrence of NEEDLE in HAYSTACK. */
|
||||
#if @GNULIB_MEMMEM@
|
||||
# if @REPLACE_MEMMEM@
|
||||
# define memmem rpl_memmem
|
||||
# endif
|
||||
# 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__)) _GL_ARG_NONNULL ((1, 3));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define memmem rpl_memmem
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (memmem, void *,
|
||||
(void const *__haystack, size_t __haystack_len,
|
||||
void const *__needle, size_t __needle_len)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)));
|
||||
_GL_CXXALIAS_RPL (memmem, void *,
|
||||
(void const *__haystack, size_t __haystack_len,
|
||||
void const *__needle, size_t __needle_len));
|
||||
# else
|
||||
# if ! @HAVE_DECL_MEMMEM@
|
||||
_GL_FUNCDECL_SYS (memmem, void *,
|
||||
(void const *__haystack, size_t __haystack_len,
|
||||
void const *__needle, size_t __needle_len)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (memmem, void *,
|
||||
(void const *__haystack, size_t __haystack_len,
|
||||
void const *__needle, size_t __needle_len));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (memmem);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef memmem
|
||||
# if HAVE_RAW_DECL_MEMMEM
|
||||
|
@ -95,10 +126,15 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
|
|||
last written byte. */
|
||||
#if @GNULIB_MEMPCPY@
|
||||
# if ! @HAVE_MEMPCPY@
|
||||
extern void *mempcpy (void *restrict __dest, void const *restrict __src,
|
||||
size_t __n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
_GL_FUNCDECL_SYS (mempcpy, void *,
|
||||
(void *restrict __dest, void const *restrict __src,
|
||||
size_t __n)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mempcpy, void *,
|
||||
(void *restrict __dest, void const *restrict __src,
|
||||
size_t __n));
|
||||
_GL_CXXALIASWARN (mempcpy);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mempcpy
|
||||
# if HAVE_RAW_DECL_MEMPCPY
|
||||
|
@ -110,8 +146,22 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
|
|||
/* Search backwards through a block for a byte (specified as an int). */
|
||||
#if @GNULIB_MEMRCHR@
|
||||
# if ! @HAVE_DECL_MEMRCHR@
|
||||
extern void *memrchr (void const *, int, size_t)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C++" { const void * std::memrchr (const void *, int, size_t); }
|
||||
extern "C++" { void * std::memrchr (void *, int, size_t); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (memrchr,
|
||||
void *, (void const *, int, size_t),
|
||||
void const *, (void const *, int, size_t));
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
|
||||
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
|
||||
# else
|
||||
_GL_CXXALIASWARN (memrchr);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef memrchr
|
||||
|
@ -126,8 +176,22 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
|
|||
occur within N bytes. */
|
||||
#if @GNULIB_RAWMEMCHR@
|
||||
# if ! @HAVE_RAWMEMCHR@
|
||||
extern void *rawmemchr (void const *__s, int __c_in)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C++" { const void * std::rawmemchr (const void *, int); }
|
||||
extern "C++" { void * std::rawmemchr (void *, int); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (rawmemchr,
|
||||
void *, (void const *__s, int __c_in),
|
||||
void const *, (void const *__s, int __c_in));
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
|
||||
_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
|
||||
# else
|
||||
_GL_CXXALIASWARN (rawmemchr);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef rawmemchr
|
||||
|
@ -140,9 +204,13 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
|
|||
/* 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)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
_GL_FUNCDECL_SYS (stpcpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (stpcpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src));
|
||||
_GL_CXXALIASWARN (stpcpy);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stpcpy
|
||||
# if HAVE_RAW_DECL_STPCPY
|
||||
|
@ -155,11 +223,22 @@ _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
|
|||
last non-NUL byte written into DST. */
|
||||
#if @GNULIB_STPNCPY@
|
||||
# if ! @HAVE_STPNCPY@
|
||||
# define stpncpy gnu_stpncpy
|
||||
extern char *stpncpy (char *restrict __dst, char const *restrict __src,
|
||||
size_t __n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define stpncpy rpl_stpncpy
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (stpncpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src,
|
||||
size_t __n)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (stpncpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src,
|
||||
size_t __n));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (stpncpy, char *,
|
||||
(char *restrict __dst, char const *restrict __src,
|
||||
size_t __n));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (stpncpy);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stpncpy
|
||||
# if HAVE_RAW_DECL_STPNCPY
|
||||
|
@ -181,8 +260,22 @@ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
|
|||
/* Find the first occurrence of C in S or the final NUL byte. */
|
||||
#if @GNULIB_STRCHRNUL@
|
||||
# if ! @HAVE_STRCHRNUL@
|
||||
extern char *strchrnul (char const *__s, int __c_in)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C++" { const char * std::strchrnul (const char *, int); }
|
||||
extern "C++" { char * std::strchrnul (char *, int); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (strchrnul,
|
||||
char *, (char const *__s, int __c_in),
|
||||
char const *, (char const *__s, int __c_in));
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
|
||||
_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
|
||||
# else
|
||||
_GL_CXXALIASWARN (strchrnul);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strchrnul
|
||||
|
@ -195,12 +288,19 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
|
|||
/* Duplicate S, returning an identical malloc'd string. */
|
||||
#if @GNULIB_STRDUP@
|
||||
# if @REPLACE_STRDUP@
|
||||
# undef strdup
|
||||
# define strdup rpl_strdup
|
||||
# endif
|
||||
# if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
|
||||
extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef strdup
|
||||
# define strdup rpl_strdup
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
|
||||
# else
|
||||
# if !(@HAVE_DECL_STRDUP@ || defined strdup)
|
||||
_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strdup);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strdup
|
||||
# if HAVE_RAW_DECL_STRDUP
|
||||
|
@ -212,12 +312,21 @@ _GL_WARN_ON_USE (strdup, "strdup is unportable - "
|
|||
/* Return a newly allocated copy of at most N bytes of STRING. */
|
||||
#if @GNULIB_STRNDUP@
|
||||
# if @REPLACE_STRNDUP@
|
||||
# undef strndup
|
||||
# define strndup rpl_strndup
|
||||
# endif
|
||||
# if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
|
||||
extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef strndup
|
||||
# define strndup rpl_strndup
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
|
||||
# else
|
||||
# if ! @HAVE_DECL_STRNDUP@
|
||||
_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strndup);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strndup
|
||||
# if HAVE_RAW_DECL_STRNDUP
|
||||
|
@ -231,9 +340,12 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
|
|||
return MAXLEN. */
|
||||
#if @GNULIB_STRNLEN@
|
||||
# if ! @HAVE_DECL_STRNLEN@
|
||||
extern size_t strnlen (char const *__string, size_t __maxlen)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
|
||||
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
|
||||
_GL_CXXALIASWARN (strnlen);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strnlen
|
||||
# if HAVE_RAW_DECL_STRNLEN
|
||||
|
@ -257,8 +369,23 @@ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
|
|||
/* Find the first occurrence in S of any character in ACCEPT. */
|
||||
#if @GNULIB_STRPBRK@
|
||||
# if ! @HAVE_STRPBRK@
|
||||
extern char *strpbrk (char const *__s, char const *__accept)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
|
||||
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C" { const char * strpbrk (const char *, const char *); }
|
||||
extern "C++" { char * strpbrk (char *, const char *); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (strpbrk,
|
||||
char *, (char const *__s, char const *__accept),
|
||||
const char *, (char const *__s, char const *__accept));
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
|
||||
_GL_CXXALIASWARN1 (strpbrk, char const *,
|
||||
(char const *__s, char const *__accept));
|
||||
# else
|
||||
_GL_CXXALIASWARN (strpbrk);
|
||||
# endif
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
/* strpbrk() assumes the second argument is a list of single-byte characters.
|
||||
|
@ -316,9 +443,13 @@ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
|
|||
See also strtok_r(). */
|
||||
#if @GNULIB_STRSEP@
|
||||
# if ! @HAVE_STRSEP@
|
||||
extern char *strsep (char **restrict __stringp, char const *restrict __delim)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
_GL_FUNCDECL_SYS (strsep, char *,
|
||||
(char **restrict __stringp, char const *restrict __delim)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strsep, char *,
|
||||
(char **restrict __stringp, char const *restrict __delim));
|
||||
_GL_CXXALIASWARN (strsep);
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
# undef strsep
|
||||
_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
|
||||
|
@ -335,9 +466,28 @@ _GL_WARN_ON_USE (strsep, "strsep is unportable - "
|
|||
|
||||
#if @GNULIB_STRSTR@
|
||||
# if @REPLACE_STRSTR@
|
||||
# define strstr rpl_strstr
|
||||
extern char *strstr (const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strstr rpl_strstr
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__))
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
|
||||
# else
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C++" { const char * strstr (const char *, const char *); }
|
||||
extern "C++" { char * strstr (char *, const char *); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (strstr,
|
||||
char *, (const char *haystack, const char *needle),
|
||||
const char *, (const char *haystack, const char *needle));
|
||||
# endif
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
|
||||
_GL_CXXALIASWARN1 (strstr, const char *,
|
||||
(const char *haystack, const char *needle));
|
||||
# else
|
||||
_GL_CXXALIASWARN (strstr);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
/* strstr() does not work with multibyte strings if the locale encoding is
|
||||
|
@ -357,11 +507,34 @@ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
|
|||
comparison. */
|
||||
#if @GNULIB_STRCASESTR@
|
||||
# if @REPLACE_STRCASESTR@
|
||||
# define strcasestr rpl_strcasestr
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strcasestr rpl_strcasestr
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strcasestr, char *,
|
||||
(const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (strcasestr, char *,
|
||||
(const char *haystack, const char *needle));
|
||||
# else
|
||||
# if ! @HAVE_STRCASESTR@
|
||||
_GL_FUNCDECL_SYS (strcasestr, char *,
|
||||
(const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
/* On some systems, this function is defined as an overloaded function:
|
||||
extern "C++" { const char * strcasestr (const char *, const char *); }
|
||||
extern "C++" { char * strcasestr (char *, const char *); } */
|
||||
_GL_CXXALIAS_SYS_CAST2 (strcasestr,
|
||||
char *, (const char *haystack, const char *needle),
|
||||
const char *, (const char *haystack, const char *needle));
|
||||
# endif
|
||||
# if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@
|
||||
extern char *strcasestr (const char *haystack, const char *needle)
|
||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
|
||||
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
|
||||
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
|
||||
_GL_CXXALIASWARN1 (strcasestr, const char *,
|
||||
(const char *haystack, const char *needle));
|
||||
# else
|
||||
_GL_CXXALIASWARN (strcasestr);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
/* strcasestr() does not work with multibyte strings:
|
||||
|
@ -401,16 +574,32 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
|
|||
See also strsep(). */
|
||||
#if @GNULIB_STRTOK_R@
|
||||
# if @REPLACE_STRTOK_R@
|
||||
# undef strtok_r
|
||||
# define strtok_r rpl_strtok_r
|
||||
# elif @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
|
||||
# undef strtok_r
|
||||
# endif
|
||||
# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
|
||||
extern char *strtok_r (char *restrict s, char const *restrict delim,
|
||||
char **restrict save_ptr)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef strtok_r
|
||||
# define strtok_r rpl_strtok_r
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strtok_r, char *,
|
||||
(char *restrict s, char const *restrict delim,
|
||||
char **restrict save_ptr)
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
_GL_CXXALIAS_RPL (strtok_r, char *,
|
||||
(char *restrict s, char const *restrict delim,
|
||||
char **restrict save_ptr));
|
||||
# else
|
||||
# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
|
||||
# undef strtok_r
|
||||
# endif
|
||||
# if ! @HAVE_DECL_STRTOK_R@
|
||||
_GL_FUNCDECL_SYS (strtok_r, char *,
|
||||
(char *restrict s, char const *restrict delim,
|
||||
char **restrict save_ptr)
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtok_r, char *,
|
||||
(char *restrict s, char const *restrict delim,
|
||||
char **restrict save_ptr));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strtok_r);
|
||||
# if defined GNULIB_POSIXCHECK
|
||||
_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
|
||||
"strings in multibyte locales - "
|
||||
|
@ -435,15 +624,23 @@ _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
|
|||
# undef mbslen
|
||||
# endif
|
||||
# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */
|
||||
# define mbslen rpl_mbslen
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mbslen rpl_mbslen
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
|
||||
# else
|
||||
_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
|
||||
# endif
|
||||
extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1));
|
||||
_GL_CXXALIASWARN (mbslen);
|
||||
#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) _GL_ARG_NONNULL ((1));
|
||||
_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSCHR@
|
||||
|
@ -451,8 +648,19 @@ extern size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1));
|
|||
and return a pointer to it. Return NULL if C is not found in STRING.
|
||||
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) _GL_ARG_NONNULL ((1));
|
||||
# if defined __hpux
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
|
||||
# else
|
||||
_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbschr);
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSRCHR@
|
||||
|
@ -460,8 +668,19 @@ extern char * mbschr (const char *string, int c) _GL_ARG_NONNULL ((1));
|
|||
and return a pointer to it. Return NULL if C is not found in STRING.
|
||||
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) _GL_ARG_NONNULL ((1));
|
||||
# if defined __hpux
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
|
||||
# else
|
||||
_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbsrchr);
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSSTR@
|
||||
|
@ -469,7 +688,7 @@ extern char * mbsrchr (const char *string, int c) _GL_ARG_NONNULL ((1));
|
|||
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)
|
||||
_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -480,7 +699,7 @@ 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)
|
||||
_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -494,7 +713,7 @@ 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)
|
||||
_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -508,7 +727,7 @@ 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)
|
||||
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -518,7 +737,7 @@ 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)
|
||||
_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -528,7 +747,7 @@ 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)
|
||||
_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -537,9 +756,19 @@ extern size_t mbscspn (const char *string, const char *accept)
|
|||
in the character string ACCEPT. Return the pointer to it, or NULL if none
|
||||
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)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# if defined __hpux
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
|
||||
# else
|
||||
_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbspbrk);
|
||||
#endif
|
||||
|
||||
#if @GNULIB_MBSSPN@
|
||||
|
@ -548,7 +777,7 @@ 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)
|
||||
_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -567,7 +796,7 @@ 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)
|
||||
_GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
#endif
|
||||
|
||||
|
@ -588,17 +817,23 @@ 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)
|
||||
_GL_EXTERN_C 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. */
|
||||
#if @GNULIB_STRERROR@
|
||||
# if @REPLACE_STRERROR@
|
||||
# undef strerror
|
||||
# define strerror rpl_strerror
|
||||
extern char *strerror (int);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef strerror
|
||||
# define strerror rpl_strerror
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strerror, char *, (int));
|
||||
_GL_CXXALIAS_RPL (strerror, char *, (int));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (strerror, char *, (int));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strerror);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strerror
|
||||
/* Assume strerror is always declared. */
|
||||
|
@ -608,11 +843,20 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - "
|
|||
|
||||
#if @GNULIB_STRSIGNAL@
|
||||
# if @REPLACE_STRSIGNAL@
|
||||
# define strsignal rpl_strsignal
|
||||
# endif
|
||||
# if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@
|
||||
extern char *strsignal (int __sig);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strsignal rpl_strsignal
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
|
||||
_GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
|
||||
# else
|
||||
# if ! @HAVE_DECL_STRSIGNAL@
|
||||
_GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
|
||||
# endif
|
||||
/* Need to cast, because on Cygwin 1.5.x systems, the return type is
|
||||
'const char *'. */
|
||||
_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strsignal);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strsignal
|
||||
# if HAVE_RAW_DECL_STRSIGNAL
|
||||
|
@ -623,8 +867,11 @@ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
|
|||
|
||||
#if @GNULIB_STRVERSCMP@
|
||||
# if !@HAVE_STRVERSCMP@
|
||||
extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2));
|
||||
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
|
||||
_GL_CXXALIASWARN (strverscmp);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strverscmp
|
||||
# if HAVE_RAW_DECL_STRVERSCMP
|
||||
|
@ -634,9 +881,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GL_STRING_H */
|
||||
#endif /* _GL_STRING_H */
|
||||
|
|
|
@ -23,10 +23,24 @@
|
|||
It is intended to provide definitions and prototypes needed by an
|
||||
application. */
|
||||
|
||||
#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H
|
||||
/* Special invocation convention:
|
||||
- On Cygwin 1.5.x we have a sequence of nested includes
|
||||
<sys/socket.h> -> <cygwin/socket.h> -> <asm/socket.h> -> <cygwin/if.h>,
|
||||
and the latter includes <sys/socket.h>. In this situation, the functions
|
||||
are not yet declared, therefore we cannot provide the C++ aliases. */
|
||||
|
||||
#@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
|
||||
|
||||
#else
|
||||
/* Normal invocation convention. */
|
||||
|
||||
#ifndef _GL_SYS_SOCKET_H
|
||||
|
||||
#if @HAVE_SYS_SOCKET_H@
|
||||
|
||||
# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H
|
||||
|
||||
# if __GNUC__ >= 3
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
# endif
|
||||
|
@ -38,13 +52,19 @@
|
|||
/* The include_next requires a split double-inclusion guard. */
|
||||
# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
|
||||
|
||||
# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _GL_SYS_SOCKET_H
|
||||
#define _GL_SYS_SOCKET_H
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
#if !@HAVE_SA_FAMILY_T@
|
||||
typedef unsigned short sa_family_t;
|
||||
#endif
|
||||
|
@ -126,8 +146,6 @@ struct sockaddr_storage
|
|||
# define SHUT_RDWR SD_BOTH
|
||||
# endif
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
/* Include headers needed by the emulation code. */
|
||||
# include <sys/types.h>
|
||||
|
@ -137,11 +155,9 @@ typedef int socklen_t;
|
|||
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @HAVE_WINSOCK2_H@
|
||||
|
||||
/* Re-define FD_ISSET to avoid a WSA call while we are not using
|
||||
network sockets. */
|
||||
|
@ -159,280 +175,404 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
|
|||
return 0;
|
||||
}
|
||||
|
||||
# undef FD_ISSET
|
||||
# define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
|
||||
# undef FD_ISSET
|
||||
# define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Wrap everything else to use libc file descriptors for sockets. */
|
||||
|
||||
# if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
|
||||
# undef close
|
||||
# define close close_used_without_including_unistd_h
|
||||
# endif
|
||||
#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
|
||||
# undef close
|
||||
# define close close_used_without_including_unistd_h
|
||||
#endif
|
||||
|
||||
# if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
|
||||
# undef gethostname
|
||||
# define gethostname gethostname_used_without_including_unistd_h
|
||||
# endif
|
||||
#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
|
||||
# undef gethostname
|
||||
# define gethostname gethostname_used_without_including_unistd_h
|
||||
#endif
|
||||
|
||||
# if @GNULIB_SOCKET@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_SOCKET@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef socket
|
||||
# define socket rpl_socket
|
||||
extern int rpl_socket (int, int, int protocol);
|
||||
# define socket rpl_socket
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef socket
|
||||
# define socket socket_used_without_requesting_gnulib_module_socket
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef socket
|
||||
# if HAVE_RAW_DECL_SOCKET
|
||||
_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol));
|
||||
_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (socket);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef socket
|
||||
# define socket socket_used_without_requesting_gnulib_module_socket
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef socket
|
||||
# if HAVE_RAW_DECL_SOCKET
|
||||
_GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - "
|
||||
"use gnulib module socket for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_CONNECT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_CONNECT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef connect
|
||||
# define connect rpl_connect
|
||||
extern int rpl_connect (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
|
||||
# define connect rpl_connect
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef connect
|
||||
# define connect socket_used_without_requesting_gnulib_module_connect
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef connect
|
||||
# if HAVE_RAW_DECL_CONNECT
|
||||
_GL_FUNCDECL_RPL (connect, int,
|
||||
(int fd, const struct sockaddr *addr, socklen_t addrlen)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (connect, int,
|
||||
(int fd, const struct sockaddr *addr, socklen_t addrlen));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (connect, int,
|
||||
(int fd, const struct sockaddr *addr, socklen_t addrlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (connect);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef connect
|
||||
# define connect socket_used_without_requesting_gnulib_module_connect
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef connect
|
||||
# if HAVE_RAW_DECL_CONNECT
|
||||
_GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
|
||||
"use gnulib module connect for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_ACCEPT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_ACCEPT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef accept
|
||||
# define accept rpl_accept
|
||||
extern int rpl_accept (int, struct sockaddr *, int *);
|
||||
# define accept rpl_accept
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef accept
|
||||
# define accept accept_used_without_requesting_gnulib_module_accept
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef accept
|
||||
_GL_FUNCDECL_RPL (accept, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
_GL_CXXALIAS_RPL (accept, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
# else
|
||||
/* Need to cast, because on Solaris 10 systems, the third parameter is
|
||||
void *addrlen. */
|
||||
_GL_CXXALIAS_SYS_CAST (accept, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (accept);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef accept
|
||||
# define accept accept_used_without_requesting_gnulib_module_accept
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef accept
|
||||
# if HAVE_RAW_DECL_ACCEPT
|
||||
_GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - "
|
||||
"use gnulib module accept for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_BIND@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_BIND@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef bind
|
||||
# define bind rpl_bind
|
||||
extern int rpl_bind (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
|
||||
# define bind rpl_bind
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef bind
|
||||
# define bind bind_used_without_requesting_gnulib_module_bind
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef bind
|
||||
# if HAVE_RAW_DECL_BIND
|
||||
_GL_FUNCDECL_RPL (bind, int,
|
||||
(int fd, const struct sockaddr *addr, socklen_t addrlen)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (bind, int,
|
||||
(int fd, const struct sockaddr *addr, socklen_t addrlen));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (bind, int,
|
||||
(int fd, const struct sockaddr *addr, socklen_t addrlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (bind);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef bind
|
||||
# define bind bind_used_without_requesting_gnulib_module_bind
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef bind
|
||||
# if HAVE_RAW_DECL_BIND
|
||||
_GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
|
||||
"use gnulib module bind for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_GETPEERNAME@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_GETPEERNAME@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef getpeername
|
||||
# define getpeername rpl_getpeername
|
||||
extern int rpl_getpeername (int, struct sockaddr *, int *)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# define getpeername rpl_getpeername
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef getpeername
|
||||
# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef getpeername
|
||||
# if HAVE_RAW_DECL_GETPEERNAME
|
||||
_GL_FUNCDECL_RPL (getpeername, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen)
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
_GL_CXXALIAS_RPL (getpeername, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
# else
|
||||
/* Need to cast, because on Solaris 10 systems, the third parameter is
|
||||
void *addrlen. */
|
||||
_GL_CXXALIAS_SYS_CAST (getpeername, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (getpeername);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef getpeername
|
||||
# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getpeername
|
||||
# if HAVE_RAW_DECL_GETPEERNAME
|
||||
_GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
|
||||
"use gnulib module getpeername for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_GETSOCKNAME@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_GETSOCKNAME@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef getsockname
|
||||
# define getsockname rpl_getsockname
|
||||
extern int rpl_getsockname (int, struct sockaddr *, int *)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# define getsockname rpl_getsockname
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef getsockname
|
||||
# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef getsockname
|
||||
# if HAVE_RAW_DECL_GETSOCKNAME
|
||||
_GL_FUNCDECL_RPL (getsockname, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen)
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
_GL_CXXALIAS_RPL (getsockname, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
# else
|
||||
/* Need to cast, because on Solaris 10 systems, the third parameter is
|
||||
void *addrlen. */
|
||||
_GL_CXXALIAS_SYS_CAST (getsockname, int,
|
||||
(int fd, struct sockaddr *addr, socklen_t *addrlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (getsockname);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef getsockname
|
||||
# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getsockname
|
||||
# if HAVE_RAW_DECL_GETSOCKNAME
|
||||
_GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
|
||||
"use gnulib module getsockname for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_GETSOCKOPT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_GETSOCKOPT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef getsockopt
|
||||
# define getsockopt rpl_getsockopt
|
||||
extern int rpl_getsockopt (int, int, int, void *, socklen_t *)
|
||||
_GL_ARG_NONNULL ((4, 5));
|
||||
# define getsockopt rpl_getsockopt
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef getsockopt
|
||||
# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef getsockopt
|
||||
# if HAVE_RAW_DECL_GETSOCKOPT
|
||||
_GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname,
|
||||
void *optval, socklen_t *optlen)
|
||||
_GL_ARG_NONNULL ((4, 5)));
|
||||
_GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname,
|
||||
void *optval, socklen_t *optlen));
|
||||
# else
|
||||
/* Need to cast, because on Solaris 10 systems, the fifth parameter is
|
||||
void *optlen. */
|
||||
_GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname,
|
||||
void *optval, socklen_t *optlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (getsockopt);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef getsockopt
|
||||
# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef getsockopt
|
||||
# if HAVE_RAW_DECL_GETSOCKOPT
|
||||
_GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - "
|
||||
"use gnulib module getsockopt for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_LISTEN@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_LISTEN@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef listen
|
||||
# define listen rpl_listen
|
||||
extern int rpl_listen (int, int);
|
||||
# define listen rpl_listen
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef listen
|
||||
# define listen listen_used_without_requesting_gnulib_module_listen
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef listen
|
||||
# if HAVE_RAW_DECL_LISTEN
|
||||
_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog));
|
||||
_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (listen);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef listen
|
||||
# define listen listen_used_without_requesting_gnulib_module_listen
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef listen
|
||||
# if HAVE_RAW_DECL_LISTEN
|
||||
_GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - "
|
||||
"use gnulib module listen for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_RECV@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_RECV@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef recv
|
||||
# define recv rpl_recv
|
||||
extern int rpl_recv (int, void *, int, int) _GL_ARG_NONNULL ((2));
|
||||
# define recv rpl_recv
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef recv
|
||||
# define recv recv_used_without_requesting_gnulib_module_recv
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef recv
|
||||
# if HAVE_RAW_DECL_RECV
|
||||
_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (recv);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef recv
|
||||
# define recv recv_used_without_requesting_gnulib_module_recv
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef recv
|
||||
# if HAVE_RAW_DECL_RECV
|
||||
_GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - "
|
||||
"use gnulib module recv for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_SEND@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_SEND@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef send
|
||||
# define send rpl_send
|
||||
extern int rpl_send (int, const void *, int, int) _GL_ARG_NONNULL ((2));
|
||||
# define send rpl_send
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef send
|
||||
# define send send_used_without_requesting_gnulib_module_send
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef send
|
||||
# if HAVE_RAW_DECL_SEND
|
||||
_GL_FUNCDECL_RPL (send, ssize_t,
|
||||
(int fd, const void *buf, size_t len, int flags)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (send, ssize_t,
|
||||
(int fd, const void *buf, size_t len, int flags));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (send, ssize_t,
|
||||
(int fd, const void *buf, size_t len, int flags));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (send);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef send
|
||||
# define send send_used_without_requesting_gnulib_module_send
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef send
|
||||
# if HAVE_RAW_DECL_SEND
|
||||
_GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
|
||||
"use gnulib module send for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_RECVFROM@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_RECVFROM@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef recvfrom
|
||||
# define recvfrom rpl_recvfrom
|
||||
extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# define recvfrom rpl_recvfrom
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef recvfrom
|
||||
# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef recvfrom
|
||||
# if HAVE_RAW_DECL_RECVFROM
|
||||
_GL_FUNCDECL_RPL (recvfrom, ssize_t,
|
||||
(int fd, void *buf, size_t len, int flags,
|
||||
struct sockaddr *from, socklen_t *fromlen)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (recvfrom, ssize_t,
|
||||
(int fd, void *buf, size_t len, int flags,
|
||||
struct sockaddr *from, socklen_t *fromlen));
|
||||
# else
|
||||
/* Need to cast, because on Solaris 10 systems, the sixth parameter is
|
||||
void *fromlen. */
|
||||
_GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t,
|
||||
(int fd, void *buf, size_t len, int flags,
|
||||
struct sockaddr *from, socklen_t *fromlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (recvfrom);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef recvfrom
|
||||
# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef recvfrom
|
||||
# if HAVE_RAW_DECL_RECVFROM
|
||||
_GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - "
|
||||
"use gnulib module recvfrom for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_SENDTO@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_SENDTO@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef sendto
|
||||
# define sendto rpl_sendto
|
||||
extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# define sendto rpl_sendto
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef sendto
|
||||
# define sendto sendto_used_without_requesting_gnulib_module_sendto
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef sendto
|
||||
# if HAVE_RAW_DECL_SENDTO
|
||||
_GL_FUNCDECL_RPL (sendto, ssize_t,
|
||||
(int fd, const void *buf, size_t len, int flags,
|
||||
const struct sockaddr *to, socklen_t tolen)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (sendto, ssize_t,
|
||||
(int fd, const void *buf, size_t len, int flags,
|
||||
const struct sockaddr *to, socklen_t tolen));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (sendto, ssize_t,
|
||||
(int fd, const void *buf, size_t len, int flags,
|
||||
const struct sockaddr *to, socklen_t tolen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (sendto);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef sendto
|
||||
# define sendto sendto_used_without_requesting_gnulib_module_sendto
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef sendto
|
||||
# if HAVE_RAW_DECL_SENDTO
|
||||
_GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - "
|
||||
"use gnulib module sendto for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_SETSOCKOPT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_SETSOCKOPT@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef setsockopt
|
||||
# define setsockopt rpl_setsockopt
|
||||
extern int rpl_setsockopt (int, int, int, const void *, socklen_t)
|
||||
_GL_ARG_NONNULL ((4));
|
||||
# define setsockopt rpl_setsockopt
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef setsockopt
|
||||
# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef setsockopt
|
||||
# if HAVE_RAW_DECL_SETSOCKOPT
|
||||
_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname,
|
||||
const void * optval, socklen_t optlen)
|
||||
_GL_ARG_NONNULL ((4)));
|
||||
_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname,
|
||||
const void * optval, socklen_t optlen));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (setsockopt, int, (int fd, int level, int optname,
|
||||
const void * optval, socklen_t optlen));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (setsockopt);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef setsockopt
|
||||
# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef setsockopt
|
||||
# if HAVE_RAW_DECL_SETSOCKOPT
|
||||
_GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - "
|
||||
"use gnulib module setsockopt for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @GNULIB_SHUTDOWN@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
#if @GNULIB_SHUTDOWN@
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef shutdown
|
||||
# define shutdown rpl_shutdown
|
||||
extern int rpl_shutdown (int, int);
|
||||
# define shutdown rpl_shutdown
|
||||
# endif
|
||||
# elif @HAVE_WINSOCK2_H@
|
||||
# undef shutdown
|
||||
# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
|
||||
# elif defined GNULIB_POSIXCHECK
|
||||
# undef shutdown
|
||||
# if HAVE_RAW_DECL_SHUTDOWN
|
||||
_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how));
|
||||
_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (shutdown);
|
||||
#elif @HAVE_WINSOCK2_H@
|
||||
# undef shutdown
|
||||
# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef shutdown
|
||||
# if HAVE_RAW_DECL_SHUTDOWN
|
||||
_GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
|
||||
"use gnulib module shutdown for portability");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if @HAVE_WINSOCK2_H@
|
||||
# undef select
|
||||
# define select select_used_without_including_sys_select_h
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* HAVE_SYS_SOCKET_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#if @HAVE_WINSOCK2_H@
|
||||
# undef select
|
||||
# define select select_used_without_including_sys_select_h
|
||||
#endif
|
||||
|
||||
#if @GNULIB_ACCEPT4@
|
||||
|
@ -442,10 +582,24 @@ extern "C" {
|
|||
See also the Linux man page at
|
||||
<http://www.kernel.org/doc/man-pages/online/pages/man2/accept4.2.html>. */
|
||||
# if @HAVE_ACCEPT4@
|
||||
# define accept4 rpl_accept4
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define accept4 rpl_accept4
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (accept4, int,
|
||||
(int sockfd, struct sockaddr *addr, socklen_t *addrlen,
|
||||
int flags));
|
||||
_GL_CXXALIAS_RPL (accept4, int,
|
||||
(int sockfd, struct sockaddr *addr, socklen_t *addrlen,
|
||||
int flags));
|
||||
# else
|
||||
_GL_FUNCDECL_SYS (accept4, int,
|
||||
(int sockfd, struct sockaddr *addr, socklen_t *addrlen,
|
||||
int flags));
|
||||
_GL_CXXALIAS_SYS (accept4, int,
|
||||
(int sockfd, struct sockaddr *addr, socklen_t *addrlen,
|
||||
int flags));
|
||||
# endif
|
||||
extern int accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
|
||||
int flags);
|
||||
_GL_CXXALIASWARN (accept4);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef accept4
|
||||
# if HAVE_RAW_DECL_ACCEPT4
|
||||
|
@ -454,9 +608,6 @@ _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* _GL_SYS_SOCKET_H */
|
||||
#endif /* _GL_SYS_SOCKET_H */
|
||||
#endif
|
||||
|
||||
#endif /* _GL_SYS_SOCKET_H */
|
||||
#endif /* _GL_SYS_SOCKET_H */
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#ifndef _GL_SYS_STAT_H
|
||||
#define _GL_SYS_STAT_H
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
@ -290,16 +292,15 @@
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_FCHMODAT@
|
||||
# if !@HAVE_FCHMODAT@
|
||||
extern int fchmodat (int fd, char const *file, mode_t mode, int flag)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
_GL_FUNCDECL_SYS (fchmodat, int,
|
||||
(int fd, char const *file, mode_t mode, int flag)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (fchmodat, int,
|
||||
(int fd, char const *file, mode_t mode, int flag));
|
||||
_GL_CXXALIASWARN (fchmodat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fchmodat
|
||||
# if HAVE_RAW_DECL_FCHMODAT
|
||||
|
@ -310,20 +311,38 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
|
|||
|
||||
|
||||
#if @REPLACE_FSTAT@
|
||||
# define fstat rpl_fstat
|
||||
extern int fstat (int fd, struct stat *buf) _GL_ARG_NONNULL ((2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define fstat rpl_fstat
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
|
||||
#else
|
||||
_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
|
||||
#endif
|
||||
_GL_CXXALIASWARN (fstat);
|
||||
|
||||
|
||||
#if @GNULIB_FSTATAT@
|
||||
# if @REPLACE_FSTATAT@
|
||||
# undef fstatat
|
||||
# define fstatat rpl_fstatat
|
||||
# endif
|
||||
# if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@
|
||||
extern int fstatat (int fd, char const *name, struct stat *st, int flags)
|
||||
_GL_ARG_NONNULL ((2, 3));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef fstatat
|
||||
# define fstatat rpl_fstatat
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (fstatat, int,
|
||||
(int fd, char const *name, struct stat *st, int flags)
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
_GL_CXXALIAS_RPL (fstatat, int,
|
||||
(int fd, char const *name, struct stat *st, int flags));
|
||||
# else
|
||||
# if !@HAVE_FSTATAT@
|
||||
_GL_FUNCDECL_SYS (fstatat, int,
|
||||
(int fd, char const *name, struct stat *st, int flags)
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (fstatat, int,
|
||||
(int fd, char const *name, struct stat *st, int flags));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (fstatat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef fstatat
|
||||
# if HAVE_RAW_DECL_FSTATAT
|
||||
|
@ -335,12 +354,19 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
|
|||
|
||||
#if @GNULIB_FUTIMENS@
|
||||
# if @REPLACE_FUTIMENS@
|
||||
# undef futimens
|
||||
# define futimens rpl_futimens
|
||||
# endif
|
||||
# if !@HAVE_FUTIMENS@ || @REPLACE_FUTIMENS@
|
||||
extern int futimens (int fd, struct timespec const times[2]);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef futimens
|
||||
# define futimens rpl_futimens
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
|
||||
_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
|
||||
# else
|
||||
# if !@HAVE_FUTIMENS@
|
||||
_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (futimens);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef futimens
|
||||
# if HAVE_RAW_DECL_FUTIMENS
|
||||
|
@ -361,11 +387,18 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
|
|||
invocation of lchmod, but we know of no workarounds that are
|
||||
reliable in general. You might try requesting support for lchmod
|
||||
from your operating system supplier. */
|
||||
# define lchmod chmod
|
||||
# endif
|
||||
# if 0 /* assume already declared */
|
||||
extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define lchmod chmod
|
||||
# endif
|
||||
_GL_CXXALIAS_RPL_1 (lchmod, chmod, int, (const char *filename, mode_t mode));
|
||||
# else
|
||||
# if 0 /* assume already declared */
|
||||
_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (lchmod);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef lchmod
|
||||
# if HAVE_RAW_DECL_LCHMOD
|
||||
|
@ -379,13 +412,22 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
|
|||
# if ! @HAVE_LSTAT@
|
||||
/* mingw does not support symlinks, therefore it does not have lstat. But
|
||||
without links, stat does just fine. */
|
||||
# define lstat stat
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define lstat stat
|
||||
# endif
|
||||
_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
|
||||
# elif @REPLACE_LSTAT@
|
||||
# undef lstat
|
||||
# define lstat rpl_lstat
|
||||
extern int rpl_lstat (const char *name, struct stat *buf)
|
||||
_GL_ARG_NONNULL ((1, 2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef lstat
|
||||
# define lstat rpl_lstat
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (lstat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef lstat
|
||||
# if HAVE_RAW_DECL_LSTAT
|
||||
|
@ -396,9 +438,13 @@ _GL_WARN_ON_USE (lstat, "lstat is unportable - "
|
|||
|
||||
|
||||
#if @REPLACE_MKDIR@
|
||||
# undef mkdir
|
||||
# define mkdir rpl_mkdir
|
||||
extern int mkdir (char const *name, mode_t mode) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mkdir
|
||||
# define mkdir rpl_mkdir
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
|
||||
#else
|
||||
/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
|
||||
Additionally, it declares _mkdir (and depending on compile flags, an
|
||||
|
@ -411,16 +457,24 @@ rpl_mkdir (char const *name, mode_t mode)
|
|||
return _mkdir (name);
|
||||
}
|
||||
|
||||
# define mkdir rpl_mkdir
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mkdir rpl_mkdir
|
||||
# endif
|
||||
_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
|
||||
# endif
|
||||
#endif
|
||||
_GL_CXXALIASWARN (mkdir);
|
||||
|
||||
|
||||
#if @GNULIB_MKDIRAT@
|
||||
# if !@HAVE_MKDIRAT@
|
||||
extern int mkdirat (int fd, char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
|
||||
_GL_CXXALIASWARN (mkdirat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkdirat
|
||||
# if HAVE_RAW_DECL_MKDIRAT
|
||||
|
@ -432,12 +486,21 @@ _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
|
|||
|
||||
#if @GNULIB_MKFIFO@
|
||||
# if @REPLACE_MKFIFO@
|
||||
# undef mkfifo
|
||||
# define mkfifo rpl_mkfifo
|
||||
# endif
|
||||
# if !@HAVE_MKFIFO@ || @REPLACE_MKFIFO@
|
||||
extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mkfifo
|
||||
# define mkfifo rpl_mkfifo
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
|
||||
# else
|
||||
# if !@HAVE_MKFIFO@
|
||||
_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mkfifo);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkfifo
|
||||
# if HAVE_RAW_DECL_MKFIFO
|
||||
|
@ -449,9 +512,11 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
|
|||
|
||||
#if @GNULIB_MKFIFOAT@
|
||||
# if !@HAVE_MKFIFOAT@
|
||||
extern int mkfifoat (int fd, char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
|
||||
_GL_CXXALIASWARN (mkfifoat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mkfifoat
|
||||
# if HAVE_RAW_DECL_MKFIFOAT
|
||||
|
@ -463,13 +528,21 @@ _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
|
|||
|
||||
#if @GNULIB_MKNOD@
|
||||
# if @REPLACE_MKNOD@
|
||||
# undef mknod
|
||||
# define mknod rpl_mknod
|
||||
# endif
|
||||
# if !@HAVE_MKNOD@ || @REPLACE_MKNOD@
|
||||
extern int mknod (char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mknod
|
||||
# define mknod rpl_mknod
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
|
||||
# else
|
||||
# if !@HAVE_MKNOD@
|
||||
_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mknod);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mknod
|
||||
# if HAVE_RAW_DECL_MKNOD
|
||||
|
@ -481,9 +554,13 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - "
|
|||
|
||||
#if @GNULIB_MKNODAT@
|
||||
# if !@HAVE_MKNODAT@
|
||||
extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
_GL_FUNCDECL_SYS (mknodat, int,
|
||||
(int fd, char const *file, mode_t mode, dev_t dev)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mknodat, int,
|
||||
(int fd, char const *file, mode_t mode, dev_t dev));
|
||||
_GL_CXXALIASWARN (mknodat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mknodat
|
||||
# if HAVE_RAW_DECL_MKNODAT
|
||||
|
@ -508,7 +585,7 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
|
|||
# else /* !_LARGE_FILES */
|
||||
# define stat(name, st) rpl_stat (name, st)
|
||||
# endif /* !_LARGE_FILES */
|
||||
extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
|
||||
_GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef stat
|
||||
|
@ -521,14 +598,25 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
|
|||
|
||||
#if @GNULIB_UTIMENSAT@
|
||||
# if @REPLACE_UTIMENSAT@
|
||||
# undef utimensat
|
||||
# define utimensat rpl_utimensat
|
||||
# endif
|
||||
# if !@HAVE_UTIMENSAT@ || @REPLACE_UTIMENSAT@
|
||||
extern int utimensat (int fd, char const *name,
|
||||
struct timespec const times[2], int flag)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef utimensat
|
||||
# define utimensat rpl_utimensat
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
|
||||
struct timespec const times[2], int flag)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
|
||||
struct timespec const times[2], int flag));
|
||||
# else
|
||||
# if !@HAVE_UTIMENSAT@
|
||||
_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
|
||||
struct timespec const times[2], int flag)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
|
||||
struct timespec const times[2], int flag));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (utimensat);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef utimensat
|
||||
# if HAVE_RAW_DECL_UTIMENSAT
|
||||
|
@ -538,11 +626,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _GL_SYS_STAT_H */
|
||||
#endif /* _GL_SYS_STAT_H */
|
||||
#endif
|
||||
|
|
129
lib/time.in.h
129
lib/time.in.h
|
@ -40,8 +40,12 @@
|
|||
/* NetBSD 5.0 mis-defines NULL. */
|
||||
#include <stddef.h>
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
@ -63,54 +67,117 @@ struct timespec
|
|||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
|
||||
return -1 and store the remaining time into RMTP. See
|
||||
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
|
||||
# if @REPLACE_NANOSLEEP@
|
||||
# define nanosleep rpl_nanosleep
|
||||
extern int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
# if @GNULIB_NANOSLEEP@
|
||||
# if @REPLACE_NANOSLEEP@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define nanosleep rpl_nanosleep
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (nanosleep, int,
|
||||
(struct timespec const *__rqtp, struct timespec *__rmtp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (nanosleep, int,
|
||||
(struct timespec const *__rqtp, struct timespec *__rmtp));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (nanosleep, int,
|
||||
(struct timespec const *__rqtp, struct timespec *__rmtp));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (nanosleep);
|
||||
# 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) _GL_ARG_NONNULL ((1));
|
||||
# if @GNULIB_MKTIME@
|
||||
# if @REPLACE_MKTIME@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define mktime rpl_mktime
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mktime);
|
||||
# endif
|
||||
|
||||
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
|
||||
<http://www.opengroup.org/susv3xsh/localtime_r.html> and
|
||||
<http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
|
||||
# if @REPLACE_LOCALTIME_R@
|
||||
# undef localtime_r
|
||||
# define localtime_r rpl_localtime_r
|
||||
# undef gmtime_r
|
||||
# define gmtime_r rpl_gmtime_r
|
||||
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));
|
||||
# if @GNULIB_TIME_R@
|
||||
# if @REPLACE_LOCALTIME_R@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef localtime_r
|
||||
# define localtime_r rpl_localtime_r
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
|
||||
struct tm *restrict __result)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
|
||||
struct tm *restrict __result));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
|
||||
struct tm *restrict __result));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (localtime_r);
|
||||
# if @REPLACE_LOCALTIME_R@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef gmtime_r
|
||||
# define gmtime_r rpl_gmtime_r
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
|
||||
struct tm *restrict __result)
|
||||
_GL_ARG_NONNULL ((1, 2)));
|
||||
_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
|
||||
struct tm *restrict __result));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
|
||||
struct tm *restrict __result));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (gmtime_r);
|
||||
# endif
|
||||
|
||||
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
|
||||
the resulting broken-down time into TM. See
|
||||
<http://www.opengroup.org/susv3xsh/strptime.html>. */
|
||||
# if @REPLACE_STRPTIME@
|
||||
# undef strptime
|
||||
# define strptime rpl_strptime
|
||||
extern char *strptime (char const *restrict __buf,
|
||||
char const *restrict __format,
|
||||
struct tm *restrict __tm)
|
||||
_GL_ARG_NONNULL ((1, 2, 3));
|
||||
# if @GNULIB_STRPTIME@
|
||||
# if @REPLACE_STRPTIME@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef strptime
|
||||
# define strptime rpl_strptime
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (strptime, char *, (char const *restrict __buf,
|
||||
char const *restrict __format,
|
||||
struct tm *restrict __tm)
|
||||
_GL_ARG_NONNULL ((1, 2, 3)));
|
||||
_GL_CXXALIAS_RPL (strptime, char *, (char const *restrict __buf,
|
||||
char const *restrict __format,
|
||||
struct tm *restrict __tm));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
|
||||
char const *restrict __format,
|
||||
struct tm *restrict __tm));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strptime);
|
||||
# endif
|
||||
|
||||
/* Convert TM to a time_t value, assuming UTC. */
|
||||
# if @REPLACE_TIMEGM@
|
||||
# undef timegm
|
||||
# define timegm rpl_timegm
|
||||
extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1));
|
||||
# if @GNULIB_TIMEGM@
|
||||
# if @REPLACE_TIMEGM@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef timegm
|
||||
# define timegm rpl_timegm
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (timegm);
|
||||
# endif
|
||||
|
||||
/* Encourage applications to avoid unsafe functions that can overrun
|
||||
|
@ -127,8 +194,4 @@ extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1));
|
|||
# define ctime_r eschew_ctime_r
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
|
640
lib/unistd.in.h
640
lib/unistd.in.h
File diff suppressed because it is too large
Load diff
237
lib/wchar.in.h
237
lib/wchar.in.h
|
@ -75,14 +75,12 @@
|
|||
#ifndef _GL_WCHAR_H
|
||||
#define _GL_WCHAR_H
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Define wint_t. (Also done in wctype.in.h.) */
|
||||
#if !@HAVE_WINT_T@ && !defined wint_t
|
||||
|
@ -107,12 +105,19 @@ typedef int rpl_mbstate_t;
|
|||
/* Convert a single-byte character to a wide character. */
|
||||
#if @GNULIB_BTOWC@
|
||||
# if @REPLACE_BTOWC@
|
||||
# undef btowc
|
||||
# define btowc rpl_btowc
|
||||
# endif
|
||||
# if !@HAVE_BTOWC@ || @REPLACE_BTOWC@
|
||||
extern wint_t btowc (int c);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef btowc
|
||||
# define btowc rpl_btowc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
|
||||
_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
|
||||
# else
|
||||
# if !@HAVE_BTOWC@
|
||||
_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (btowc);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef btowc
|
||||
# if HAVE_RAW_DECL_BTOWC
|
||||
|
@ -125,13 +130,20 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - "
|
|||
/* Convert a wide character to a single-byte character. */
|
||||
#if @GNULIB_WCTOB@
|
||||
# if @REPLACE_WCTOB@
|
||||
# undef wctob
|
||||
# define wctob rpl_wctob
|
||||
# endif
|
||||
# if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef wctob
|
||||
# define wctob rpl_wctob
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
|
||||
_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
|
||||
# else
|
||||
# if !defined wctob && !@HAVE_DECL_WCTOB@
|
||||
/* wctob is provided by gnulib, or wctob exists but is not declared. */
|
||||
extern int wctob (wint_t wc);
|
||||
_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (wctob);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wctob
|
||||
# if HAVE_RAW_DECL_WCTOB
|
||||
|
@ -144,12 +156,19 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - "
|
|||
/* Test whether *PS is in the initial state. */
|
||||
#if @GNULIB_MBSINIT@
|
||||
# if @REPLACE_MBSINIT@
|
||||
# undef mbsinit
|
||||
# define mbsinit rpl_mbsinit
|
||||
# endif
|
||||
# if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@
|
||||
extern int mbsinit (const mbstate_t *ps);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mbsinit
|
||||
# define mbsinit rpl_mbsinit
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
|
||||
_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_MBSINIT@
|
||||
_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbsinit);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbsinit
|
||||
# if HAVE_RAW_DECL_MBSINIT
|
||||
|
@ -162,12 +181,23 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
|
|||
/* Convert a multibyte character to a wide character. */
|
||||
#if @GNULIB_MBRTOWC@
|
||||
# if @REPLACE_MBRTOWC@
|
||||
# undef mbrtowc
|
||||
# define mbrtowc rpl_mbrtowc
|
||||
# endif
|
||||
# if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@
|
||||
extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mbrtowc
|
||||
# define mbrtowc rpl_mbrtowc
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbrtowc, size_t,
|
||||
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
|
||||
_GL_CXXALIAS_RPL (mbrtowc, size_t,
|
||||
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_MBRTOWC@
|
||||
_GL_FUNCDECL_SYS (mbrtowc, size_t,
|
||||
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mbrtowc, size_t,
|
||||
(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbrtowc);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbrtowc
|
||||
# if HAVE_RAW_DECL_MBRTOWC
|
||||
|
@ -180,12 +210,19 @@ _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
|
|||
/* Recognize a multibyte character. */
|
||||
#if @GNULIB_MBRLEN@
|
||||
# if @REPLACE_MBRLEN@
|
||||
# undef mbrlen
|
||||
# define mbrlen rpl_mbrlen
|
||||
# endif
|
||||
# if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@
|
||||
extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mbrlen
|
||||
# define mbrlen rpl_mbrlen
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
|
||||
_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_MBRLEN@
|
||||
_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbrlen);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbrlen
|
||||
# if HAVE_RAW_DECL_MBRLEN
|
||||
|
@ -198,13 +235,27 @@ _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
|
|||
/* Convert a string to a wide string. */
|
||||
#if @GNULIB_MBSRTOWCS@
|
||||
# if @REPLACE_MBSRTOWCS@
|
||||
# undef mbsrtowcs
|
||||
# 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)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mbsrtowcs
|
||||
# define mbsrtowcs rpl_mbsrtowcs
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbsrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (mbsrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t len,
|
||||
mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_MBSRTOWCS@
|
||||
_GL_FUNCDECL_SYS (mbsrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mbsrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t len,
|
||||
mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbsrtowcs);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbsrtowcs
|
||||
# if HAVE_RAW_DECL_MBSRTOWCS
|
||||
|
@ -217,13 +268,29 @@ _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
|
|||
/* Convert a string to a wide string. */
|
||||
#if @GNULIB_MBSNRTOWCS@
|
||||
# if @REPLACE_MBSNRTOWCS@
|
||||
# undef mbsnrtowcs
|
||||
# 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)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef mbsnrtowcs
|
||||
# define mbsnrtowcs rpl_mbsnrtowcs
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_MBSNRTOWCS@
|
||||
_GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
|
||||
(wchar_t *dest, const char **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (mbsnrtowcs);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef mbsnrtowcs
|
||||
# if HAVE_RAW_DECL_MBSNRTOWCS
|
||||
|
@ -236,12 +303,19 @@ _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
|
|||
/* Convert a wide character to a multibyte character. */
|
||||
#if @GNULIB_WCRTOMB@
|
||||
# if @REPLACE_WCRTOMB@
|
||||
# undef wcrtomb
|
||||
# define wcrtomb rpl_wcrtomb
|
||||
# endif
|
||||
# if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@
|
||||
extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef wcrtomb
|
||||
# define wcrtomb rpl_wcrtomb
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
|
||||
_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_WCRTOMB@
|
||||
_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (wcrtomb);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcrtomb
|
||||
# if HAVE_RAW_DECL_WCRTOMB
|
||||
|
@ -254,13 +328,27 @@ _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
|
|||
/* Convert a wide string to a string. */
|
||||
#if @GNULIB_WCSRTOMBS@
|
||||
# if @REPLACE_WCSRTOMBS@
|
||||
# undef wcsrtombs
|
||||
# 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)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef wcsrtombs
|
||||
# define wcsrtombs rpl_wcsrtombs
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (wcsrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (wcsrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t len,
|
||||
mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_WCSRTOMBS@
|
||||
_GL_FUNCDECL_SYS (wcsrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (wcsrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t len,
|
||||
mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (wcsrtombs);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcsrtombs
|
||||
# if HAVE_RAW_DECL_WCSRTOMBS
|
||||
|
@ -273,13 +361,29 @@ _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
|
|||
/* Convert a wide string to a string. */
|
||||
#if @GNULIB_WCSNRTOMBS@
|
||||
# if @REPLACE_WCSNRTOMBS@
|
||||
# undef wcsnrtombs
|
||||
# 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)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef wcsnrtombs
|
||||
# define wcsnrtombs rpl_wcsnrtombs
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (wcsnrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (wcsnrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps));
|
||||
# else
|
||||
# if !@HAVE_WCSNRTOMBS@
|
||||
_GL_FUNCDECL_SYS (wcsnrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (wcsnrtombs, size_t,
|
||||
(char *dest, const wchar_t **srcp, size_t srclen, size_t len,
|
||||
mbstate_t *ps));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (wcsnrtombs);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcsnrtombs
|
||||
# if HAVE_RAW_DECL_WCSNRTOMBS
|
||||
|
@ -292,15 +396,20 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
|
|||
/* Return the number of screen columns needed for WC. */
|
||||
#if @GNULIB_WCWIDTH@
|
||||
# if @REPLACE_WCWIDTH@
|
||||
# undef wcwidth
|
||||
# define wcwidth rpl_wcwidth
|
||||
extern int wcwidth (wchar_t);
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef wcwidth
|
||||
# define wcwidth rpl_wcwidth
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
|
||||
_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
|
||||
# else
|
||||
# if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
|
||||
/* wcwidth exists but is not declared. */
|
||||
extern int wcwidth (int /* actually wchar_t */);
|
||||
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (wcwidth);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcwidth
|
||||
# if HAVE_RAW_DECL_WCWIDTH
|
||||
|
@ -310,10 +419,6 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GL_WCHAR_H */
|
||||
#endif /* _GL_WCHAR_H */
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# duplocale.m4 serial 1
|
||||
# duplocale.m4 serial 2
|
||||
dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -41,6 +41,8 @@ int main ()
|
|||
case "$gl_cv_func_duplocale_works" in
|
||||
*no) REPLACE_DUPLOCALE=1 ;;
|
||||
esac
|
||||
else
|
||||
HAVE_DUPLOCALE=0
|
||||
fi
|
||||
if test $REPLACE_DUPLOCALE = 1; then
|
||||
gl_REPLACE_LOCALE_H
|
||||
|
|
20
m4/func.m4
Normal file
20
m4/func.m4
Normal file
|
@ -0,0 +1,20 @@
|
|||
# func.m4 serial 2
|
||||
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Written by Simon Josefsson
|
||||
|
||||
AC_DEFUN([gl_FUNC],
|
||||
[
|
||||
AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var_func],
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]], [[const char *str = __func__;]])],
|
||||
[gl_cv_var_func=yes],
|
||||
[gl_cv_var_func=no]))
|
||||
if test "$gl_cv_var_func" != yes; then
|
||||
AC_DEFINE([__func__], ["<unknown function>"],
|
||||
[Define as a replacement for the ISO C99 __func__ variable.])
|
||||
fi
|
||||
])
|
|
@ -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 getaddrinfo gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
||||
# 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 func gendocs getaddrinfo gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
||||
|
||||
# Specification in the form of a few gnulib-tool.m4 macro invocations:
|
||||
gl_LOCAL_DIR([])
|
||||
|
@ -33,6 +33,7 @@ gl_MODULES([
|
|||
fpieee
|
||||
full-read
|
||||
full-write
|
||||
func
|
||||
gendocs
|
||||
getaddrinfo
|
||||
gitlog-to-changelog
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# gnulib-common.m4 serial 12
|
||||
# gnulib-common.m4 serial 13
|
||||
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -61,9 +61,16 @@ m4_ifndef([AS_VAR_IF],
|
|||
[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
|
||||
|
||||
# AC_PROG_MKDIR_P
|
||||
# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
|
||||
# Remove this macro when we can assume autoconf >= 2.60.
|
||||
m4_ifdef([AC_PROG_MKDIR_P], [], [
|
||||
# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
|
||||
# for interoperability with automake-1.9.6 from autoconf-2.62.
|
||||
# Remove this macro when we can assume autoconf >= 2.62 or
|
||||
# autoconf >= 2.60 && automake >= 1.10.
|
||||
m4_ifdef([AC_PROG_MKDIR_P], [
|
||||
dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
|
||||
m4_define([AC_PROG_MKDIR_P],
|
||||
m4_defn([AC_PROG_MKDIR_P])[
|
||||
AC_SUBST([MKDIR_P])])], [
|
||||
dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
|
||||
AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
|
||||
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
|
||||
MKDIR_P='$(mkdir_p)'
|
||||
|
|
|
@ -26,14 +26,120 @@ AC_DEFUN([gl_EARLY],
|
|||
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
|
||||
AC_REQUIRE([AC_PROG_RANLIB])
|
||||
AC_REQUIRE([AM_PROG_CC_C_O])
|
||||
# Code from module alignof:
|
||||
# Code from module alloca-opt:
|
||||
# Code from module announce-gen:
|
||||
# Code from module arg-nonnull:
|
||||
# Code from module arpa_inet:
|
||||
# Code from module autobuild:
|
||||
AB_INIT
|
||||
# Code from module byteswap:
|
||||
# Code from module c++defs:
|
||||
# Code from module c-ctype:
|
||||
# Code from module c-strcase:
|
||||
# Code from module c-strcaseeq:
|
||||
# Code from module canonicalize-lgpl:
|
||||
# Code from module configmake:
|
||||
# Code from module duplocale:
|
||||
# Code from module environ:
|
||||
# Code from module errno:
|
||||
# Code from module extensions:
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
# Code from module float:
|
||||
# Code from module flock:
|
||||
# Code from module fpieee:
|
||||
AC_REQUIRE([gl_FP_IEEE])
|
||||
# Code from module full-read:
|
||||
# Code from module full-write:
|
||||
# Code from module func:
|
||||
# Code from module gendocs:
|
||||
# Code from module getaddrinfo:
|
||||
# Code from module gettext-h:
|
||||
# Code from module gitlog-to-changelog:
|
||||
# Code from module gnu-web-doc-update:
|
||||
# Code from module gnumakefile:
|
||||
# Code from module gnupload:
|
||||
# Code from module gperf:
|
||||
# Code from module havelib:
|
||||
# Code from module hostent:
|
||||
# Code from module iconv:
|
||||
# Code from module iconv-h:
|
||||
# Code from module iconv_open:
|
||||
# Code from module iconv_open-utf:
|
||||
# Code from module include_next:
|
||||
# Code from module inet_ntop:
|
||||
# Code from module inet_pton:
|
||||
# Code from module inline:
|
||||
# Code from module lib-symbol-versions:
|
||||
# Code from module lib-symbol-visibility:
|
||||
# Code from module libunistring:
|
||||
# Code from module localcharset:
|
||||
# Code from module locale:
|
||||
# Code from module lstat:
|
||||
# Code from module maintainer-makefile:
|
||||
# Code from module malloc-posix:
|
||||
# Code from module malloca:
|
||||
# Code from module mbrlen:
|
||||
# Code from module mbrtowc:
|
||||
# Code from module mbsinit:
|
||||
# Code from module memchr:
|
||||
# Code from module multiarch:
|
||||
# Code from module netdb:
|
||||
# Code from module netinet_in:
|
||||
# Code from module pathmax:
|
||||
# Code from module putenv:
|
||||
# Code from module readlink:
|
||||
# Code from module safe-read:
|
||||
# Code from module safe-write:
|
||||
# Code from module servent:
|
||||
# Code from module size_max:
|
||||
# Code from module snprintf:
|
||||
# Code from module socklen:
|
||||
# Code from module ssize_t:
|
||||
# Code from module stat:
|
||||
# Code from module stdarg:
|
||||
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
|
||||
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
|
||||
dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
|
||||
dnl shouldn't hurt, though installers are on their own to set c99 mode.
|
||||
AC_REQUIRE([AC_PROG_CC_STDC])
|
||||
# Code from module stdbool:
|
||||
# Code from module stddef:
|
||||
# Code from module stdint:
|
||||
# Code from module stdio:
|
||||
# Code from module stdlib:
|
||||
# Code from module strcase:
|
||||
# Code from module streq:
|
||||
# Code from module strftime:
|
||||
# Code from module striconveh:
|
||||
# Code from module string:
|
||||
# Code from module strings:
|
||||
# Code from module sys_file:
|
||||
# Code from module sys_socket:
|
||||
# Code from module sys_stat:
|
||||
# Code from module time:
|
||||
# Code from module time_r:
|
||||
# Code from module unistd:
|
||||
# Code from module unistr/base:
|
||||
# Code from module unistr/u8-mbtouc:
|
||||
# Code from module unistr/u8-mbtouc-unsafe:
|
||||
# Code from module unistr/u8-mbtoucr:
|
||||
# Code from module unistr/u8-prev:
|
||||
# Code from module unistr/u8-uctomb:
|
||||
# Code from module unitypes:
|
||||
# Code from module unused-parameter:
|
||||
# Code from module useless-if-before-free:
|
||||
# Code from module vasnprintf:
|
||||
# Code from module vc-list-files:
|
||||
# Code from module verify:
|
||||
# Code from module version-etc:
|
||||
# Code from module version-etc-fsf:
|
||||
# Code from module vsnprintf:
|
||||
# Code from module warn-on-use:
|
||||
# Code from module warnings:
|
||||
# Code from module wchar:
|
||||
# Code from module write:
|
||||
# Code from module xsize:
|
||||
])
|
||||
|
||||
# This macro should be invoked from ./configure.ac, in the section
|
||||
|
@ -49,26 +155,56 @@ AC_DEFUN([gl_INIT],
|
|||
m4_pushdef([gl_LIBSOURCES_DIR], [])
|
||||
gl_COMMON
|
||||
gl_source_base='lib'
|
||||
# Code from module alignof:
|
||||
# Code from module alloca-opt:
|
||||
gl_FUNC_ALLOCA
|
||||
# Code from module announce-gen:
|
||||
# Code from module arg-nonnull:
|
||||
# Code from module arpa_inet:
|
||||
gl_HEADER_ARPA_INET
|
||||
AC_PROG_MKDIR_P
|
||||
# Code from module autobuild:
|
||||
# Code from module byteswap:
|
||||
gl_BYTESWAP
|
||||
# Code from module c++defs:
|
||||
# Code from module c-ctype:
|
||||
# Code from module c-strcase:
|
||||
# Code from module c-strcaseeq:
|
||||
# Code from module canonicalize-lgpl:
|
||||
gl_CANONICALIZE_LGPL
|
||||
gl_MODULE_INDICATOR([canonicalize-lgpl])
|
||||
gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
|
||||
gl_STDLIB_MODULE_INDICATOR([realpath])
|
||||
# Code from module configmake:
|
||||
# Code from module duplocale:
|
||||
gl_FUNC_DUPLOCALE
|
||||
gl_LOCALE_MODULE_INDICATOR([duplocale])
|
||||
# Code from module environ:
|
||||
gl_ENVIRON
|
||||
gl_UNISTD_MODULE_INDICATOR([environ])
|
||||
# Code from module errno:
|
||||
gl_HEADER_ERRNO_H
|
||||
# Code from module extensions:
|
||||
# Code from module float:
|
||||
gl_FLOAT_H
|
||||
# Code from module flock:
|
||||
gl_FUNC_FLOCK
|
||||
gl_HEADER_SYS_FILE_MODULE_INDICATOR([flock])
|
||||
# Code from module fpieee:
|
||||
# Code from module full-read:
|
||||
# Code from module full-write:
|
||||
# Code from module func:
|
||||
gl_FUNC
|
||||
# Code from module gendocs:
|
||||
# Code from module getaddrinfo:
|
||||
gl_GETADDRINFO
|
||||
gl_NETDB_MODULE_INDICATOR([getaddrinfo])
|
||||
# Code from module gettext-h:
|
||||
AC_SUBST([LIBINTL])
|
||||
AC_SUBST([LTLIBINTL])
|
||||
# Code from module gitlog-to-changelog:
|
||||
# Code from module gnu-web-doc-update:
|
||||
# Code from module gnumakefile:
|
||||
# Autoconf 2.61a.99 and earlier don't support linking a file only
|
||||
# in VPATH builds. But since GNUmakefile is for maintainer use
|
||||
# only, it does not matter if we skip the link with older autoconf.
|
||||
|
@ -79,93 +215,172 @@ AC_DEFUN([gl_INIT],
|
|||
m4_defn([m4_PACKAGE_VERSION])), [1], [],
|
||||
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
|
||||
[GNUmakefile=$GNUmakefile])])
|
||||
# Code from module gnupload:
|
||||
# Code from module gperf:
|
||||
# Code from module havelib:
|
||||
# Code from module hostent:
|
||||
gl_HOSTENT
|
||||
# Code from module iconv:
|
||||
AM_ICONV
|
||||
# Code from module iconv-h:
|
||||
gl_ICONV_H
|
||||
# Code from module iconv_open:
|
||||
gl_FUNC_ICONV_OPEN
|
||||
# Code from module iconv_open-utf:
|
||||
gl_FUNC_ICONV_OPEN_UTF
|
||||
# Code from module include_next:
|
||||
# Code from module inet_ntop:
|
||||
gl_INET_NTOP
|
||||
gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
|
||||
# Code from module inet_pton:
|
||||
gl_INET_PTON
|
||||
gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
|
||||
# Code from module inline:
|
||||
gl_INLINE
|
||||
# Code from module lib-symbol-versions:
|
||||
gl_LD_VERSION_SCRIPT
|
||||
# Code from module lib-symbol-visibility:
|
||||
gl_VISIBILITY
|
||||
# Code from module libunistring:
|
||||
gl_LIBUNISTRING
|
||||
# Code from module localcharset:
|
||||
gl_LOCALCHARSET
|
||||
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
|
||||
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
|
||||
# Code from module locale:
|
||||
gl_LOCALE_H
|
||||
# Code from module lstat:
|
||||
gl_FUNC_LSTAT
|
||||
gl_SYS_STAT_MODULE_INDICATOR([lstat])
|
||||
# Code from module maintainer-makefile:
|
||||
AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
|
||||
[AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
|
||||
# Code from module malloc-posix:
|
||||
gl_FUNC_MALLOC_POSIX
|
||||
gl_STDLIB_MODULE_INDICATOR([malloc-posix])
|
||||
# Code from module malloca:
|
||||
gl_MALLOCA
|
||||
# Code from module mbrlen:
|
||||
gl_FUNC_MBRLEN
|
||||
gl_WCHAR_MODULE_INDICATOR([mbrlen])
|
||||
# Code from module mbrtowc:
|
||||
gl_FUNC_MBRTOWC
|
||||
gl_WCHAR_MODULE_INDICATOR([mbrtowc])
|
||||
# Code from module mbsinit:
|
||||
gl_FUNC_MBSINIT
|
||||
gl_WCHAR_MODULE_INDICATOR([mbsinit])
|
||||
# Code from module memchr:
|
||||
gl_FUNC_MEMCHR
|
||||
gl_STRING_MODULE_INDICATOR([memchr])
|
||||
# Code from module multiarch:
|
||||
gl_MULTIARCH
|
||||
# Code from module netdb:
|
||||
gl_HEADER_NETDB
|
||||
# Code from module netinet_in:
|
||||
gl_HEADER_NETINET_IN
|
||||
AC_PROG_MKDIR_P
|
||||
# Code from module pathmax:
|
||||
gl_PATHMAX
|
||||
# Code from module putenv:
|
||||
gl_FUNC_PUTENV
|
||||
gl_STDLIB_MODULE_INDICATOR([putenv])
|
||||
# Code from module readlink:
|
||||
gl_FUNC_READLINK
|
||||
gl_UNISTD_MODULE_INDICATOR([readlink])
|
||||
# Code from module safe-read:
|
||||
gl_SAFE_READ
|
||||
# Code from module safe-write:
|
||||
gl_SAFE_WRITE
|
||||
# Code from module servent:
|
||||
gl_SERVENT
|
||||
# Code from module size_max:
|
||||
gl_SIZE_MAX
|
||||
# Code from module snprintf:
|
||||
gl_FUNC_SNPRINTF
|
||||
gl_STDIO_MODULE_INDICATOR([snprintf])
|
||||
# Code from module socklen:
|
||||
gl_TYPE_SOCKLEN_T
|
||||
# Code from module ssize_t:
|
||||
gt_TYPE_SSIZE_T
|
||||
# Code from module stat:
|
||||
gl_FUNC_STAT
|
||||
gl_SYS_STAT_MODULE_INDICATOR([stat])
|
||||
# Code from module stdarg:
|
||||
gl_STDARG_H
|
||||
# Code from module stdbool:
|
||||
AM_STDBOOL_H
|
||||
# Code from module stddef:
|
||||
gl_STDDEF_H
|
||||
# Code from module stdint:
|
||||
gl_STDINT_H
|
||||
# Code from module stdio:
|
||||
gl_STDIO_H
|
||||
# Code from module stdlib:
|
||||
gl_STDLIB_H
|
||||
# Code from module strcase:
|
||||
gl_STRCASE
|
||||
# Code from module streq:
|
||||
# Code from module strftime:
|
||||
gl_FUNC_GNU_STRFTIME
|
||||
# Code from module striconveh:
|
||||
if test $gl_cond_libtool = false; then
|
||||
gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
|
||||
gl_libdeps="$gl_libdeps $LIBICONV"
|
||||
fi
|
||||
# Code from module string:
|
||||
gl_HEADER_STRING_H
|
||||
# Code from module strings:
|
||||
gl_HEADER_STRINGS_H
|
||||
# Code from module sys_file:
|
||||
gl_HEADER_SYS_FILE_H
|
||||
AC_PROG_MKDIR_P
|
||||
# Code from module sys_socket:
|
||||
gl_HEADER_SYS_SOCKET
|
||||
AC_PROG_MKDIR_P
|
||||
# Code from module sys_stat:
|
||||
gl_HEADER_SYS_STAT_H
|
||||
AC_PROG_MKDIR_P
|
||||
# Code from module time:
|
||||
gl_HEADER_TIME_H
|
||||
# Code from module time_r:
|
||||
gl_TIME_R
|
||||
gl_TIME_MODULE_INDICATOR([time_r])
|
||||
# Code from module unistd:
|
||||
gl_UNISTD_H
|
||||
# Code from module unistr/base:
|
||||
# Code from module unistr/u8-mbtouc:
|
||||
gl_MODULE_INDICATOR([unistr/u8-mbtouc])
|
||||
# Code from module unistr/u8-mbtouc-unsafe:
|
||||
gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe])
|
||||
# Code from module unistr/u8-mbtoucr:
|
||||
gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
|
||||
# Code from module unistr/u8-prev:
|
||||
# Code from module unistr/u8-uctomb:
|
||||
gl_MODULE_INDICATOR([unistr/u8-uctomb])
|
||||
# Code from module unitypes:
|
||||
# Code from module unused-parameter:
|
||||
# Code from module useless-if-before-free:
|
||||
# Code from module vasnprintf:
|
||||
gl_FUNC_VASNPRINTF
|
||||
# Code from module vc-list-files:
|
||||
# Code from module verify:
|
||||
# Code from module version-etc:
|
||||
gl_VERSION_ETC
|
||||
# Code from module version-etc-fsf:
|
||||
# Code from module vsnprintf:
|
||||
gl_FUNC_VSNPRINTF
|
||||
gl_STDIO_MODULE_INDICATOR([vsnprintf])
|
||||
# Code from module warn-on-use:
|
||||
# Code from module warnings:
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
# Code from module wchar:
|
||||
gl_WCHAR_H
|
||||
# Code from module write:
|
||||
gl_FUNC_WRITE
|
||||
gl_UNISTD_MODULE_INDICATOR([write])
|
||||
# Code from module xsize:
|
||||
gl_XSIZE
|
||||
# End of code from modules
|
||||
m4_ifval(gl_LIBSOURCES_LIST, [
|
||||
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
|
||||
for gl_file in ]gl_LIBSOURCES_LIST[ ; do
|
||||
|
@ -296,6 +511,7 @@ AC_DEFUN([gltests_LIBSOURCES], [
|
|||
AC_DEFUN([gl_FILE_LIST], [
|
||||
build-aux/announce-gen
|
||||
build-aux/arg-nonnull.h
|
||||
build-aux/c++defs.h
|
||||
build-aux/config.rpath
|
||||
build-aux/gendocs.sh
|
||||
build-aux/gitlog-to-changelog
|
||||
|
@ -434,6 +650,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/float_h.m4
|
||||
m4/flock.m4
|
||||
m4/fpieee.m4
|
||||
m4/func.m4
|
||||
m4/getaddrinfo.m4
|
||||
m4/glibc21.m4
|
||||
m4/gnulib-common.m4
|
||||
|
@ -507,7 +724,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/vsnprintf.m4
|
||||
m4/warn-on-use.m4
|
||||
m4/warnings.m4
|
||||
m4/wchar.m4
|
||||
m4/wchar_h.m4
|
||||
m4/wchar_t.m4
|
||||
m4/wint_t.m4
|
||||
m4/write.m4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# iconv_open.m4 serial 6
|
||||
# iconv_open.m4 serial 7
|
||||
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10,6 +10,8 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
|
|||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([gl_ICONV_H_DEFAULTS])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
dnl Provide the <iconv.h> override, for the sake of the C++ aliases.
|
||||
gl_REPLACE_ICONV_H
|
||||
dnl Test whether iconv_open accepts standardized encoding names.
|
||||
dnl We know that GNU libiconv and GNU libc do.
|
||||
AC_EGREP_CPP([gnu_iconv], [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# locale_h.m4 serial 7
|
||||
# locale_h.m4 serial 9
|
||||
dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -79,11 +79,14 @@ AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_LOCALE_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
|
||||
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||
HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
|
||||
REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
|
||||
])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# stdio_h.m4 serial 25
|
||||
# stdio_h.m4 serial 26
|
||||
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -45,6 +45,8 @@ AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_STDIO_H_DEFAULTS],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# stdlib_h.m4 serial 22
|
||||
# stdlib_h.m4 serial 23
|
||||
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -43,6 +43,8 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 11
|
||||
# serial 12
|
||||
|
||||
# Written by Paul Eggert.
|
||||
|
||||
|
@ -35,6 +35,8 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Configure a replacement for <sys/file.h>.
|
||||
# serial 3
|
||||
# serial 4
|
||||
|
||||
# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2008-2010 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -12,10 +12,7 @@ AC_DEFUN([gl_HEADER_SYS_FILE_H],
|
|||
[
|
||||
AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
|
||||
|
||||
dnl Only flock is defined in a working <sys/file.h>. If that
|
||||
dnl function is already there, we don't want to do any substitution.
|
||||
AC_CHECK_FUNCS_ONCE([flock])
|
||||
|
||||
dnl <sys/file.h> is always overridden, because of GNULIB_POSIXCHECK.
|
||||
gl_CHECK_NEXT_HEADERS([sys/file.h])
|
||||
|
||||
AC_CHECK_HEADERS_ONCE([sys/file.h])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# sys_socket_h.m4 serial 14
|
||||
# sys_socket_h.m4 serial 16
|
||||
dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -19,7 +19,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
|
|||
[gl_cv_header_sys_socket_h_selfcontained=no])
|
||||
])
|
||||
if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
|
||||
SYS_SOCKET_H=''
|
||||
dnl If the shutdown function exists, <sys/socket.h> should define
|
||||
dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
|
||||
AC_CHECK_FUNCS([shutdown])
|
||||
|
@ -37,8 +36,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
|
|||
SYS_SOCKET_H='sys/socket.h'
|
||||
fi
|
||||
fi
|
||||
else
|
||||
SYS_SOCKET_H='sys/socket.h'
|
||||
fi
|
||||
# We need to check for ws2tcpip.h now.
|
||||
gl_PREREQ_SYS_H_SOCKET
|
||||
|
@ -56,16 +53,11 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
|
|||
])
|
||||
if test $ac_cv_type_struct_sockaddr_storage = no; then
|
||||
HAVE_STRUCT_SOCKADDR_STORAGE=0
|
||||
SYS_SOCKET_H='sys/socket.h'
|
||||
fi
|
||||
if test $ac_cv_type_sa_family_t = no; then
|
||||
HAVE_SA_FAMILY_T=0
|
||||
SYS_SOCKET_H='sys/socket.h'
|
||||
fi
|
||||
if test -n "$SYS_SOCKET_H"; then
|
||||
gl_PREREQ_SYS_H_WINSOCK2
|
||||
fi
|
||||
AC_SUBST([SYS_SOCKET_H])
|
||||
gl_PREREQ_SYS_H_WINSOCK2
|
||||
|
||||
dnl Check for declarations of anything we want to poison if the
|
||||
dnl corresponding gnulib module is not in use.
|
||||
|
@ -134,6 +126,8 @@ AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# sys_stat_h.m4 serial 22 -*- Autoconf -*-
|
||||
# sys_stat_h.m4 serial 23 -*- Autoconf -*-
|
||||
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -39,6 +39,8 @@ AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
|
||||
|
|
38
m4/time_h.m4
38
m4/time_h.m4
|
@ -23,18 +23,6 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
|
|||
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
|
||||
[
|
||||
dnl If another module says to replace or to not replace, do that.
|
||||
dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
|
||||
dnl this lets maintainers check for portability.
|
||||
REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
|
||||
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
|
||||
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
|
||||
REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
|
||||
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
|
||||
])
|
||||
|
||||
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
|
||||
dnl in time.h or sys/time.h.
|
||||
|
||||
|
@ -72,3 +60,29 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
|
|||
AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
|
||||
AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_TIME_MODULE_INDICATOR],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME])
|
||||
GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP])
|
||||
GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
|
||||
GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
|
||||
GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
|
||||
dnl If another module says to replace or to not replace, do that.
|
||||
dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
|
||||
dnl this lets maintainers check for portability.
|
||||
REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
|
||||
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
|
||||
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
|
||||
REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
|
||||
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
|
||||
])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# unistd_h.m4 serial 39
|
||||
# unistd_h.m4 serial 40
|
||||
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -47,6 +47,8 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# warn-on-use.m4 serial 1
|
||||
# warn-on-use.m4 serial 2
|
||||
dnl Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -30,12 +30,12 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
|
|||
for gl_func in m4_flatten([$2]); do
|
||||
AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
|
||||
AC_CACHE_CHECK([whether $gl_func is declared without a macro],
|
||||
[gl_Symbol],
|
||||
gl_Symbol,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
|
||||
[@%:@undef $gl_func
|
||||
(void) $gl_func;])],
|
||||
[AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
|
||||
AS_VAR_IF([gl_Symbol], [yes],
|
||||
[AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
|
||||
AS_VAR_IF(gl_Symbol, [yes],
|
||||
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
|
||||
dnl shortcut - if the raw declaration exists, then set a cache
|
||||
dnl variable to allow skipping any later AC_CHECK_DECL efforts
|
||||
|
|
|
@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
|
|||
|
||||
dnl Written by Eric Blake.
|
||||
|
||||
# wchar.m4 serial 31
|
||||
# wchar_h.m4 serial 32
|
||||
|
||||
AC_DEFUN([gl_WCHAR_H],
|
||||
[
|
||||
|
@ -108,6 +108,8 @@ AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
|
|||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
|
||||
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_WCHAR_H_DEFAULTS],
|
Loading…
Add table
Add a link
Reference in a new issue