gnutar-455

This commit is contained in:
Ariel Abreu 2020-08-02 14:51:34 -04:00
parent 889ca47898
commit b5f6b4e693
No known key found for this signature in database
GPG Key ID: ECF8C2B9E8AD3E6B
19 changed files with 42 additions and 5011 deletions

View File

@ -7,7 +7,7 @@ Project = gnutar
UserType = Administrator
ToolType = Commands
Extra_Configure_Flags = --program-prefix=gnu --includedir=/usr/local/include
Extra_CC_Flags = -mdynamic-no-pic
Extra_CC_Flags = -mdynamic-no-pic -D_FORTIFY_SOURCE=0
GnuAfterInstall = remove-junk install-symlink install-plist
Install_Prefix = /usr/local
@ -26,7 +26,7 @@ AEP_ExtractDir = $(AEP_ProjVers)
AEP_Patches = Makefile.in.diff tar-1.17-buildfix.diff \
EA.diff preallocate.diff quarantine.diff \
PR5405409.diff PR5605786.diff PR6450027.diff \
PR7691662.diff
PR7691662.diff PR46500656.diff
ifeq ($(suffix $(AEP_Filename)),.bz2)
AEP_ExtractOption = j

View File

@ -1,26 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>OpenSourceProject</key>
<string>tar</string>
<key>OpenSourceVersion</key>
<string>1.17</string>
<key>OpenSourceWebsiteURL</key>
<string>http://www.gnu.org/software/tar/</string>
<key>OpenSourceURL</key>
<string>http://ftp.gnu.org/gnu/tar/tar-1.17.tar.bz2</string>
<key>OpenSourceSHA1</key>
<string>97f4b67bf88dba1d451a1ec375f18cfaa3c9f36f</string>
<key>OpenSourceImportDate</key>
<string>2008-08-18</string>
<key>OpenSourceModifications</key>
<array>
<string>EA support.</string>
</array>
<key>OpenSourceLicense</key>
<string>GPL</string>
<key>OpenSourceLicenseFile</key>
<string>gnutar.txt</string>
</dict>
<dict>
<key>OpenSourceProject</key>
<string>tar</string>
<key>OpenSourceVersion</key>
<string>1.17</string>
<key>OpenSourceWebsiteURL</key>
<string>http://www.gnu.org/software/tar/</string>
<key>OpenSourceURL</key>
<string>http://ftp.gnu.org/gnu/tar/tar-1.17.tar.bz2</string>
<key>OpenSourceSHA1</key>
<string>97f4b67bf88dba1d451a1ec375f18cfaa3c9f36f</string>
<key>OpenSourceImportDate</key>
<string>2008-08-18</string>
<key>OpenSourceModifications</key>
<array>
<string>EA support.</string>
<string>&lt;rdar://problem/46500656&gt; Format string misuse in gnutar [-Wformat-security]</string>
</array>
<key>OpenSourceLicense</key>
<string>GPL</string>
<key>OpenSourceLicenseFile</key>
<string>gnutar.txt</string>
</dict>
</array>
</plist>

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2007 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 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
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
#ifndef _GL_ALLOCA_H
#define _GL_ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns.
Use of alloca should be avoided:
- inside arguments of function calls - undefined behaviour,
- in inline functions - the allocation may actually last until the
calling function returns,
- for huge N (say, N >= 65536) - you never know how large (or small)
the stack is, and when the stack cannot fulfill the memory allocation
request, the program just crashes.
*/
#ifndef alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#endif /* _GL_ALLOCA_H */

View File

@ -155,8 +155,8 @@ argp_version_parser (int key, char *arg, struct argp_state *state)
else if (argp_program_version)
fprintf (state->out_stream, "%s\n", argp_program_version);
else
__argp_error (state, dgettext (state->root_argp->argp_domain,
"(PROGRAM ERROR) No version known!?"));
__argp_error (state, "%s", dgettext (state->root_argp->argp_domain,
"(PROGRAM ERROR) No version known!?"));
if (! (state->flags & ARGP_NO_EXIT))
exit (0);
break;

View File

@ -1,26 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
#define PREFIX "/usr/local"
#define EXEC_PREFIX "/usr/local"
#define BINDIR "/usr/local/bin"
#define SBINDIR "/usr/local/sbin"
#define LIBEXECDIR "/usr/local/libexec"
#define DATAROOTDIR "/usr/local/share"
#define DATADIR "/usr/local/share"
#define SYSCONFDIR "/usr/local/etc"
#define SHAREDSTATEDIR "/usr/local/com"
#define LOCALSTATEDIR "/usr/local/var"
#define INCLUDEDIR "/usr/local/include"
#define OLDINCLUDEDIR "/usr/include"
#define DOCDIR "/usr/local/share/doc/tar"
#define INFODIR "/usr/local/share/info"
#define HTMLDIR "/usr/local/share/doc/tar"
#define DVIDIR "/usr/local/share/doc/tar"
#define PDFDIR "/usr/local/share/doc/tar"
#define PSDIR "/usr/local/share/doc/tar"
#define LIBDIR "/usr/local/lib"
#define LOCALEDIR "/usr/local/share/locale"
#define MANDIR "/usr/local/share/man"
#define PKGDATADIR "/usr/local/share/tar"
#define PKGINCLUDEDIR "/usr/local/include/tar"
#define PKGLIBDIR "/usr/local/lib/tar"
#define PKGLIBEXECDIR "/usr/local/libexec/tar"

View File

@ -1,126 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* written by Paul Eggert */
#ifndef _GL_FCNTL_H
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
/* The include_next requires a split double-inclusion guard. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <fcntl.h>
#else
# include "///usr/include/fcntl.h"
#endif
#ifndef _GL_FCNTL_H
#define _GL_FCNTL_H
/* Declare overridden functions. */
#ifdef __cplusplus
extern "C" {
#endif
#ifdef FCHDIR_REPLACEMENT
# define open rpl_open
extern int open (const char *, int, ...);
#endif
#ifdef __cplusplus
}
#endif
/* Fix up the O_* macros. */
#if !defined O_DIRECT && defined O_DIRECTIO
/* Tru64 spells it `O_DIRECTIO'. */
# define O_DIRECT O_DIRECTIO
#endif
#ifndef O_DIRECT
# define O_DIRECT 0
#endif
#ifndef O_DIRECTORY
# define O_DIRECTORY 0
#endif
#ifndef O_DSYNC
# define O_DSYNC 0
#endif
#ifndef O_NDELAY
# define O_NDELAY 0
#endif
#ifndef O_NOATIME
# define O_NOATIME 0
#endif
#ifndef O_NONBLOCK
# define O_NONBLOCK O_NDELAY
#endif
#ifndef O_NOCTTY
# define O_NOCTTY 0
#endif
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
#endif
#ifndef O_NOLINKS
# define O_NOLINKS 0
#endif
#ifndef O_RSYNC
# define O_RSYNC 0
#endif
#ifndef O_SYNC
# define O_SYNC 0
#endif
/* For systems that distinguish between text and binary I/O.
O_BINARY is usually declared in fcntl.h */
#if !defined O_BINARY && defined _O_BINARY
/* For MSC-compatible compilers. */
# define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT
#endif
#ifdef __BEOS__
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY
# undef O_TEXT
#endif
#ifndef O_BINARY
# define O_BINARY 0
# define O_TEXT 0
#endif
#endif /* _GL_FCNTL_H */
#endif /* _GL_FCNTL_H */

View File

@ -1,66 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
2005, 2007 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
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _FNMATCH_H
#define _FNMATCH_H 1
#ifdef __cplusplus
extern "C" {
#endif
/* We #undef these before defining them because some losing systems
(HP-UX A.08.07 for example) define these in <unistd.h>. */
#undef FNM_PATHNAME
#undef FNM_NOESCAPE
#undef FNM_PERIOD
/* Bits set in the FLAGS argument to `fnmatch'. */
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */
#endif
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
#define FNM_NOMATCH 1
/* This value is returned if the implementation does not support
`fnmatch'. Since this is not the case here it will never be
returned but the conformance test suites still require the symbol
to be defined. */
#ifdef _XOPEN_SOURCE
# define FNM_NOSYS (-1)
#endif
/* Match NAME against the file name pattern PATTERN,
returning zero if it matches, FNM_NOMATCH if not. */
extern int fnmatch (const char *__pattern, const char *__name,
int __flags);
#ifdef __cplusplus
}
#endif
#endif /* fnmatch.h */

View File

@ -1,227 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
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
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GETOPT_H
#ifndef __need_getopt
# define _GETOPT_H 1
#endif
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in this header. When this happens, include the
headers that might declare getopt so that they will not cause
confusion if included after this file. Then systematically rename
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# include <stdlib.h>
# include <stdio.h>
# include <unistd.h>
# undef __need_getopt
# undef getopt
# undef getopt_long
# undef getopt_long_only
# undef optarg
# undef opterr
# undef optind
# undef optopt
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
# define getopt __GETOPT_ID (getopt)
# define getopt_long __GETOPT_ID (getopt_long)
# define getopt_long_only __GETOPT_ID (getopt_long_only)
# define optarg __GETOPT_ID (optarg)
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
#endif
/* Standalone applications get correct prototypes for getopt_long and
getopt_long_only; they declare "char **argv". libc uses prototypes
with "char *const *argv" that are incorrect because getopt_long and
getopt_long_only can permute argv; this is required for backward
compatibility (e.g., for LSB 2.0.1).
This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
but it caused redefinition warnings if both unistd.h and getopt.h were
included, since unistd.h includes getopt.h having previously defined
__need_getopt.
The only place where __getopt_argv_const is used is in definitions
of getopt_long and getopt_long_only below, but these are visible
only if __need_getopt is not defined, so it is quite safe to rewrite
the conditional as follows:
*/
#if !defined __need_getopt
# if defined __GETOPT_PREFIX
# define __getopt_argv_const /* empty */
# else
# define __getopt_argv_const const
# endif
#endif
/* If __GNU_LIBRARY__ is not already defined, either we are being used
standalone, or this is the first header included in the source file.
If we are being used with glibc, we need to include <features.h>, but
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
not defined, include <ctype.h>, which will pull in <features.h> for us
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
doesn't flood the namespace with stuff the way some other headers do.) */
#if !defined __GNU_LIBRARY__
# include <ctype.h>
#endif
#ifndef __THROW
# ifndef __GNUC_PREREQ
# define __GNUC_PREREQ(maj, min) (0)
# endif
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# else
# define __THROW
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of `struct option' terminated by an element containing a name which is
zero.
The field `has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an `int' to
a compiled-in constant, such as set a value from `optarg', set the
option's `flag' field to zero and its `val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
struct option
{
const char *name;
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
/* Names for the values of the `has_arg' field of `struct option'. */
# define no_argument 0
# define required_argument 1
# define optional_argument 2
#endif /* need getopt */
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS.
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, `optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in `optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU `getopt'.
The argument `--' causes premature termination of argument
scanning, explicitly telling `getopt' that there are no more
options.
If OPTS begins with `-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
`getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW;
#ifndef __need_getopt
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW;
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW;
#endif
#ifdef __cplusplus
}
#endif
/* Make sure we later can get all the definitions and declarations. */
#undef __need_getopt
#endif /* getopt.h */

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
#ifndef DEFAULT_RMT_COMMAND
# define DEFAULT_RMT_COMMAND "/usr/local/libexec/rmt"
#endif

View File

@ -1,513 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/*
* ISO C 99 <stdint.h> for platforms that lack it.
* <http://www.opengroup.org/susv3xbd/stdint.h.html>
*/
#ifndef _GL_STDINT_H
/* Get those types that are already defined in other system include
files, so that we can "#define int8_t signed char" below without
worrying about a later system include file containing a "typedef
signed char int8_t;" that will get messed up by our macro. Our
macros should all be consistent with the system versions, except
for the "fast" types and macros, which we recommend against using
in public interfaces due to compiler differences. */
#if 1
# if defined __sgi && ! defined __c99
/* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
with "This header file is to be used only for c99 mode compilations"
diagnostics. */
# define __STDINT_H__
# endif
/* Other systems may have an incomplete or buggy <stdint.h>.
Include it before <inttypes.h>, since any "#include <stdint.h>"
in <inttypes.h> would reinclude us, skipping our contents because
_GL_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
# if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <stdint.h>
# else
# include "///Library/Developer/CommandLineTools/usr/bin/../lib/clang/7.0.0/include/stdint.h"
# endif
#endif
#ifndef _GL_STDINT_H
#define _GL_STDINT_H
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
<sys/types.h> after "///Library/Developer/CommandLineTools/usr/bin/../lib/clang/7.0.0/include/stdint.h". */
#if 1 && ! defined _AIX
# include <sys/types.h>
#endif
/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
#include <limits.h>
#if 1
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
# include <inttypes.h>
# undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
#elif 0
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
# include <sys/inttypes.h>
#endif
#if 0 && ! defined __BIT_TYPES_DEFINED__
/* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
included by <sys/types.h>. */
# include <sys/bitypes.h>
#endif
#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
/* Get WCHAR_MIN, WCHAR_MAX. */
# if ! (defined WCHAR_MIN && defined WCHAR_MAX)
# include <wchar.h>
# endif
#endif
/* Minimum and maximum values for a integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
#define _STDINT_MIN(signed, bits, zero) \
((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
#define _STDINT_MAX(signed, bits, zero) \
((signed) \
? ~ _STDINT_MIN (signed, bits, zero) \
: ((((zero) + 1) << ((bits) ? (bits) - 1 : 0)) - 1) * 2 + 1)
/* 7.18.1.1. Exact-width integer types */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
#undef int8_t
#undef uint8_t
#define int8_t signed char
#define uint8_t unsigned char
#undef int16_t
#undef uint16_t
#define int16_t short int
#define uint16_t unsigned short int
#undef int32_t
#undef uint32_t
#define int32_t int
#define uint32_t unsigned int
/* 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
# define int64_t long int
# define GL_INT64_T
#elif defined _MSC_VER
# undef int64_t
# define int64_t __int64
# define GL_INT64_T
#elif 1
# undef int64_t
# define int64_t long long int
# define GL_INT64_T
#endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
# define uint64_t unsigned long int
# define GL_UINT64_T
#elif defined _MSC_VER
# undef uint64_t
# define uint64_t unsigned __int64
# define GL_UINT64_T
#elif 1
# undef uint64_t
# define uint64_t unsigned long long int
# define GL_UINT64_T
#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
#define _UINT8_T
#define _UINT32_T
#define _UINT64_T
/* 7.18.1.2. Minimum-width integer types */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
#undef int_least8_t
#undef uint_least8_t
#undef int_least16_t
#undef uint_least16_t
#undef int_least32_t
#undef uint_least32_t
#undef int_least64_t
#undef uint_least64_t
#define int_least8_t int8_t
#define uint_least8_t uint8_t
#define int_least16_t int16_t
#define uint_least16_t uint16_t
#define int_least32_t int32_t
#define uint_least32_t uint32_t
#ifdef GL_INT64_T
# define int_least64_t int64_t
#endif
#ifdef GL_UINT64_T
# define uint_least64_t uint64_t
#endif
/* 7.18.1.3. Fastest minimum-width integer types */
/* Note: Other <stdint.h> substitutes may define these types differently.
It is not recommended to use these types in public header files. */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
are taken from the same list of types. Assume that 'long int'
is fast enough for all narrower integers. */
#undef int_fast8_t
#undef uint_fast8_t
#undef int_fast16_t
#undef uint_fast16_t
#undef int_fast32_t
#undef uint_fast32_t
#undef int_fast64_t
#undef uint_fast64_t
#define int_fast8_t long int
#define uint_fast8_t unsigned int_fast8_t
#define int_fast16_t long int
#define uint_fast16_t unsigned int_fast16_t
#define int_fast32_t long int
#define uint_fast32_t unsigned int_fast32_t
#ifdef GL_INT64_T
# define int_fast64_t int64_t
#endif
#ifdef GL_UINT64_T
# define uint_fast64_t uint64_t
#endif
/* 7.18.1.4. Integer types capable of holding object pointers */
#undef intptr_t
#undef uintptr_t
#define intptr_t long int
#define uintptr_t unsigned long int
/* 7.18.1.5. Greatest-width integer types */
/* Note: These types are compiler dependent. It may be unwise to use them in
public header files. */
#undef intmax_t
#if 1 && LONG_MAX >> 30 == 1
# define intmax_t long long int
#elif defined GL_INT64_T
# define intmax_t int64_t
#else
# define intmax_t long int
#endif
#undef uintmax_t
#if 1 && ULONG_MAX >> 31 == 1
# define uintmax_t unsigned long long int
#elif defined GL_UINT64_T
# define uintmax_t uint64_t
#else
# define uintmax_t unsigned long int
#endif
/* 7.18.2. Limits of specified-width integer types */
#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
/* 7.18.2.1. Limits of exact-width integer types */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
#undef INT8_MIN
#undef INT8_MAX
#undef UINT8_MAX
#define INT8_MIN (~ INT8_MAX)
#define INT8_MAX 127
#define UINT8_MAX 255
#undef INT16_MIN
#undef INT16_MAX
#undef UINT16_MAX
#define INT16_MIN (~ INT16_MAX)
#define INT16_MAX 32767
#define UINT16_MAX 65535
#undef INT32_MIN
#undef INT32_MAX
#undef UINT32_MAX
#define INT32_MIN (~ INT32_MAX)
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
#undef INT64_MIN
#undef INT64_MAX
#ifdef GL_INT64_T
/* 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
# define UINT64_MAX UINTMAX_C (18446744073709551615)
#endif
/* 7.18.2.2. Limits of minimum-width integer types */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
#undef INT_LEAST8_MIN
#undef INT_LEAST8_MAX
#undef UINT_LEAST8_MAX
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#undef INT_LEAST16_MIN
#undef INT_LEAST16_MAX
#undef UINT_LEAST16_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#undef INT_LEAST32_MIN
#undef INT_LEAST32_MAX
#undef UINT_LEAST32_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#undef INT_LEAST64_MIN
#undef INT_LEAST64_MAX
#ifdef GL_INT64_T
# define INT_LEAST64_MIN INT64_MIN
# define INT_LEAST64_MAX INT64_MAX
#endif
#undef UINT_LEAST64_MAX
#ifdef GL_UINT64_T
# define UINT_LEAST64_MAX UINT64_MAX
#endif
/* 7.18.2.3. Limits of fastest minimum-width integer types */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
are taken from the same list of types. */
#undef INT_FAST8_MIN
#undef INT_FAST8_MAX
#undef UINT_FAST8_MAX
#define INT_FAST8_MIN LONG_MIN
#define INT_FAST8_MAX LONG_MAX
#define UINT_FAST8_MAX ULONG_MAX
#undef INT_FAST16_MIN
#undef INT_FAST16_MAX
#undef UINT_FAST16_MAX
#define INT_FAST16_MIN LONG_MIN
#define INT_FAST16_MAX LONG_MAX
#define UINT_FAST16_MAX ULONG_MAX
#undef INT_FAST32_MIN
#undef INT_FAST32_MAX
#undef UINT_FAST32_MAX
#define INT_FAST32_MIN LONG_MIN
#define INT_FAST32_MAX LONG_MAX
#define UINT_FAST32_MAX ULONG_MAX
#undef INT_FAST64_MIN
#undef INT_FAST64_MAX
#ifdef GL_INT64_T
# define INT_FAST64_MIN INT64_MIN
# define INT_FAST64_MAX INT64_MAX
#endif
#undef UINT_FAST64_MAX
#ifdef GL_UINT64_T
# define UINT_FAST64_MAX UINT64_MAX
#endif
/* 7.18.2.4. Limits of integer types capable of holding object pointers */
#undef INTPTR_MIN
#undef INTPTR_MAX
#undef UINTPTR_MAX
#define INTPTR_MIN LONG_MIN
#define INTPTR_MAX LONG_MAX
#define UINTPTR_MAX ULONG_MAX
/* 7.18.2.5. Limits of greatest-width integer types */
#undef INTMAX_MIN
#undef INTMAX_MAX
#ifdef INT64_MAX
# define INTMAX_MIN INT64_MIN
# define INTMAX_MAX INT64_MAX
#else
# define INTMAX_MIN INT32_MIN
# define INTMAX_MAX INT32_MAX
#endif
#undef UINTMAX_MAX
#ifdef UINT64_MAX
# define UINTMAX_MAX UINT64_MAX
#else
# define UINTMAX_MAX UINT32_MAX
#endif
/* 7.18.3. Limits of other integer types */
/* ptrdiff_t limits */
#undef PTRDIFF_MIN
#undef PTRDIFF_MAX
#define PTRDIFF_MIN \
_STDINT_MIN (1, 64, 0l)
#define PTRDIFF_MAX \
_STDINT_MAX (1, 64, 0l)
/* sig_atomic_t limits */
#undef SIG_ATOMIC_MIN
#undef SIG_ATOMIC_MAX
#define SIG_ATOMIC_MIN \
_STDINT_MIN (1, 32, \
0)
#define SIG_ATOMIC_MAX \
_STDINT_MAX (1, 32, \
0)
/* size_t limit */
#undef SIZE_MAX
#define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
/* wchar_t limits */
#undef WCHAR_MIN
#undef WCHAR_MAX
#define WCHAR_MIN \
_STDINT_MIN (1, 32, 0)
#define WCHAR_MAX \
_STDINT_MAX (1, 32, 0)
/* wint_t limits */
#undef WINT_MIN
#undef WINT_MAX
#define WINT_MIN \
_STDINT_MIN (1, 32, 0)
#define WINT_MAX \
_STDINT_MAX (1, 32, 0)
#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
/* 7.18.4. Macros for integer constants */
#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
/* 7.18.4.1. Macros for minimum-width integer constants */
/* According to ISO C 99 Technical Corrigendum 1 */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
#undef INT8_C
#undef UINT8_C
#define INT8_C(x) x
#define UINT8_C(x) x
#undef INT16_C
#undef UINT16_C
#define INT16_C(x) x
#define UINT16_C(x) x
#undef INT32_C
#undef UINT32_C
#define INT32_C(x) x
#define UINT32_C(x) x ## U
#undef INT64_C
#undef UINT64_C
#if LONG_MAX >> 31 >> 31 == 1
# define INT64_C(x) x##L
#elif defined _MSC_VER
# define INT64_C(x) x##i64
#elif 1
# define INT64_C(x) x##LL
#endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
# define UINT64_C(x) x##UL
#elif defined _MSC_VER
# define UINT64_C(x) x##ui64
#elif 1
# define UINT64_C(x) x##ULL
#endif
/* 7.18.4.2. Macros for greatest-width integer constants */
#undef INTMAX_C
#if 1 && LONG_MAX >> 30 == 1
# define INTMAX_C(x) x##LL
#elif defined GL_INT64_T
# define INTMAX_C(x) INT64_C(x)
#else
# define INTMAX_C(x) x##L
#endif
#undef UINTMAX_C
#if 1 && ULONG_MAX >> 31 == 1
# define UINTMAX_C(x) x##ULL
#elif defined GL_UINT64_T
# define UINTMAX_C(x) UINT64_C(x)
#else
# define UINTMAX_C(x) x##UL
#endif
#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
#endif /* _GL_STDINT_H */
#endif /* _GL_STDINT_H */

View File

@ -1,321 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A GNU-like <stdio.h>.
Copyright (C) 2004, 2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if defined __need_FILE || defined __need___FILE
/* Special invocation convention inside glibc header files. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <stdio.h>
#else
# include "///usr/include/stdio.h"
#endif
#else
/* Normal invocation convention. */
#ifndef _GL_STDIO_H
/* The include_next requires a split double-inclusion guard. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <stdio.h>
#else
# include "///usr/include/stdio.h"
#endif
#ifndef _GL_STDIO_H
#define _GL_STDIO_H
#include <stdarg.h>
#include <stddef.h>
#if (0 && 0) || (0 && 0)
/* Get off_t. */
# include <sys/types.h>
#endif
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
#endif
/* The definition of GL_LINK_WARNING is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
#if 0
# if 0
# define fprintf rpl_fprintf
extern int fprintf (FILE *fp, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fprintf
# define fprintf \
(GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
"use gnulib module fprintf-posix for portable " \
"POSIX compliance"), \
fprintf)
#endif
#if 0
# if 0
# define vfprintf rpl_vfprintf
extern int vfprintf (FILE *fp, const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 2, 0)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vfprintf
# define vfprintf(s,f,a) \
(GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
"use gnulib module vfprintf-posix for portable " \
"POSIX compliance"), \
vfprintf (s, f, a))
#endif
#if 0
# if 0
/* Don't break __attribute__((format(printf,M,N))). */
# define printf __printf__
extern int printf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef printf
# define printf \
(GL_LINK_WARNING ("printf is not always POSIX compliant - " \
"use gnulib module printf-posix for portable " \
"POSIX compliance"), \
printf)
/* Don't break __attribute__((format(printf,M,N))). */
# define format(kind,m,n) format (__##kind##__, m, n)
# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
# define ____printf____ __printf__
# define ____scanf____ __scanf__
# define ____strftime____ __strftime__
# define ____strfmon____ __strfmon__
#endif
#if 0
# if 0
# define vprintf rpl_vprintf
extern int vprintf (const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 1, 0)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vprintf
# define vprintf(f,a) \
(GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
"use gnulib module vprintf-posix for portable " \
"POSIX compliance"), \
vprintf (f, a))
#endif
#if 0
# if 0
# define snprintf rpl_snprintf
# endif
# if 0 || !1
extern int snprintf (char *str, size_t size, const char *format, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef snprintf
# define snprintf \
(GL_LINK_WARNING ("snprintf is unportable - " \
"use gnulib module snprintf for portability"), \
snprintf)
#endif
#if 1
# if 0
# define vsnprintf rpl_vsnprintf
# endif
# if 0 || !1
extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 3, 0)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vsnprintf
# define vsnprintf(b,s,f,a) \
(GL_LINK_WARNING ("vsnprintf is unportable - " \
"use gnulib module vsnprintf for portability"), \
vsnprintf (b, s, f, a))
#endif
#if 0
# if 0
# define sprintf rpl_sprintf
extern int sprintf (char *str, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef sprintf
# define sprintf \
(GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
"use gnulib module sprintf-posix for portable " \
"POSIX compliance"), \
sprintf)
#endif
#if 0
# if 0
# define vsprintf rpl_vsprintf
extern int vsprintf (char *str, const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 2, 0)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vsprintf
# define vsprintf(b,f,a) \
(GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
"use gnulib module vsprintf-posix for portable " \
"POSIX compliance"), \
vsprintf (b, f, a))
#endif
#if 0
# if 0
# define asprintf rpl_asprintf
# define vasprintf rpl_vasprintf
# endif
# if 0 || !1
/* Write formatted output to a string dynamically allocated with malloc().
If the memory allocation succeeds, store the address of the string in
*RESULT and return the number of resulting bytes, excluding the trailing
NUL. Upon memory allocation error, or some other error, return -1. */
extern int asprintf (char **result, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int vasprintf (char **result, const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 2, 0)));
# endif
#endif
#if 0
# if 0
/* Provide fseek, fseeko functions that are aware of a preceding
fflush(), and which detect pipes. */
# define fseeko rpl_fseeko
extern int fseeko (FILE *fp, off_t offset, int whence);
# define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
# endif
#elif defined GNULIB_POSIXCHECK
# undef fseeko
# define fseeko(f,o,w) \
(GL_LINK_WARNING ("fseeko is unportable - " \
"use gnulib module fseeko for portability"), \
fseeko (f, o, w))
#endif
#if 0 && 0
extern int rpl_fseek (FILE *fp, long offset, int whence);
# undef fseek
# if defined GNULIB_POSIXCHECK
# define fseek(f,o,w) \
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use fseeko function for handling of large files"), \
rpl_fseek (f, o, w))
# else
# define fseek rpl_fseek
# endif
#elif defined GNULIB_POSIXCHECK
# ifndef fseek
# define fseek(f,o,w) \
(GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use fseeko function for handling of large files"), \
fseek (f, o, w))
# endif
#endif
#if 0
# if 0
# define ftello rpl_ftello
extern off_t ftello (FILE *fp);
# define ftell(fp) ftello (fp)
# endif
#elif defined GNULIB_POSIXCHECK
# undef ftello
# define ftello(f) \
(GL_LINK_WARNING ("ftello is unportable - " \
"use gnulib module ftello for portability"), \
ftello (f))
#endif
#if 0 && 0
extern long rpl_ftell (FILE *fp);
# undef ftell
# if GNULIB_POSIXCHECK
# define ftell(f) \
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use ftello function for handling of large files"), \
rpl_ftell (f))
# else
# define ftell rpl_ftell
# endif
#elif defined GNULIB_POSIXCHECK
# ifndef ftell
# define ftell(f) \
(GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
"on 32-bit platforms - " \
"use ftello function for handling of large files"), \
ftell (f))
# endif
#endif
#if 0
# if 0
# define fflush rpl_fflush
/* Flush all pending data on STREAM according to POSIX rules. Both
output and seekable input streams are supported.
Note! LOSS OF DATA can occur if fflush is applied on an input stream
that is _not_seekable_ or on an update stream that is _not_seekable_
and in which the most recent operation was input. Seekability can
be tested with lseek(fileno(fp),0,SEEK_CUR). */
extern int fflush (FILE *gl_stream);
# endif
#elif defined GNULIB_POSIXCHECK
# undef fflush
# define fflush(f) \
(GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
"use gnulib module fflush for portable " \
"POSIX compliance"), \
fflush (f))
#endif
#ifdef __cplusplus
}
#endif
#endif /* _GL_STDIO_H */
#endif /* _GL_STDIO_H */
#endif

View File

@ -1,141 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2002, 2006-2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <stdlib.h>
#else
# include "///usr/include/stdlib.h"
#endif
#else
/* Normal invocation convention. */
#ifndef _GL_STDLIB_H
/* The include_next requires a split double-inclusion guard. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <stdlib.h>
#else
# include "///usr/include/stdlib.h"
#endif
#ifndef _GL_STDLIB_H
#define _GL_STDLIB_H
/* The definition of GL_LINK_WARNING is copied here. */
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
with proper operation of xargs. */
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#elif EXIT_FAILURE != 1
# undef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if 0
/* Assuming *OPTIONP is a comma separated list of elements of the form
"token" or "token=value", getsubopt parses the first of these elements.
If the first element refers to a "token" that is member of the given
NULL-terminated array of tokens:
- It replaces the comma with a NUL byte, updates *OPTIONP to point past
the first option and the comma, sets *VALUEP to the value of the
element (or NULL if it doesn't contain an "=" sign),
- It returns the index of the "token" in the given array of tokens.
Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
For more details see the POSIX:2001 specification.
http://www.opengroup.org/susv3xsh/getsubopt.html */
# if !1
extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getsubopt
# define getsubopt(o,t,v) \
(GL_LINK_WARNING ("getsubopt is unportable - " \
"use gnulib module getsubopt for portability"), \
getsubopt (o, t, v))
#endif
#if 1
# if !1
/* 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*/);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkdtemp
# define mkdtemp(t) \
(GL_LINK_WARNING ("mkdtemp is unportable - " \
"use gnulib module mkdtemp for portability"), \
mkdtemp (t))
#endif
#if 0
# if 0
/* 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.
The file is then created, ensuring it didn't exist before.
The file is created read-write (mask at least 0600 & ~umask), but it may be
world-readable and world-writable (mask 0666 & ~umask), depending on the
implementation.
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
# define mkstemp rpl_mkstemp
extern int mkstemp (char * /*template*/);
# else
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
# include <unistd.h>
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkstemp
# define mkstemp(t) \
(GL_LINK_WARNING ("mkstemp is unportable - " \
"use gnulib module mkstemp for portability"), \
mkstemp (t))
#endif
#ifdef __cplusplus
}
#endif
#endif /* _GL_STDLIB_H */
#endif /* _GL_STDLIB_H */
#endif

View File

@ -1,547 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A GNU-like <string.h>.
Copyright (C) 1995-1996, 2001-2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GL_STRING_H
/* The include_next requires a split double-inclusion guard. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <string.h>
#else
# include "///usr/include/string.h"
#endif
#ifndef _GL_STRING_H
#define _GL_STRING_H
/* The definition of GL_LINK_WARNING is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
/* Return the first occurrence of NEEDLE in HAYSTACK. */
#if 0
# if ! 1
extern void *memmem (void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len);
# endif
#elif defined GNULIB_POSIXCHECK
# undef memmem
# define memmem(a,al,b,bl) \
(GL_LINK_WARNING ("memmem is unportable - " \
"use gnulib module memmem for portability"), \
memmem (a, al, b, bl))
#endif
/* Copy N bytes of SRC to DEST, return pointer to bytes after the
last written byte. */
#if 1
# if ! 0
extern void *mempcpy (void *restrict __dest, void const *restrict __src,
size_t __n);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mempcpy
# define mempcpy(a,b,n) \
(GL_LINK_WARNING ("mempcpy is unportable - " \
"use gnulib module mempcpy for portability"), \
mempcpy (a, b, n))
#endif
/* Search backwards through a block for a byte (specified as an int). */
#if 1
# if ! 0
extern void *memrchr (void const *, int, size_t);
# endif
#elif defined GNULIB_POSIXCHECK
# undef memrchr
# define memrchr(a,b,c) \
(GL_LINK_WARNING ("memrchr is unportable - " \
"use gnulib module memrchr for portability"), \
memrchr (a, b, c))
#endif
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
#if 1
# if ! 1
extern char *stpcpy (char *restrict __dst, char const *restrict __src);
# endif
#elif defined GNULIB_POSIXCHECK
# undef stpcpy
# define stpcpy(a,b) \
(GL_LINK_WARNING ("stpcpy is unportable - " \
"use gnulib module stpcpy for portability"), \
stpcpy (a, b))
#endif
/* Copy no more than N bytes of SRC to DST, returning a pointer past the
last non-NUL byte written into DST. */
#if 0
# if ! 1
# define stpncpy gnu_stpncpy
extern char *stpncpy (char *restrict __dst, char const *restrict __src,
size_t __n);
# endif
#elif defined GNULIB_POSIXCHECK
# undef stpncpy
# define stpncpy(a,b,n) \
(GL_LINK_WARNING ("stpncpy is unportable - " \
"use gnulib module stpncpy for portability"), \
stpncpy (a, b, n))
#endif
/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
greater than zero if S1 is lexicographically less than, equal to or greater
than S2.
Note: This function does not work in multibyte locales. */
#if ! 1
extern int strcasecmp (char const *s1, char const *s2);
#endif
#if defined GNULIB_POSIXCHECK
/* strcasecmp() does not work with multibyte strings:
POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */
# undef strcasecmp
# define strcasecmp(a,b) \
(GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbscasecmp if you care about " \
"internationalization, or use c_strcasecmp (from " \
"gnulib module c-strcase) if you want a locale " \
"independent function"), \
strcasecmp (a, b))
#endif
/* Compare no more than N bytes of strings S1 and S2, ignoring case,
returning less than, equal to or greater than zero if S1 is
lexicographically less than, equal to or greater than S2.
Note: This function cannot work correctly in multibyte locales. */
#if ! 1
extern int strncasecmp (char const *s1, char const *s2, size_t n);
#endif
#if defined GNULIB_POSIXCHECK
/* strncasecmp() does not work with multibyte strings:
POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */
# undef strncasecmp
# define strncasecmp(a,b,n) \
(GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \
"strings in multibyte locales - " \
"use mbsncasecmp or mbspcasecmp if you care about " \
"internationalization, or use c_strncasecmp (from " \
"gnulib module c-strcase) if you want a locale " \
"independent function"), \
strncasecmp (a, b, n))
#endif
#if defined GNULIB_POSIXCHECK
/* strchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
# undef strchr
# define strchr(s,c) \
(GL_LINK_WARNING ("strchr cannot work correctly on character strings " \
"in some multibyte locales - " \
"use mbschr if you care about internationalization"), \
strchr (s, c))
#endif
/* Find the first occurrence of C in S or the final NUL byte. */
#if 1
# if ! 0
extern char *strchrnul (char const *__s, int __c_in);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strchrnul
# define strchrnul(a,b) \
(GL_LINK_WARNING ("strchrnul is unportable - " \
"use gnulib module strchrnul for portability"), \
strchrnul (a, b))
#endif
/* Duplicate S, returning an identical malloc'd string. */
#if 1
# if ! 1 && ! defined strdup
extern char *strdup (char const *__s);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strdup
# define strdup(a) \
(GL_LINK_WARNING ("strdup is unportable - " \
"use gnulib module strdup for portability"), \
strdup (a))
#endif
/* Return a newly allocated copy of at most N bytes of STRING. */
#if 1
# if ! 1
# undef strndup
# define strndup rpl_strndup
# endif
# if ! 1 || ! 1
extern char *strndup (char const *__string, size_t __n);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strndup
# define strndup(a,n) \
(GL_LINK_WARNING ("strndup is unportable - " \
"use gnulib module strndup for portability"), \
strndup (a, n))
#endif
/* Find the length (number of bytes) of STRING, but scan at most
MAXLEN bytes. If no '\0' terminator is found in that many bytes,
return MAXLEN. */
#if 1
# if ! 1
extern size_t strnlen (char const *__string, size_t __maxlen);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strnlen
# define strnlen(a,n) \
(GL_LINK_WARNING ("strnlen is unportable - " \
"use gnulib module strnlen for portability"), \
strnlen (a, n))
#endif
#if defined GNULIB_POSIXCHECK
/* strcspn() assumes the second argument is a list of single-byte characters.
Even in this simple case, it does not work with multibyte strings if the
locale encoding is GB18030 and one of the characters to be searched is a
digit. */
# undef strcspn
# define strcspn(s,a) \
(GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbscspn if you care about internationalization"), \
strcspn (s, a))
#endif
/* Find the first occurrence in S of any character in ACCEPT. */
#if 0
# if ! 1
extern char *strpbrk (char const *__s, char const *__accept);
# endif
# if defined GNULIB_POSIXCHECK
/* strpbrk() assumes the second argument is a list of single-byte characters.
Even in this simple case, it does not work with multibyte strings if the
locale encoding is GB18030 and one of the characters to be searched is a
digit. */
# undef strpbrk
# define strpbrk(s,a) \
(GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbspbrk if you care about internationalization"), \
strpbrk (s, a))
# endif
#elif defined GNULIB_POSIXCHECK
# undef strpbrk
# define strpbrk(s,a) \
(GL_LINK_WARNING ("strpbrk is unportable - " \
"use gnulib module strpbrk for portability"), \
strpbrk (s, a))
#endif
#if defined GNULIB_POSIXCHECK
/* strspn() assumes the second argument is a list of single-byte characters.
Even in this simple case, it cannot work with multibyte strings. */
# undef strspn
# define strspn(s,a) \
(GL_LINK_WARNING ("strspn cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbsspn if you care about internationalization"), \
strspn (s, a))
#endif
#if defined GNULIB_POSIXCHECK
/* strrchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
# undef strrchr
# define strrchr(s,c) \
(GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \
"in some multibyte locales - " \
"use mbsrchr if you care about internationalization"), \
strrchr (s, c))
#endif
/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
If one is found, overwrite it with a NUL, and advance *STRINGP
to point to the next char after it. Otherwise, set *STRINGP to NULL.
If *STRINGP was already NULL, nothing happens.
Return the old value of *STRINGP.
This is a variant of strtok() that is multithread-safe and supports
empty fields.
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
Caveat: It doesn't work with multibyte strings unless all of the delimiter
characters are ASCII characters < 0x30.
See also strtok_r(). */
#if 0
# if ! 1
extern char *strsep (char **restrict __stringp, char const *restrict __delim);
# endif
# if defined GNULIB_POSIXCHECK
# undef strsep
# define strsep(s,d) \
(GL_LINK_WARNING ("strsep cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbssep if you care about internationalization"), \
strsep (s, d))
# endif
#elif defined GNULIB_POSIXCHECK
# undef strsep
# define strsep(s,d) \
(GL_LINK_WARNING ("strsep is unportable - " \
"use gnulib module strsep for portability"), \
strsep (s, d))
#endif
#if defined GNULIB_POSIXCHECK
/* strstr() does not work with multibyte strings if the locale encoding is
different from UTF-8:
POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */
# undef strstr
# define strstr(a,b) \
(GL_LINK_WARNING ("strstr cannot work correctly on character strings " \
"in most multibyte locales - " \
"use mbsstr if you care about internationalization"), \
strstr (a, b))
#endif
/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
comparison. */
#if ! 1
extern char *strcasestr (const char *haystack, const char *needle);
#endif
#if defined GNULIB_POSIXCHECK
/* strcasestr() does not work with multibyte strings:
It is a glibc extension, and glibc implements it only for unibyte
locales. */
# undef strcasestr
# define strcasestr(a,b) \
(GL_LINK_WARNING ("strcasestr does work correctly on character strings " \
"in multibyte locales - " \
"use mbscasestr if you care about " \
"internationalization, or use c-strcasestr if you want " \
"a locale independent function"), \
strcasestr (a, b))
#endif
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
char s[] = "-abc-=-def";
char *sp;
x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
x = strtok_r(NULL, "=", &sp); // x = NULL
// s = "abc\0-def\0"
This is a variant of strtok() that is multithread-safe.
For the POSIX documentation for this function, see:
http://www.opengroup.org/susv3xsh/strtok.html
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
Caveat: It doesn't work with multibyte strings unless all of the delimiter
characters are ASCII characters < 0x30.
See also strsep(). */
#if 0
# if ! 1
extern char *strtok_r (char *restrict s, char const *restrict delim,
char **restrict save_ptr);
# endif
# if defined GNULIB_POSIXCHECK
# undef strtok_r
# define strtok_r(s,d,p) \
(GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \
"in multibyte locales - " \
"use mbstok_r if you care about internationalization"), \
strtok_r (s, d, p))
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtok_r
# define strtok_r(s,d,p) \
(GL_LINK_WARNING ("strtok_r is unportable - " \
"use gnulib module strtok_r for portability"), \
strtok_r (s, d, p))
#endif
/* The following functions are not specified by POSIX. They are gnulib
extensions. */
#if 0
/* Return the number of multibyte characters in the character string STRING.
This considers multibyte characters, unlike strlen, which counts bytes. */
extern size_t mbslen (const char *string);
#endif
#if 0
/* Locate the first single-byte character C in the character string STRING,
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);
#endif
#if 0
/* Locate the last single-byte character C in the character string STRING,
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);
#endif
#if 0
/* Find the first occurrence of the character string NEEDLE in the character
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);
#endif
#if 1
/* Compare the character strings S1 and S2, ignoring case, returning less than,
equal to or greater than zero if S1 is lexicographically less than, equal to
or greater than S2.
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);
#endif
#if 0
/* Compare the initial segment of the character string S1 consisting of at most
N characters with the initial segment of the character string S2 consisting
of at most N characters, ignoring case, returning less than, equal to or
greater than zero if the initial segment of S1 is lexicographically less
than, equal to or greater than the initial segment of S2.
Note: This function may, in multibyte locales, return 0 for initial segments
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);
#endif
#if 0
/* Compare the initial segment of the character string STRING consisting of
at most mbslen (PREFIX) characters with the character string PREFIX,
ignoring case, returning less than, equal to or greater than zero if this
initial segment is lexicographically less than, equal to or greater than
PREFIX.
Note: This function may, in multibyte locales, return 0 if STRING is of
smaller length than PREFIX!
Unlike strncasecmp(), this function works correctly in multibyte
locales. */
extern char * mbspcasecmp (const char *string, const char *prefix);
#endif
#if 0
/* Find the first occurrence of the character string NEEDLE in the character
string HAYSTACK, using case-insensitive comparison.
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);
#endif
#if 0
/* Find the first occurrence in the character string STRING of any character
in the character string ACCEPT. Return the number of bytes from the
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);
#endif
#if 0
/* Find the first occurrence in the character string STRING of any character
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);
#endif
#if 0
/* Find the first occurrence in the character string STRING of any character
not in the character string REJECT. Return the number of bytes from the
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);
#endif
#if 0
/* Search the next delimiter (multibyte character listed in the character
string DELIM) starting at the character string *STRINGP.
If one is found, overwrite it with a NUL, and advance *STRINGP to point
to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
If *STRINGP was already NULL, nothing happens.
Return the old value of *STRINGP.
This is a variant of mbstok_r() that supports empty fields.
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
See also mbstok_r(). */
extern char * mbssep (char **stringp, const char *delim);
#endif
#if 0
/* Parse the character string STRING into tokens separated by characters in
the character string DELIM.
If STRING is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
char s[] = "-abc-=-def";
char *sp;
x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
x = mbstok_r(NULL, "=", &sp); // x = NULL
// s = "abc\0-def\0"
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
See also mbssep(). */
extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _GL_STRING_H */
#endif /* _GL_STRING_H */

View File

@ -1,285 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Provide a more complete sys/stat header file.
Copyright (C) 2006, 2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
/* This file is supposed to be used on platforms where <sys/stat.h> is
incomplete. It is intended to provide definitions and prototypes
needed by an application. Start with what the system provides. */
#ifndef _GL_SYS_STAT_H
/* The include_next requires a split double-inclusion guard. */
#if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <sys/stat.h>
#else
# include "///usr/include/sys/stat.h"
#endif
#ifndef _GL_SYS_STAT_H
#define _GL_SYS_STAT_H
#ifndef S_IFMT
# define S_IFMT 0170000
#endif
#if STAT_MACROS_BROKEN
# undef S_ISBLK
# undef S_ISCHR
# undef S_ISDIR
# undef S_ISFIFO
# undef S_ISLNK
# undef S_ISNAM
# undef S_ISMPB
# undef S_ISMPC
# undef S_ISNWK
# undef S_ISREG
# undef S_ISSOCK
#endif
#ifndef S_ISBLK
# ifdef S_IFBLK
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
# else
# define S_ISBLK(m) 0
# endif
#endif
#ifndef S_ISCHR
# ifdef S_IFCHR
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
# else
# define S_ISCHR(m) 0
# endif
#endif
#ifndef S_ISDIR
# ifdef S_IFDIR
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
# else
# define S_ISDIR(m) 0
# endif
#endif
#ifndef S_ISDOOR /* Solaris 2.5 and up */
# define S_ISDOOR(m) 0
#endif
#ifndef S_ISFIFO
# ifdef S_IFIFO
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
# else
# define S_ISFIFO(m) 0
# endif
#endif
#ifndef S_ISLNK
# ifdef S_IFLNK
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
# else
# define S_ISLNK(m) 0
# endif
#endif
#ifndef S_ISMPB /* V7 */
# ifdef S_IFMPB
# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
# else
# define S_ISMPB(m) 0
# define S_ISMPC(m) 0
# endif
#endif
#ifndef S_ISNAM /* Xenix */
# ifdef S_IFNAM
# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
# else
# define S_ISNAM(m) 0
# endif
#endif
#ifndef S_ISNWK /* HP/UX */
# ifdef S_IFNWK
# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
# else
# define S_ISNWK(m) 0
# endif
#endif
#ifndef S_ISPORT /* Solaris 10 and up */
# define S_ISPORT(m) 0
#endif
#ifndef S_ISREG
# ifdef S_IFREG
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
# else
# define S_ISREG(m) 0
# endif
#endif
#ifndef S_ISSOCK
# ifdef S_IFSOCK
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
# else
# define S_ISSOCK(m) 0
# endif
#endif
#ifndef S_TYPEISMQ
# define S_TYPEISMQ(p) 0
#endif
#ifndef S_TYPEISTMO
# define S_TYPEISTMO(p) 0
#endif
#ifndef S_TYPEISSEM
# ifdef S_INSEM
# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
# else
# define S_TYPEISSEM(p) 0
# endif
#endif
#ifndef S_TYPEISSHM
# ifdef S_INSHD
# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
# else
# define S_TYPEISSHM(p) 0
# endif
#endif
/* high performance ("contiguous data") */
#ifndef S_ISCTG
# define S_ISCTG(p) 0
#endif
/* Cray DMF (data migration facility): off line, with data */
#ifndef S_ISOFD
# define S_ISOFD(p) 0
#endif
/* Cray DMF (data migration facility): off line, with no data */
#ifndef S_ISOFL
# define S_ISOFL(p) 0
#endif
/* 4.4BSD whiteout */
#ifndef S_ISWHT
# define S_ISWHT(m) 0
#endif
/* If any of the following are undefined,
define them to their de facto standard values. */
#if !S_ISUID
# define S_ISUID 04000
#endif
#if !S_ISGID
# define S_ISGID 02000
#endif
/* S_ISVTX is a common extension to POSIX. */
#ifndef S_ISVTX
# define S_ISVTX 01000
#endif
#if !S_IRUSR && S_IREAD
# define S_IRUSR S_IREAD
#endif
#if !S_IRUSR
# define S_IRUSR 00400
#endif
#if !S_IRGRP
# define S_IRGRP (S_IRUSR >> 3)
#endif
#if !S_IROTH
# define S_IROTH (S_IRUSR >> 6)
#endif
#if !S_IWUSR && S_IWRITE
# define S_IWUSR S_IWRITE
#endif
#if !S_IWUSR
# define S_IWUSR 00200
#endif
#if !S_IWGRP
# define S_IWGRP (S_IWUSR >> 3)
#endif
#if !S_IWOTH
# define S_IWOTH (S_IWUSR >> 6)
#endif
#if !S_IXUSR && S_IEXEC
# define S_IXUSR S_IEXEC
#endif
#if !S_IXUSR
# define S_IXUSR 00100
#endif
#if !S_IXGRP
# define S_IXGRP (S_IXUSR >> 3)
#endif
#if !S_IXOTH
# define S_IXOTH (S_IXUSR >> 6)
#endif
#if !S_IRWXU
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
#endif
#if !S_IRWXG
# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
#endif
#if !S_IRWXO
# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
#endif
/* S_IXUGO is a common extension to POSIX. */
#if !S_IXUGO
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
#endif
#ifndef S_IRWXUGO
# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
#endif
/* mingw does not support symlinks, therefore it does not have lstat. But
without links, stat does just fine. */
#if ! 1
# define lstat stat
#endif
/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
Additionally, it declares _mkdir (and depending on compile flags, an
alias mkdir), only in the nonstandard io.h. */
#if ! 1 && 0
# include <io.h>
static inline int
rpl_mkdir (char const *name, mode_t mode)
{
return _mkdir (name);
}
# define mkdir rpl_mkdir
#endif
#endif /* _GL_SYS_STAT_H */
#endif /* _GL_SYS_STAT_H */

View File

@ -1,126 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A more-standard <time.h>.
Copyright (C) 2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
symbols. */
#if defined __need_time_t || defined __need_clock_t || defined __need_timespec
# if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <time.h>
# else
# include "///usr/include/time.h"
# endif
#else
/* Normal invocation convention. */
# if ! defined _GL_TIME_H
/* The include_next requires a split double-inclusion guard. */
# if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <time.h>
# else
# include "///usr/include/time.h"
# endif
# if ! defined _GL_TIME_H
# define _GL_TIME_H
# ifdef __cplusplus
extern "C" {
# endif
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
Or they define it with the wrong member names or define it in <sys/time.h>
(e.g., FreeBSD circa 1997). */
# if ! 1
# if 0
# include <sys/time.h>
# else
# undef timespec
# define timespec rpl_timespec
struct timespec
{
time_t tv_sec;
long int tv_nsec;
};
# endif
# 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 GNULIB_PORTCHECK
# define nanosleep rpl_nanosleep
int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
# 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 0
# undef localtime_r
# define localtime_r rpl_localtime_r
# undef gmtime_r
# define gmtime_r rpl_gmtime_r
struct tm *localtime_r (time_t const *restrict __timer,
struct tm *restrict __result);
struct tm *gmtime_r (time_t const *restrict __timer,
struct tm *restrict __result);
# 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 GNULIB_PORTCHECK
# undef strptime
# define strptime rpl_strptime
char *strptime (char const *restrict __buf, char const *restrict __format,
struct tm *restrict __tm);
# endif
/* Convert TM to a time_t value, assuming UTC. */
# if GNULIB_PORTCHECK
# undef timegm
# define timegm rpl_timegm
time_t timegm (struct tm *__tm);
# endif
/* Encourage applications to avoid unsafe functions that can overrun
buffers when given outlandish struct tm values. Portable
applications should use strftime (or even sprintf) instead. */
# if GNULIB_PORTCHECK
# undef asctime
# define asctime eschew_asctime
# undef asctime_r
# define asctime_r eschew_asctime_r
# undef ctime
# define ctime eschew_ctime
# undef ctime_r
# define ctime_r eschew_ctime_r
# endif
# ifdef __cplusplus
}
# endif
# endif /* _GL_TIME_H */
# endif /* _GL_TIME_H */
#endif

View File

@ -1,243 +0,0 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Substitute for and wrapper around <unistd.h>.
Copyright (C) 2004-2007 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GL_UNISTD_H
/* The include_next requires a split double-inclusion guard. */
#if 1
# if (__GNUC__ || 60000000 <= __DECC_VER)
# include_next <unistd.h>
# else
# include "///usr/include/unistd.h"
# endif
#endif
#ifndef _GL_UNISTD_H
#define _GL_UNISTD_H
/* mingw doesn't define the SEEK_* macros in <unistd.h>. */
#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
# include <stdio.h>
#endif
/* mingw fails to declare _exit in <unistd.h>. */
#include <stdlib.h>
/* The definition of GL_LINK_WARNING is copied here. */
/* Declare overridden functions. */
#ifdef __cplusplus
extern "C" {
#endif
#if 1
# if 0
/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
to GID (if GID is not -1).
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/chown.html>. */
# define chown rpl_chown
extern int chown (const char *file, uid_t uid, gid_t gid);
# endif
#elif defined GNULIB_POSIXCHECK
# undef chown
# define chown(f,u,g) \
(GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \
"doesn't treat a uid or gid of -1 on some systems - " \
"use gnulib module chown for portability"), \
chown (f, u, g))
#endif
#if 1
# if !1
/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
NEWFD = OLDFD, otherwise close NEWFD first if it is open.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/dup2.html>. */
extern int dup2 (int oldfd, int newfd);
# endif
#elif defined GNULIB_POSIXCHECK
# undef dup2
# define dup2(o,n) \
(GL_LINK_WARNING ("dup2 is unportable - " \
"use gnulib module dup2 for portability"), \
dup2 (o, n))
#endif
#if 1
# if 0
/* Change the process' current working directory to the directory on which
the given file descriptor is open.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/fchdir.html>. */
extern int fchdir (int /*fd*/);
# define close rpl_close
extern int close (int);
# define dup rpl_dup
extern int dup (int);
# define dup2 rpl_dup2
extern int dup2 (int, int);
# endif
#elif defined GNULIB_POSIXCHECK
# undef fchdir
# define fchdir(f) \
(GL_LINK_WARNING ("fchdir is unportable - " \
"use gnulib module fchdir for portability"), \
fchdir (f))
#endif
#if 1
# if !1
/* Change the size of the file to which FD is opened to become equal to LENGTH.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/ftruncate.html>. */
extern int ftruncate (int fd, off_t length);
# endif
#elif defined GNULIB_POSIXCHECK
# undef ftruncate
# define ftruncate(f,l) \
(GL_LINK_WARNING ("ftruncate is unportable - " \
"use gnulib module ftruncate for portability"), \
ftruncate (f, l))
#endif
#if 1
/* Include the headers that might declare getcwd so that they will not
cause confusion if included after this file. */
# include <stdlib.h>
# if 1
/* Get the name of the current working directory, and put it in SIZE bytes
of BUF.
Return BUF if successful, or NULL if the directory couldn't be determined
or SIZE was too small.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getcwd.html>.
Additionally, the gnulib module 'getcwd' guarantees the following GNU
extension: If BUF is NULL, an array is allocated with 'malloc'; the array
is SIZE bytes long, unless SIZE == 0, in which case it is as big as
necessary. */
# define getcwd rpl_getcwd
extern char * getcwd (char *buf, size_t size);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getcwd
# define getcwd(b,s) \
(GL_LINK_WARNING ("getcwd is unportable - " \
"use gnulib module getcwd for portability"), \
getcwd (b, s))
#endif
#if 0
/* Copies the user's login name to NAME.
The array pointed to by NAME has room for SIZE bytes.
Returns 0 if successful. Upon error, an error number is returned, or -1 in
the case that the login name cannot be found but no specific error is
provided (this case is hopefully rare but is left open by the POSIX spec).
See <http://www.opengroup.org/susv3xsh/getlogin.html>.
*/
# if !1
# include <stddef.h>
extern int getlogin_r (char *name, size_t size);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getlogin_r
# define getlogin_r(n,s) \
(GL_LINK_WARNING ("getlogin_r is unportable - " \
"use gnulib module getlogin_r for portability"), \
getlogin_r (n, s))
#endif
#if 0
# if 0
/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
Return the new offset if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/lseek.html>. */
# define lseek rpl_lseek
extern off_t lseek (int fd, off_t offset, int whence);
# endif
#elif defined GNULIB_POSIXCHECK
# undef lseek
# define lseek(f,o,w) \
(GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \
"systems - use gnulib module lseek for portability"), \
lseek (f, o, w))
#endif
#if 1
/* Read the contents of the symbolic link FILE and place the first BUFSIZE
bytes of it into BUF. Return the number of bytes placed into BUF if
successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/readlink.html>. */
# if !1
# include <stddef.h>
extern int readlink (const char *file, char *buf, size_t bufsize);
# endif
#elif defined GNULIB_POSIXCHECK
# undef readlink
# define readlink(f,b,s) \
(GL_LINK_WARNING ("readlink is unportable - " \
"use gnulib module readlink for portability"), \
readlink (f, b, s))
#endif
#if 1
/* Pause the execution of the current thread for N seconds.
Returns the number of seconds left to sleep.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/sleep.html>. */
# if !1
extern unsigned int sleep (unsigned int n);
# endif
#elif defined GNULIB_POSIXCHECK
# undef sleep
# define sleep(n) \
(GL_LINK_WARNING ("sleep is unportable - " \
"use gnulib module sleep for portability"), \
sleep (n))
#endif
#ifdef __cplusplus
}
#endif
#endif /* _GL_UNISTD_H */
#endif /* _GL_UNISTD_H */

13
patches/PR46500656.diff Normal file
View File

@ -0,0 +1,13 @@
--- lib/argp-parse.c.orig 2019-03-20 18:20:46.000000000 -0700
+++ lib/argp-parse.c 2019-03-20 18:30:59.000000000 -0700
@@ -155,8 +155,8 @@
else if (argp_program_version)
fprintf (state->out_stream, "%s\n", argp_program_version);
else
- __argp_error (state, dgettext (state->root_argp->argp_domain,
- "(PROGRAM ERROR) No version known!?"));
+ __argp_error (state, "%s", dgettext (state->root_argp->argp_domain,
+ "(PROGRAM ERROR) No version known!?"));
if (! (state->flags & ARGP_NO_EXIT))
exit (0);
break;