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

Update Gnulib to v0.1-1157-gb03f418.

This commit is contained in:
Andy Wingo 2017-03-01 09:20:27 +01:00
parent d475b7a946
commit fcf8716d60
397 changed files with 1995 additions and 1095 deletions

View file

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

View file

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

View file

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

View file

@ -2,9 +2,9 @@
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
scriptversion=2016-05-20.09
scriptversion=2016-12-31.18
# Copyright 2003-2016 Free Software Foundation, Inc.
# Copyright 2003-2017 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -72,7 +72,7 @@ texarg="-t @finalout"
version="gendocs.sh $scriptversion
Copyright 2016 Free Software Foundation, Inc.
Copyright 2017 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."

View file

@ -1,8 +1,8 @@
#!/bin/sh
# Print a version string.
scriptversion=2016-05-08.18; # UTC
scriptversion=2017-01-09.19; # UTC
# Copyright (C) 2007-2016 Free Software Foundation, Inc.
# Copyright (C) 2007-2017 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View file

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

View file

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

View file

@ -3,7 +3,7 @@
scriptversion=2016-01-11.22; # UTC
# Copyright (C) 2004-2016 Free Software Foundation, Inc.
# Copyright (C) 2004-2017 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View file

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

View file

@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
Copyright (C) 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2010-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@ -17,6 +17,15 @@
#ifndef _GL_CXXDEFS_H
#define _GL_CXXDEFS_H
/* Begin/end the GNULIB_NAMESPACE namespace. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
# define _GL_END_NAMESPACE }
#else
# define _GL_BEGIN_NAMESPACE
# define _GL_END_NAMESPACE
#endif
/* The three most frequent use cases of these macros are:
* For providing a substitute for a function that is missing on some
@ -111,14 +120,25 @@
that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
Example:
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
*/
Wrapping rpl_func in an object with an inline conversion operator
avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
actually used in the program. */
#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; \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return ::rpl_func; \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -135,8 +155,15 @@
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
rettype (*const func) parameters = \
reinterpret_cast<rettype(*)parameters>(::rpl_func); \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return reinterpret_cast<type>(::rpl_func); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -150,18 +177,23 @@
is defined.
Example:
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
*/
Wrapping func in an object with an inline conversion operator
avoids a reference to func unless GNULIB_NAMESPACE::func is
actually used in the program. */
#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; \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return ::func; \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -178,8 +210,15 @@
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = \
reinterpret_cast<rettype(*)parameters>(::func); \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return reinterpret_cast<type>(::func); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
@ -202,9 +241,15 @@
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
namespace GNULIB_NAMESPACE \
{ \
static rettype (*func) parameters = \
reinterpret_cast<rettype(*)parameters>( \
(rettype2(*)parameters2)(::func)); \
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
\
inline operator type () const \
{ \
return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else

View file

@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
Copyright (C) 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2010-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published

View file

@ -4,13 +4,13 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"'
# Detect instances of "if (p) free (p);".
# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
my $VERSION = '2016-01-12 23:13'; # UTC
my $VERSION = '2016-08-01 17:47'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
# Copyright (C) 2008-2016 Free Software Foundation, Inc.
# Copyright (C) 2008-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -129,6 +129,9 @@ sub is_NULL ($)
$err = EXIT_ERROR, next;
while (defined (my $line = <FH>))
{
# Skip non-matching lines early to save time
$line =~ /\bif\b/
or next;
while ($line =~
/\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
# 1 2 3

View file

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

View file

@ -77,7 +77,7 @@ the FSF. Broken links and other corrections or suggestions can be sent
to <a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
</div>
<p>Copyright &copy; 2016 Free Software Foundation, Inc.</p>
<p>Copyright &copy; 2017 Free Software Foundation, Inc.</p>
<p>This page is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative

View file

@ -80,7 +80,7 @@ the FSF. Broken links and other corrections or suggestions can be sent
to <a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
</div>
<p>Copyright &copy; 2016 Free Software Foundation, Inc.</p>
<p>Copyright &copy; 2017 Free Software Foundation, Inc.</p>
<p>This page is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative

View file

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -63,6 +63,7 @@ libgnu_la_LDFLAGS += $(ISNANL_LIBM)
libgnu_la_LDFLAGS += $(LDEXP_LIBM)
libgnu_la_LDFLAGS += $(LIBSOCKET)
libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
libgnu_la_LDFLAGS += $(LIB_GETLOGIN)
libgnu_la_LDFLAGS += $(LIB_POLL)
libgnu_la_LDFLAGS += $(LIB_SELECT)
libgnu_la_LDFLAGS += $(LOG1P_LIBM)
@ -516,6 +517,15 @@ EXTRA_DIST += fd-hook.h
## end gnulib module fd-hook
## begin gnulib module flexmember
if gl_GNULIB_ENABLED_flexmember
endif
EXTRA_DIST += flexmember.h
## end gnulib module flexmember
## begin gnulib module float
BUILT_SOURCES += $(FLOAT_H)
@ -960,6 +970,34 @@ EXTRA_DIST += libunistring.valgrind
## end gnulib module libunistring
## begin gnulib module limits-h
BUILT_SOURCES += $(LIMITS_H)
# We need the following in order to create <limits.h> when the system
# doesn't have one that is compatible with GNU.
if GL_GENERATE_LIMITS_H
limits.h: limits.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
< $(srcdir)/limits.in.h; \
} > $@-t && \
mv $@-t $@
else
limits.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += limits.h limits.h-t
EXTRA_DIST += limits.in.h
## end gnulib module limits-h
## begin gnulib module link
@ -1368,11 +1406,18 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
| \
sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \
-e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \
-e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \
-e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \
-e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
-e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \
-e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
-e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
-e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
-e 's|@''REPLACE_COSF''@|$(REPLACE_COSF)|g' \
-e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \
-e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|g' \
-e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \
-e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \
-e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \
@ -1428,7 +1473,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
-e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \
-e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
-e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
-e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
-e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \
-e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \
-e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
@ -2172,6 +2222,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@ -2193,6 +2244,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
< $(srcdir)/stdint.in.h; \
} > $@-t && \
mv $@-t $@
@ -2397,6 +2449,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
-e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
@ -3058,7 +3111,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
@ -3080,6 +3132,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
@ -3200,6 +3253,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
@ -3333,6 +3387,7 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
@ -3367,6 +3422,13 @@ EXTRA_libgnu_la_SOURCES += write.c
## end gnulib module write
## begin gnulib module xalloc-oversized
EXTRA_DIST += xalloc-oversized.h
## end gnulib module xalloc-oversized
## begin gnulib module xsize
if gl_GNULIB_ENABLED_xsize

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2017 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
@ -51,6 +51,8 @@ extern "C"
void *_alloca (unsigned short);
# pragma intrinsic (_alloca)
# define alloca _alloca
# elif defined __MVS__
# include <stdlib.h>
# else
# include <stddef.h>
# ifdef __cplusplus

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* Run-time assert-like macros.
Copyright (C) 2014-2016 Free Software Foundation, Inc.
Copyright (C) 2014-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2017 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Binary mode I/O.
Copyright (C) 2001, 2003, 2005, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2001, 2003, 2005, 2008-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

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

View file

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

View file

@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
Copyright (C) 2000-2003, 2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2006, 2008-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -115,16 +115,16 @@ extern "C" {
/* Cases for lowercase hex letters, and lowercase letters, all offset by N. */
#define _C_CTYPE_LOWER_A_THRU_F_N(n) \
case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
case 'e' + (n): case 'f' + (n)
#define _C_CTYPE_LOWER_N(n) \
_C_CTYPE_LOWER_A_THRU_F_N(n): \
case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \
case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \
case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \
case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \
case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n)
#define _C_CTYPE_LOWER_A_THRU_F_N(N) \
case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
case 'e' + (N): case 'f' + (N)
#define _C_CTYPE_LOWER_N(N) \
_C_CTYPE_LOWER_A_THRU_F_N(N): \
case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
/* Cases for hex letters, digits, lower, punct, and upper. */

View file

@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2016 Free Software
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2017 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2016 Free Software Foundation, Inc.
Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -83,7 +83,23 @@
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
#endif
/* Define this independently so that stdint.h is not a prerequisite. */
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
#if !FUNC_REALPATH_WORKS || defined _LIBC
static void
alloc_failed (void)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Avoid errno problem without using the malloc or realloc modules; see:
http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
#endif
}
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any ".", ".." components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
@ -135,9 +151,7 @@ __realpath (const char *name, char *resolved)
rpath = malloc (path_max);
if (rpath == NULL)
{
/* It's easier to set errno to ENOMEM than to rely on the
'malloc-posix' gnulib module. */
errno = ENOMEM;
alloc_failed ();
return NULL;
}
}
@ -185,7 +199,6 @@ __realpath (const char *name, char *resolved)
#else
struct stat st;
#endif
int n;
/* Skip sequence of multiple path-separators. */
while (ISSLASH (*start))
@ -238,9 +251,7 @@ __realpath (const char *name, char *resolved)
new_rpath = (char *) realloc (rpath, new_size);
if (new_rpath == NULL)
{
/* It's easier to set errno to ENOMEM than to rely on the
'realloc-posix' gnulib module. */
errno = ENOMEM;
alloc_failed ();
goto error;
}
rpath = new_rpath;
@ -268,6 +279,7 @@ __realpath (const char *name, char *resolved)
{
char *buf;
size_t len;
ssize_t n;
if (++num_links > MAXSYMLINKS)
{
@ -278,7 +290,7 @@ __realpath (const char *name, char *resolved)
buf = malloca (path_max);
if (!buf)
{
errno = ENOMEM;
__set_errno (ENOMEM);
goto error;
}
@ -287,7 +299,7 @@ __realpath (const char *name, char *resolved)
{
int saved_errno = errno;
freea (buf);
errno = saved_errno;
__set_errno (saved_errno);
goto error;
}
buf[n] = '\0';
@ -298,13 +310,14 @@ __realpath (const char *name, char *resolved)
if (!extra_buf)
{
freea (buf);
errno = ENOMEM;
__set_errno (ENOMEM);
goto error;
}
}
len = strlen (end);
if ((long int) (n + len) >= path_max)
/* Check that n + len + 1 doesn't overflow and is <= path_max. */
if (n >= SIZE_MAX - len || n + len >= path_max)
{
freea (buf);
__set_errno (ENAMETOOLONG);
@ -370,7 +383,7 @@ error:
freea (extra_buf);
if (resolved == NULL)
free (rpath);
errno = saved_errno;
__set_errno (saved_errno);
}
return NULL;
}

View file

@ -1,5 +1,5 @@
/* Round towards positive infinity.
Copyright (C) 2007, 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* close replacement.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

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

View file

@ -1,5 +1,5 @@
/* Copy sign into another 'double' number.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
Copyright (C) 2006-2016 Free Software Foundation, Inc.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
Copyright (C) 2001, 2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2001, 2006, 2008-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2017 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation,
Copyright (C) 1998, 2001, 2003-2006, 2009-2017 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2001, 2004-2006, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1999, 2004-2007, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2016 Free Software Foundation, Inc.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

42
lib/flexmember.h Normal file
View file

@ -0,0 +1,42 @@
/* Sizes of structs with flexible array members.
Copyright 2016-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
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 Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Paul Eggert. */
#include <stddef.h>
/* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
On older platforms without _Alignof, use a pessimistic bound that is
safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
On newer platforms, use _Alignof to get a tighter bound. */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
# define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1))
#else
# define FLEXALIGNOF(type) _Alignof (type)
#endif
/* Upper bound on the size of a struct of type TYPE with a flexible
array member named MEMBER that is followed by N bytes of other data.
This is not simply sizeof (TYPE) + N, since it may require
alignment on unusually picky C11 platforms, and
FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.
Yield a value less than N if and only if arithmetic overflow occurs. */
#define FLEXSIZEOF(type, member, n) \
((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \
& ~ (FLEXALIGNOF (type) - 1))

View file

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

View file

@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View file

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

View file

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

View file

@ -1,5 +1,5 @@
/* Round towards negative infinity.
Copyright (C) 2007, 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* fstat() replacement.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2016 Free Software
/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2017 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.

View file

@ -1,5 +1,5 @@
/* Get address information (partial implementation).
Copyright (C) 1997, 2001-2002, 2004-2016 Free Software Foundation, Inc.
Copyright (C) 1997, 2001-2002, 2004-2017 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Provide a working getlogin for systems which lack it.
Copyright (C) 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2010-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
Copyright (C) 2001-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 Free Software
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2017 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
Copyright (C) 1999, 2003-2004, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1999, 2003-2004, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
Copyright (C) 2001-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@ -47,12 +47,16 @@
/* Minimum and maximum values for integer types and expressions. */
/* The width in bits of the integer type or expression T.
Padding bits are not supported; this is checked at compile-time below. */
#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
/* The maximum and minimum values for the integer type T. */
#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
#define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
: ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
/* The maximum and minimum values for the type of the expression E,
after integer promotion. E should not have side effects. */
@ -65,7 +69,13 @@
? _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_NEGATE_CONVERT (e, 1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
(((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
(((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
/* Work around OpenVMS incompatibility with C99. */
#if !defined LLONG_MAX && defined __INT64_MAX
# define LLONG_MAX __INT64_MAX
# define LLONG_MIN __INT64_MIN
#endif
/* This include file assumes that signed types are two's complement without
padding bits; the above macros have undefined behavior otherwise.
@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX);
verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
#endif
/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */
#ifdef UINT_WIDTH
verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
#endif
/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
#if (2 <= __GNUC__ \
|| (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
|| (0x5110 <= __SUNPRO_C && !__STDC__))
# define _GL_HAVE___TYPEOF__ 1
#else
@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
signed, this macro may overestimate the true bound by one byte when
applied to unsigned types of size 2, 4, 16, ... bytes. */
#define INT_STRLEN_BOUND(t) \
(INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
- _GL_SIGNED_TYPE_OR_EXPR (t)) \
(INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ _GL_SIGNED_TYPE_OR_EXPR (t))
/* Bound on buffer size needed to represent an integer type or expression T,
@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
/* True if __builtin_add_overflow (A, B, P) works when P is null. */
#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__)
/* True if __builtin_add_overflow_p (A, B, C) works. */
#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
that the result (e.g., A + B) has that type. */
#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
# define _GL_ADD_OVERFLOW(a, b, min, max)
__builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
__builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
__builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
#if _GL_HAS_BUILTIN_OVERFLOW_P
# define _GL_ADD_OVERFLOW(a, b, min, max) \
__builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
__builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
__builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
#else
# define _GL_ADD_OVERFLOW(a, b, min, max) \
((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
_GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
#define INT_SUBTRACT_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
#if _GL_HAS_BUILTIN_OVERFLOW_P
# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
#else
# define INT_NEGATE_OVERFLOW(a) \
@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
#define INT_MULTIPLY_WRAPV(a, b, r) \
_GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
#ifndef __has_builtin
# define __has_builtin(x) 0
#endif
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
https://llvm.org/bugs/show_bug.cgi?id=25390
@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
the operation. BUILTIN is the builtin operation, and OVERFLOW the
overflow predicate. Return 1 if the result overflows. See above
for restrictions. */
#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
#if _GL_HAS_BUILTIN_OVERFLOW
# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
# else
# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
long int, LONG_MIN, LONG_MAX))
long int, LONG_MIN, LONG_MAX)
# endif
#endif

View file

@ -1,5 +1,5 @@
/* Test for finite value (zero, subnormal, or normal, and not infinite or NaN).
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for positive or negative infinity.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View file

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

63
lib/limits.in.h Normal file
View file

@ -0,0 +1,63 @@
/* A GNU-like <limits.h>.
Copyright 2016-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2, 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 Lesser General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_LIMITS_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
#ifndef _@GUARD_PREFIX@_LIMITS_H
#define _@GUARD_PREFIX@_LIMITS_H
/* The number of usable bits in an unsigned or signed integer type
with minimum value MIN and maximum value MAX, as an int expression
suitable in #if. Cover all known practical hosts. This
implementation exploits the fact that MAX is 1 less than a power of
2, and merely counts the number of 1 bits in MAX; "COBn" means
"count the number of 1 bits in the low-order n bits"). */
#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
/* Macros specified by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
&& (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
#endif /* _@GUARD_PREFIX@_LIMITS_H */
#endif /* _@GUARD_PREFIX@_LIMITS_H */

View file

@ -1,6 +1,6 @@
/* Emulate link on platforms that lack it, namely native Windows platforms.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2009-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2006, 2008-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -507,7 +507,7 @@ locale_charset (void)
current_locale = setlocale (LC_CTYPE, NULL);
pdot = strrchr (current_locale, '.');
if (pdot)
if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
sprintf (buf, "CP%s", pdot + 1);
else
{

View file

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

View file

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

View file

@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
Copyright (C) 2012-2016 Free Software Foundation, Inc.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

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

View file

@ -1,5 +1,5 @@
/* Natural logarithm of 1 plus argument.
Copyright (C) 2012-2016 Free Software Foundation, Inc.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

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