Commit 0a1be09f authored by Markus Steinborn's avatar Markus Steinborn Committed by Bernhard Link

Update gnulib, import signal

parent 3bed66de
2011-05-05 Markus Steinborn <gnugv_maintainer@yahoo.de>
* m4/* lib/* imported signal from gnulib.
Note: I ran "sed -i 's/<config.h>/<ac_config.h>/g' lib/*" after the
import.
I imported from revision 9dba31e113c15a07103d04980a8f39bcba5f7795
of gnulib.
2011-05-04 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/callbacks.c(cb_presentation): Drop typedef sighandler_t again,
gnulib update (see 2011-05-05) will do the job.
2011-05-04 Bernhard R. Link <brlink@debian.org>
* src/Makefile.am: Improved dependencies and minor improvements.
* src/gv-i18n.pl: Use src/nls/LANGUAGES for getting list of translations
available.
2011-05-02 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/callbacks.c(cb_presentation): Renamed typedef sighandler_t to
mysighandler_t (incomplete).
2011-04-29 Markus Steinborn <gnugv_maintainer@yahoo.de>
* src/callbacks.c(cb_presentation): Readd typedef sighandler_t.
2011-04-29 Markus Steinborn <gnugv_maintainer@yahoo.de>
* configure.ac, src/versionp.h: Bumped version to 3.7.2.90
......
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009-2011 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
......@@ -9,7 +9,7 @@
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.
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/>. */
......
/* C++ compatible function declaration macros.
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2010-2011 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
......@@ -9,7 +9,7 @@
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.
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/>. */
......
This diff is collapsed.
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
......
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2010 Free Software Foundation, Inc.
Copyright (C) 1996-2011 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
......@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
# define _GL_USE_STDLIB_ALLOC 1
# include <ac_config.h>
#endif
......@@ -51,6 +52,12 @@
# include "pathmax.h"
# include "malloca.h"
# if HAVE_GETCWD
# if IN_RELOCWRAPPER
/* When building the relocatable program wrapper, use the system's getcwd
function, not the gnulib override, otherwise we would get a link error.
*/
# undef getcwd
# endif
# ifdef VMS
/* We want the directory in Unix syntax, not in VMS syntax. */
# define __getcwd(buf, max) getcwd (buf, max, 0)
......
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2011 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 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/>.
From Paul Eggert and Jim Meyering. */
#ifndef _DOSNAME_H
#define _DOSNAME_H
#if (defined _WIN32 || defined __WIN32__ || \
defined __MSDOS__ || defined __CYGWIN__ || \
defined __EMX__ || defined __DJGPP__)
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \
<= 'z' - 'a')
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
(_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
# ifndef __CYGWIN__
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
# endif
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# define ISSLASH(C) ((C) == '/')
#endif
#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
#endif
#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# else
# define IS_ABSOLUTE_FILE_NAME(F) \
(ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
#endif
#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
#endif /* DOSNAME_H_ */
/* A POSIX-like <errno.h>.
Copyright (C) 2008-2010 Free Software Foundation, Inc.
Copyright (C) 2008-2011 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
......@@ -21,6 +21,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
......@@ -98,6 +99,7 @@
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
Likewise, on NonStop Kernel, EDQUOT is not defined.
Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
......@@ -150,6 +152,11 @@
# define GNULIB_defined_ESTALE 1
# endif
# ifndef EDQUOT
# define EDQUOT 2010
# define GNULIB_defined_EDQUOT 1
# endif
# ifndef ECANCELED
# define ECANCELED 2008
# define GNULIB_defined_ECANCELED 1
......
......@@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2010 Free Software
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2010 Free Software
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -21,6 +21,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. We must
also inform the replacement unistd.h to not recursively use
......@@ -180,6 +181,7 @@ extern int optopt;
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
# if !GNULIB_defined_struct_option
struct option
{
const char *name;
......@@ -189,6 +191,8 @@ struct option
int *flag;
int val;
};
# define GNULIB_defined_struct_option 1
# endif
/* Names for the values of the `has_arg' field of `struct option'. */
......
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
1998, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 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
......
/* Internal declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2010 Free Software
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......@@ -108,7 +108,7 @@ struct _getopt_data
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
# endif
#endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their
......
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
......@@ -54,7 +54,7 @@
it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include <cstdlib>
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
# include <libintl.h>
# endif
#endif
......@@ -93,6 +93,12 @@
#endif
/* Prefer gnulib's setlocale override over libintl's setlocale override. */
#ifdef GNULIB_defined_setlocale
# undef setlocale
# define setlocale rpl_setlocale
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
......
/* Provide gettimeofday for systems that don't have it or for which it's broken.
Copyright (C) 2001-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-2007, 2009-2011 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
......@@ -40,10 +40,10 @@
static struct tm tm_zero_buffer;
static struct tm *localtime_buffer_addr = &tm_zero_buffer;
#undef localtime
# undef localtime
extern struct tm *localtime (time_t const *);
#undef gmtime
# undef gmtime
extern struct tm *gmtime (time_t const *);
/* This is a wrapper for localtime. It is used only on systems for which
......@@ -79,7 +79,7 @@ rpl_gmtime (time_t const *timep)
#if TZSET_CLOBBERS_LOCALTIME
#undef tzset
# undef tzset
extern void tzset (void);
/* This is a wrapper for tzset, for systems on which tzset may clobber
......
/* Copyright (C) 2006-2010 Free Software Foundation, Inc.
/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
......@@ -23,6 +23,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* Include the original <inttypes.h> if it exists, and if this file
has not been included yet or if this file includes gnulib stdint.h
......@@ -1059,7 +1060,10 @@ _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
#if @GNULIB_IMAXDIV@
# if !@HAVE_DECL_IMAXDIV@
# if !GNULIB_defined_imaxdiv_t
typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
# define GNULIB_defined_imaxdiv_t 1
# endif
extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
# endif
#elif defined GNULIB_POSIXCHECK
......@@ -1072,6 +1076,7 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
#if @GNULIB_STRTOIMAX@
# if !@HAVE_DECL_STRTOIMAX@
# undef strtoimax
extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
......@@ -1084,6 +1089,7 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
#if @GNULIB_STRTOUMAX@
# if !@HAVE_DECL_STRTOUMAX@
# undef strtoumax
extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
......
/* Work around a bug of lstat on some systems
Copyright (C) 1997-2006, 2008-2010 Free Software Foundation, Inc.
Copyright (C) 1997-2006, 2008-2011 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
......
/* Safe automatic memory allocation.
Copyright (C) 2003, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
......@@ -16,11 +16,14 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#define _GL_USE_STDLIB_ALLOC 1
#include <ac_config.h>
/* Specification. */
#include "malloca.h"
#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
mmalloca() and freea() in the other case are not critical, because they
......@@ -50,8 +53,7 @@ struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
#define HEADER_SIZE \
(((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
/* Verify that HEADER_SIZE == sizeof (struct header). */
typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1];
verify (HEADER_SIZE == sizeof (struct header));
/* We make the hash table quite big, so that during lookups the probability
of empty hash buckets is quite high. There is no need to make the hash
table resizable, because when the hash table gets filled so much that the
......
/* Safe automatic memory allocation.
Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
......
/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2010 Free Software
/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
......
/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2010 Free Software
/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2011 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
......@@ -38,7 +38,11 @@
/* Generate a unique temporary file name from XTEMPLATE.
The last six characters of XTEMPLATE must be "XXXXXX";
they are replaced with a string that makes the file name unique.
Then open the file and return a fd. */
Then open the file and return a fd.
If you are creating temporary files which will later be removed,
consider using the clean-temp module, which avoids several pitfalls
of using mkstemp directly. */
int
mkstemp (char *xtemplate)
{
......
/* Define PATH_MAX somehow. Requires sys/types.h.
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2010 Free Software
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
......
/* Stub for readlink().
Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 2003-2007, 2009-2011 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
......
This diff is collapsed.
/* Work around platform bugs in stat.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009-2011 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
......@@ -37,6 +37,7 @@ orig_stat (const char *filename, struct stat *buf)
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include "dosname.h"
/* Store information about NAME into ST. Work around bugs with
trailing slashes. Mingw has other bugs (such as st_ino always
......
/* Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
......
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009-2011 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
......@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#if defined __need_wchar_t || defined __need_size_t \
|| defined __need_ptrdiff_t || defined __need_NULL \
......
/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
......@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* When including a system file that in turn includes <inttypes.h>,
use the system <inttypes.h>, not our substitute. This avoids
......@@ -107,6 +108,8 @@
warnings in the signed case. */ \
((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types
/* 7.18.1.1. Exact-width integer types */
/* Here we assume a standard architecture where the hardware integer
......@@ -133,40 +136,54 @@ typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t
/* If the system defines INT64_MAX, assume int64_t works. That way,
if the underlying platform defines int64_t to be a 64-bit long long
int, the code below won't mistakenly define it to be a 64-bit long
int, which would mess up C++ name mangling. We must use #ifdef
rather than #if, to avoid an error with HP-UX 10.20 cc. */
#ifdef INT64_MAX
# define GL_INT64_T
#else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
#if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
# if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
typedef long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
#elif defined _MSC_VER
# undef int64_t
# define int64_t gl_int64_t
# define GL_INT64_T
# elif defined _MSC_VER
# undef int64_t
typedef __int64 gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
#elif @HAVE_LONG_LONG_INT@
# undef int64_t
# define int64_t gl_int64_t
# define GL_INT64_T
# elif @HAVE_LONG_LONG_INT@
# undef int64_t
typedef long long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
# define int64_t gl_int64_t
# define GL_INT64_T
# endif
#endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
typedef unsigned long int gl_uint64_t;
# define uint64_t gl_uint64_t
#ifdef UINT64_MAX
# define GL_UINT64_T
#elif defined _MSC_VER
# undef uint64_t
#else
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
typedef unsigned long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif defined _MSC_VER
# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
#elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
typedef unsigned long long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# endif
#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
......@@ -278,7 +295,11 @@ typedef unsigned long int gl_uintmax_t;
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
to be found in the autoconf macros. */
typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
? 1 : -1];
#define GNULIB_defined_stdint_types 1
#endif /* !GNULIB_defined_stdint_types */
/* 7.18.2. Limits of specified-width integer types */
......@@ -310,17 +331,14 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
#undef INT64_MIN
#undef INT64_MAX
#ifdef GL_INT64_T
#if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
# define INT64_MIN (- INTMAX_C (1) << 63)
# define INT64_MAX INTMAX_C (9223372036854775807)
#endif
#undef UINT64_MAX
#ifdef GL_UINT64_T
#if defined GL_UINT64_T && ! defined UINT64_MAX
# define UINT64_MAX UINTMAX_C (18446744073709551615)
#endif
......@@ -475,10 +493,16 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
/* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
This include is not on the top, above, because on OSF/1 4.0 we have a
sequence of nested includes
<wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
# include <stddef.h>
# include <stdio.h>
# include <time.h>
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# include <wchar.h>
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
......
/* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
Copyright (C) 1995, 2001-2004, 2006-2011 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
......@@ -18,6 +18,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#if defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */
......@@ -38,23 +39,33 @@
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */
#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
# include <sys/wait.h>
#endif
/* Solaris declares getloadavg() in <sys/loadavg.h>. */
#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
# include <sys/loadavg.h>
#endif
#if @GNULIB_RANDOM_R@
/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
from <stdlib.h> if _REENTRANT is defined. Include it always. */
#if @HAVE_RANDOM_H@
# include <random.h>
#endif
from <stdlib.h> if _REENTRANT is defined. Include it whenever we need
'struct random_data'. */
# if @HAVE_RANDOM_H@
# include <random.h>
# endif
#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
|| defined GNULIB_POSIXCHECK
# include <stdint.h>
#endif
# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@
# include <stdint.h>
# endif
#if !@HAVE_STRUCT_RANDOM_DATA@
# if !@HAVE_STRUCT_RANDOM_DATA@
/* Define 'struct random_data'.
But allow multiple gnulib generated <stdlib.h> replacements to coexist. */
# if !GNULIB_defined_struct_random_data
struct random_data
{
int32_t *fptr; /* Front pointer. */
......@@ -65,15 +76,25 @@ struct random_data
int rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */
};
# define GNULIB_defined_struct_random_data 1
# endif
# endif
#endif
#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
/* On MacOS X 10.5, only <unistd.h> declares mkstemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
#endif
#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
#else
# define _GL_ATTRIBUTE_NORETURN
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
......@@ -95,6 +116,23 @@ struct random_data
#endif
#if @GNULIB__EXIT@
/* Terminate the current process with the given return code, without running
the 'atexit' handlers. */
# if !@HAVE__EXIT@
_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
# endif
_GL_CXXALIAS_SYS (_Exit, void, (int status));
_GL_CXXALIASWARN (_Exit);
#elif defined GNULIB_POSIXCHECK
# undef _Exit
# if HAVE_RAW_DECL__EXIT
_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
"use gnulib module _Exit for portability");
# endif
#endif
#if @GNULIB_ATOLL@
/* Parse a signed decimal integer.
Returns the value of the integer. Errors are not detected. */
......@@ -112,7 +150,7 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - "
#endif
#if @GNULIB_CALLOC_POSIX@
# if !@HAVE_CALLOC_POSIX@
# if @REPLACE_CALLOC@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef calloc
# define calloc rpl_calloc
......@@ -149,7 +187,8 @@ _GL_CXXALIASWARN (canonicalize_file_name);
#elif defined GNULIB_POSIXCHECK
# undef canonicalize_file_name
# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
_GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - "
_GL_WARN_ON_USE (canonicalize_file_name,
"canonicalize_file_name is unportable - "
"use gnulib module canonicalize-lgpl for portability");
# endif
#endif
......@@ -217,9 +256,14 @@ _GL_WARN_ON_USE (ptsname, "grantpt is not portable - "