Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vcsn
Vaucanson 1
Commits
53678c4a
Commit
53678c4a
authored
Jun 11, 2009
by
Alexandre Duret-Lutz
Browse files
Merge branch 'exp/gnulib-update' into next
Conflicts: ChangeLog
parents
1988f13a
8899e930
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
53678c4a
2009-06-05 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Update to gnulib 567f85cfcdb0a63cf96730d0858581b013765d59.
* gnulib/Makefile.am, gnulib/argp-fmtstream.c, gnulib/getopt1.c,
gnulib/gettext.h, gnulib/progname.c, gnulib/stdint.in.h ,
gnulib/stdio.in.h, gnulib/stdlib.in.h, gnulib/strerror.c ,
gnulib/unistd.in.h, gnulib/vasnprintf.c, gnulib/wchar.in.h ,
gnulib/xmalloc.c, m4/alloca.m4, m4/argp.m4 ,
m4/double-slash-root.m4, m4/errno_h.m4, m4/extensions.m4 ,
m4/gnulib-cache.m4, m4/gnulib-common.m4, m4/gnulib-comp.m4 ,
m4/include_next.m4, m4/inline.m4, m4/intmax_t.m4 ,
m4/inttypes_h.m4, m4/longlong.m4, m4/malloc.m4, m4/mempcpy.m4 ,
m4/printf.m4, m4/size_max.m4, m4/stdbool.m4, m4/stdint.m4 ,
m4/stdint_h.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/strcase.m4 ,
m4/strchrnul.m4, m4/strndup.m4, m4/strnlen.m4, m4/unistd_h.m4 ,
m4/vasnprintf.m4, m4/wchar.m4, m4/wchar_t.m4, m4/wint_t.m4 ,
m4/xsize.m4: Update.
m4/00gnulib.m4, m4/multiarch.m4: New files.
2009-06-05 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Add the pair-to-fmp command to TAF-Kit.
...
...
gnulib/Makefile.am
View file @
53678c4a
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-200
8
Free Software Foundation, Inc.
# Copyright (C) 2002-200
9
Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
...
...
@@ -27,6 +27,7 @@ DISTCLEANFILES =
MAINTAINERCLEANFILES
=
AM_CPPFLAGS
=
AM_CFLAGS
=
noinst_LTLIBRARIES
+=
libgnu.la
...
...
@@ -282,6 +283,7 @@ stdint.h: stdint.in.h
-e
's/@''HAVE_SYS_BITYPES_H''@/
$(HAVE_SYS_BITYPES_H)
/g'
\
-e
's/@''HAVE_LONG_LONG_INT''@/
$(HAVE_LONG_LONG_INT)
/g'
\
-e
's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/
$(HAVE_UNSIGNED_LONG_LONG_INT)
/g'
\
-e
's/@''APPLE_UNIVERSAL_BUILD''@/
$(APPLE_UNIVERSAL_BUILD)
/g'
\
-e
's/@''BITSIZEOF_PTRDIFF_T''@/
$(BITSIZEOF_PTRDIFF_T)
/g'
\
-e
's/@''PTRDIFF_T_SUFFIX''@/
$(PTRDIFF_T_SUFFIX)
/g'
\
-e
's/@''BITSIZEOF_SIG_ATOMIC_T''@/
$(BITSIZEOF_SIG_ATOMIC_T)
/g'
\
...
...
@@ -328,6 +330,8 @@ stdio.h: stdio.in.h
-e
's|@''GNULIB_VPRINTF_POSIX''@|
$(GNULIB_VPRINTF_POSIX)
|g'
\
-e
's|@''GNULIB_VSNPRINTF''@|
$(GNULIB_VSNPRINTF)
|g'
\
-e
's|@''GNULIB_VSPRINTF_POSIX''@|
$(GNULIB_VSPRINTF_POSIX)
|g'
\
-e
's|@''GNULIB_DPRINTF''@|
$(GNULIB_DPRINTF)
|g'
\
-e
's|@''GNULIB_VDPRINTF''@|
$(GNULIB_VDPRINTF)
|g'
\
-e
's|@''GNULIB_VASPRINTF''@|
$(GNULIB_VASPRINTF)
|g'
\
-e
's|@''GNULIB_OBSTACK_PRINTF''@|
$(GNULIB_OBSTACK_PRINTF)
|g'
\
-e
's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|
$(GNULIB_OBSTACK_PRINTF_POSIX)
|g'
\
...
...
@@ -360,6 +364,10 @@ stdio.h: stdio.in.h
-e
's|@''HAVE_DECL_VSNPRINTF''@|
$(HAVE_DECL_VSNPRINTF)
|g'
\
-e
's|@''REPLACE_SPRINTF''@|
$(REPLACE_SPRINTF)
|g'
\
-e
's|@''REPLACE_VSPRINTF''@|
$(REPLACE_VSPRINTF)
|g'
\
-e
's|@''HAVE_DPRINTF''@|
$(HAVE_DPRINTF)
|g'
\
-e
's|@''REPLACE_DPRINTF''@|
$(REPLACE_DPRINTF)
|g'
\
-e
's|@''HAVE_VDPRINTF''@|
$(HAVE_VDPRINTF)
|g'
\
-e
's|@''REPLACE_VDPRINTF''@|
$(REPLACE_VDPRINTF)
|g'
\
-e
's|@''HAVE_VASPRINTF''@|
$(HAVE_VASPRINTF)
|g'
\
-e
's|@''REPLACE_VASPRINTF''@|
$(REPLACE_VASPRINTF)
|g'
\
-e
's|@''HAVE_DECL_OBSTACK_PRINTF''@|
$(HAVE_DECL_OBSTACK_PRINTF)
|g'
\
...
...
@@ -400,6 +408,7 @@ stdlib.h: stdlib.in.h
sed
-e
's|@''INCLUDE_NEXT''@|
$(INCLUDE_NEXT)
|g'
\
-e
's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g'
\
-e
's|@''NEXT_STDLIB_H''@|
$(NEXT_STDLIB_H)
|g'
\
-e
's|@''HAVE_RANDOM_H''@|
$(HAVE_RANDOM_H)
|g'
\
-e
's|@''GNULIB_MALLOC_POSIX''@|
$(GNULIB_MALLOC_POSIX)
|g'
\
-e
's|@''GNULIB_REALLOC_POSIX''@|
$(GNULIB_REALLOC_POSIX)
|g'
\
-e
's|@''GNULIB_CALLOC_POSIX''@|
$(GNULIB_CALLOC_POSIX)
|g'
\
...
...
@@ -643,6 +652,7 @@ unistd.h: unistd.in.h
-e
's|@''GNULIB_GETPAGESIZE''@|
$(GNULIB_GETPAGESIZE)
|g'
\
-e
's|@''GNULIB_GETUSERSHELL''@|
$(GNULIB_GETUSERSHELL)
|g'
\
-e
's|@''GNULIB_LCHOWN''@|
$(GNULIB_LCHOWN)
|g'
\
-e
's|@''GNULIB_LINK''@|
$(GNULIB_LINK)
|g'
\
-e
's|@''GNULIB_LSEEK''@|
$(GNULIB_LSEEK)
|g'
\
-e
's|@''GNULIB_READLINK''@|
$(GNULIB_READLINK)
|g'
\
-e
's|@''GNULIB_SLEEP''@|
$(GNULIB_SLEEP)
|g'
\
...
...
@@ -657,6 +667,7 @@ unistd.h: unistd.in.h
-e
's|@''HAVE_GETHOSTNAME''@|
$(HAVE_GETHOSTNAME)
|g'
\
-e
's|@''HAVE_GETPAGESIZE''@|
$(HAVE_GETPAGESIZE)
|g'
\
-e
's|@''HAVE_GETUSERSHELL''@|
$(HAVE_GETUSERSHELL)
|g'
\
-e
's|@''HAVE_LINK''@|
$(HAVE_LINK)
|g'
\
-e
's|@''HAVE_READLINK''@|
$(HAVE_READLINK)
|g'
\
-e
's|@''HAVE_SLEEP''@|
$(HAVE_SLEEP)
|g'
\
-e
's|@''HAVE_DECL_ENVIRON''@|
$(HAVE_DECL_ENVIRON)
|g'
\
...
...
@@ -712,10 +723,41 @@ wchar.h: wchar.in.h
sed
-e
's|@''INCLUDE_NEXT''@|
$(INCLUDE_NEXT)
|g'
\
-e
's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g'
\
-e
's|@''NEXT_WCHAR_H''@|
$(NEXT_WCHAR_H)
|g'
\
-e
's/@''HAVE_WCHAR_H''@/
$(HAVE_WCHAR_H)
/g'
\
-e
's|@''HAVE_WCHAR_H''@|
$(HAVE_WCHAR_H)
|g'
\
-e
's|@''GNULIB_BTOWC''@|
$(GNULIB_BTOWC)
|g'
\
-e
's|@''GNULIB_WCTOB''@|
$(GNULIB_WCTOB)
|g'
\
-e
's|@''GNULIB_MBSINIT''@|
$(GNULIB_MBSINIT)
|g'
\
-e
's|@''GNULIB_MBRTOWC''@|
$(GNULIB_MBRTOWC)
|g'
\
-e
's|@''GNULIB_MBRLEN''@|
$(GNULIB_MBRLEN)
|g'
\
-e
's|@''GNULIB_MBSRTOWCS''@|
$(GNULIB_MBSRTOWCS)
|g'
\
-e
's|@''GNULIB_MBSNRTOWCS''@|
$(GNULIB_MBSNRTOWCS)
|g'
\
-e
's|@''GNULIB_WCRTOMB''@|
$(GNULIB_WCRTOMB)
|g'
\
-e
's|@''GNULIB_WCSRTOMBS''@|
$(GNULIB_WCSRTOMBS)
|g'
\
-e
's|@''GNULIB_WCSNRTOMBS''@|
$(GNULIB_WCSNRTOMBS)
|g'
\
-e
's|@''GNULIB_WCWIDTH''@|
$(GNULIB_WCWIDTH)
|g'
\
-e
's/@''HAVE_WINT_T''@/
$(HAVE_WINT_T)
/g'
\
-e
's|@''HAVE_WINT_T''@|
$(HAVE_WINT_T)
|g'
\
-e
's|@''HAVE_BTOWC''@|
$(HAVE_BTOWC)
|g'
\
-e
's|@''HAVE_MBSINIT''@|
$(HAVE_MBSINIT)
|g'
\
-e
's|@''HAVE_MBRTOWC''@|
$(HAVE_MBRTOWC)
|g'
\
-e
's|@''HAVE_MBRLEN''@|
$(HAVE_MBRLEN)
|g'
\
-e
's|@''HAVE_MBSRTOWCS''@|
$(HAVE_MBSRTOWCS)
|g'
\
-e
's|@''HAVE_MBSNRTOWCS''@|
$(HAVE_MBSNRTOWCS)
|g'
\
-e
's|@''HAVE_WCRTOMB''@|
$(HAVE_WCRTOMB)
|g'
\
-e
's|@''HAVE_WCSRTOMBS''@|
$(HAVE_WCSRTOMBS)
|g'
\
-e
's|@''HAVE_WCSNRTOMBS''@|
$(HAVE_WCSNRTOMBS)
|g'
\
-e
's|@''HAVE_DECL_WCTOB''@|
$(HAVE_DECL_WCTOB)
|g'
\
-e
's|@''HAVE_DECL_WCWIDTH''@|
$(HAVE_DECL_WCWIDTH)
|g'
\
-e
's|@''REPLACE_MBSTATE_T''@|
$(REPLACE_MBSTATE_T)
|g'
\
-e
's|@''REPLACE_BTOWC''@|
$(REPLACE_BTOWC)
|g'
\
-e
's|@''REPLACE_WCTOB''@|
$(REPLACE_WCTOB)
|g'
\
-e
's|@''REPLACE_MBSINIT''@|
$(REPLACE_MBSINIT)
|g'
\
-e
's|@''REPLACE_MBRTOWC''@|
$(REPLACE_MBRTOWC)
|g'
\
-e
's|@''REPLACE_MBRLEN''@|
$(REPLACE_MBRLEN)
|g'
\
-e
's|@''REPLACE_MBSRTOWCS''@|
$(REPLACE_MBSRTOWCS)
|g'
\
-e
's|@''REPLACE_MBSNRTOWCS''@|
$(REPLACE_MBSNRTOWCS)
|g'
\
-e
's|@''REPLACE_WCRTOMB''@|
$(REPLACE_WCRTOMB)
|g'
\
-e
's|@''REPLACE_WCSRTOMBS''@|
$(REPLACE_WCSRTOMBS)
|g'
\
-e
's|@''REPLACE_WCSNRTOMBS''@|
$(REPLACE_WCSNRTOMBS)
|g'
\
-e
's|@''REPLACE_WCWIDTH''@|
$(REPLACE_WCWIDTH)
|g'
\
-e
'/definition of GL_LINK_WARNING/r
$(LINK_WARNING_H)
'
\
<
$(srcdir)
/wchar.in.h
;
\
...
...
gnulib/argp-fmtstream.c
View file @
53678c4a
...
...
@@ -226,7 +226,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
int
i
;
p
=
buf
+
(
r
+
1
-
fs
->
point_col
);
while
(
p
>=
buf
&&
!
isblank
(
*
p
))
while
(
p
>=
buf
&&
!
isblank
(
(
unsigned
char
)
*
p
))
--
p
;
nextline
=
p
+
1
;
/* This will begin the next line. */
...
...
@@ -236,7 +236,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
if
(
p
>=
buf
)
do
--
p
;
while
(
p
>=
buf
&&
isblank
(
*
p
));
while
(
p
>=
buf
&&
isblank
(
(
unsigned
char
)
*
p
));
nl
=
p
+
1
;
/* The newline will replace the first blank. */
}
else
...
...
@@ -248,7 +248,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
if
(
p
<
nl
)
do
++
p
;
while
(
p
<
nl
&&
!
isblank
(
*
p
));
while
(
p
<
nl
&&
!
isblank
(
(
unsigned
char
)
*
p
));
if
(
p
==
nl
)
{
/* It already ends a line. No fussing required. */
...
...
@@ -261,7 +261,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
/* Swallow separating blanks. */
do
++
p
;
while
(
isblank
(
*
p
));
while
(
isblank
(
(
unsigned
char
)
*
p
));
/* The next line will start here. */
nextline
=
p
;
}
...
...
gnulib/getopt1.c
View file @
53678c4a
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006
,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
...
...
@@ -91,7 +91,7 @@ main (int argc, char **argv)
{
int
this_option_optind
=
optind
?
optind
:
1
;
int
option_index
=
0
;
static
struct
option
long_options
[]
=
static
const
struct
option
long_options
[]
=
{
{
"add"
,
1
,
0
,
0
},
{
"append"
,
0
,
0
,
0
},
...
...
gnulib/gettext.h
View file @
53678c4a
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
Copyright (C) 1995-1998, 2000-2002, 2004-2006
, 2009
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -63,21 +63,30 @@
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# undef gettext
# define gettext(Msgid) ((const char *) (Msgid))
# undef dgettext
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
# undef dcgettext
# define dcgettext(Domainname, Msgid, Category) \
((void) (Category), dgettext (Domainname, Msgid))
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 \
? ((void) (Msgid2), (const char *) (Msgid1)) \
: ((void) (Msgid1), (const char *) (Msgid2)))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
# undef textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# undef bindtextdomain
# define bindtextdomain(Domainname, Dirname) \
((void) (Domainname), (const char *) (Dirname))
# undef bind_textdomain_codeset
# define bind_textdomain_codeset(Domainname, Codeset) \
((void) (Domainname), (const char *) (Codeset))
...
...
gnulib/progname.c
View file @
53678c4a
/* Program name management.
Copyright (C) 2001-2003, 2005-200
8
Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-200
9
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
...
...
@@ -35,6 +35,8 @@ set_program_name (const char *argv0)
{
/* libtool creates a temporary executable whose name is sometimes prefixed
with "lt-" (depends on the platform). It also makes argv[0] absolute.
But the name of the temporary executable is a detail that should not be
visible to the end user and to the test suite.
Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */
const
char
*
slash
;
const
char
*
base
;
...
...
@@ -47,5 +49,15 @@ set_program_name (const char *argv0)
if
(
strncmp
(
base
,
"lt-"
,
3
)
==
0
)
argv0
=
base
+
3
;
}
/* But don't strip off a leading <dirname>/ in general, because when the user
runs
/some/hidden/place/bin/cp foo foo
he should get the error message
/some/hidden/place/bin/cp: `foo' and `foo' are the same file
not
cp: `foo' and `foo' are the same file
*/
program_name
=
argv0
;
}
gnulib/stdint.in.h
View file @
53678c4a
/* Copyright (C) 2001-2002, 2004-200
8
Free Software Foundation, Inc.
/* Copyright (C) 2001-2002, 2004-200
9
Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
...
...
@@ -89,15 +89,6 @@
# 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
#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for a integer type under the usual assumption.
...
...
@@ -150,7 +141,8 @@ typedef long int gl_int64_t;
# define GL_INT64_T
#elif defined _MSC_VER
# undef int64_t
# define int64_t __int64
typedef
__int64
gl_int64_t
;
# define int64_t gl_int64_t
# define GL_INT64_T
#elif @HAVE_LONG_LONG_INT@
# undef int64_t
...
...
@@ -166,7 +158,8 @@ typedef unsigned long int gl_uint64_t;
# define GL_UINT64_T
#elif defined _MSC_VER
# undef uint64_t
# define uint64_t unsigned __int64
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
...
...
@@ -250,8 +243,8 @@ typedef unsigned long int gl_uint_fast32_t;
#undef intptr_t
#undef uintptr_t
typedef
long
int
gl_intptr_t
;
#define intptr_t gl_intptr_t
typedef
unsigned
long
int
gl_uintptr_t
;
#define intptr_t gl_intptr_t
#define uintptr_t gl_uintptr_t
/* 7.18.1.5. Greatest-width integer types */
...
...
@@ -441,10 +434,20 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
/* ptrdiff_t limits */
#undef PTRDIFF_MIN
#undef PTRDIFF_MAX
#define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
# else
# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
# endif
#else
# define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#endif
/* sig_atomic_t limits */
#undef SIG_ATOMIC_MIN
...
...
@@ -459,9 +462,26 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
/* size_t limit */
#undef SIZE_MAX
#define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
#if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
# else
# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
# endif
#else
# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
#endif
/* 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
<stdint.h> and assumes its types are already defined. */
#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# include <wchar.h>
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
#endif
#undef WCHAR_MIN
#undef WCHAR_MAX
#define WCHAR_MIN \
...
...
gnulib/stdio.in.h
View file @
53678c4a
...
...
@@ -216,6 +216,38 @@ extern int vsprintf (char *str, const char *format, va_list args)
vsprintf (b, f, a))
#endif
#if @GNULIB_DPRINTF@
# if @REPLACE_DPRINTF@
# define dprintf rpl_dprintf
# endif
# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
extern
int
dprintf
(
int
fd
,
const
char
*
format
,
...)
__attribute__
((
__format__
(
__printf__
,
2
,
3
)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef dprintf
# define dprintf(d,f,a) \
(GL_LINK_WARNING ("dprintf is unportable - " \
"use gnulib module dprintf for portability"), \
dprintf (d, f, a))
#endif
#if @GNULIB_VDPRINTF@
# if @REPLACE_VDPRINTF@
# define vdprintf rpl_vdprintf
# endif
# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
extern
int
vdprintf
(
int
fd
,
const
char
*
format
,
va_list
args
)
__attribute__
((
__format__
(
__printf__
,
2
,
0
)));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vdprintf
# define vdprintf(d,f,a) \
(GL_LINK_WARNING ("vdprintf is unportable - " \
"use gnulib module vdprintf for portability"), \
vdprintf (d, f, a))
#endif
#if @GNULIB_VASPRINTF@
# if @REPLACE_VASPRINTF@
# define asprintf rpl_asprintf
...
...
gnulib/stdlib.in.h
View file @
53678c4a
/* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2004, 2006-200
8
Free Software Foundation, Inc.
Copyright (C) 1995, 2001-2004, 2006-200
9
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
...
...
@@ -41,6 +41,12 @@
# include <sys/loadavg.h>
#endif
/* 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
#if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
# include <stdint.h>
#endif
...
...
@@ -52,8 +58,8 @@ struct random_data
int32_t
*
rptr
;
/* Rear pointer. */
int32_t
*
state
;
/* Array of state values. */
int
rand_type
;
/* Type of random number generator. */
int
rand_deg
;
/* Degree of random number generator. */
int
rand_sep
;
/* Distance between front and rear. */
int
rand_deg
;
/* Degree of random number generator. */
int
rand_sep
;
/* Distance between front and rear. */
int32_t
*
end_ptr
;
/* Pointer behind state table. */
};
#endif
...
...
gnulib/strerror.c
View file @
53678c4a
/* strerror.c --- POSIX compatible system error routine
Copyright (C) 2007-200
8
Free Software Foundation, Inc.
Copyright (C) 2007-200
9
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,94 +40,133 @@
char
*
rpl_strerror
(
int
n
)
{
char
const
*
msg
=
NULL
;
/* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
switch
(
n
)
{
# if GNULIB_defined_ETXTBSY
case
ETXTBSY
:
return
"Text file busy"
;
msg
=
"Text file busy"
;
break
;
# endif
# if GNULIB_defined_ESOCK
/* native Windows platforms */
/* EWOULDBLOCK is the same as EAGAIN. */
case
EINPROGRESS
:
return
"Operation now in progress"
;
msg
=
"Operation now in progress"
;
break
;
case
EALREADY
:
return
"Operation already in progress"
;
msg
=
"Operation already in progress"
;
break
;
case
ENOTSOCK
:
return
"Socket operation on non-socket"
;
msg
=
"Socket operation on non-socket"
;
break
;
case
EDESTADDRREQ
:
return
"Destination address required"
;
msg
=
"Destination address required"
;
break
;
case
EMSGSIZE
:
return
"Message too long"
;
msg
=
"Message too long"
;
break
;
case
EPROTOTYPE
:
return
"Protocol wrong type for socket"
;
msg
=
"Protocol wrong type for socket"
;
break
;
case
ENOPROTOOPT
:
return
"Protocol not available"
;
msg
=
"Protocol not available"
;
break
;
case
EPROTONOSUPPORT
:
return
"Protocol not supported"
;
msg
=
"Protocol not supported"
;
break
;
case
ESOCKTNOSUPPORT
:
return
"Socket type not supported"
;
msg
=
"Socket type not supported"
;
break
;
case
EOPNOTSUPP
:
return
"Operation not supported"
;
msg
=
"Operation not supported"
;
break
;
case
EPFNOSUPPORT
:
return
"Protocol family not supported"
;
msg
=
"Protocol family not supported"
;
break
;
case
EAFNOSUPPORT
:
return
"Address family not supported by protocol"
;
msg
=
"Address family not supported by protocol"
;
break
;
case
EADDRINUSE
:
return
"Address already in use"
;
msg
=
"Address already in use"
;
break
;
case
EADDRNOTAVAIL
:
return
"Cannot assign requested address"
;
msg
=
"Cannot assign requested address"
;
break
;
case
ENETDOWN
:
return
"Network is down"
;
msg
=
"Network is down"
;
break
;
case
ENETUNREACH
:
return
"Network is unreachable"
;
msg
=
"Network is unreachable"
;
break
;
case
ENETRESET
:
return
"Network dropped connection on reset"
;
msg
=
"Network dropped connection on reset"
;
break
;
case
ECONNABORTED
:
return
"Software caused connection abort"
;
msg
=
"Software caused connection abort"
;
break
;
case
ECONNRESET
:
return
"Connection reset by peer"
;
msg
=
"Connection reset by peer"
;
break
;
case
ENOBUFS
:
return
"No buffer space available"
;
msg
=
"No buffer space available"
;
break
;
case
EISCONN
:
return
"Transport endpoint is already connected"
;
msg
=
"Transport endpoint is already connected"
;
break
;
case
ENOTCONN
:
return
"Transport endpoint is not connected"
;
msg
=
"Transport endpoint is not connected"
;
break
;
case
ESHUTDOWN
:
return
"Cannot send after transport endpoint shutdown"
;
msg
=
"Cannot send after transport endpoint shutdown"
;
break
;
case
ETOOMANYREFS
:
return
"Too many references: cannot splice"
;
msg
=
"Too many references: cannot splice"
;
break
;
case
ETIMEDOUT
:
return
"Connection timed out"
;
msg
=
"Connection timed out"
;
break
;
case
ECONNREFUSED
:
return
"Connection refused"
;
msg
=
"Connection refused"
;
break
;
case
ELOOP
:
return
"Too many levels of symbolic links"
;
msg
=
"Too many levels of symbolic links"
;
break
;
case
EHOSTDOWN
:
return
"Host is down"
;
msg
=
"Host is down"
;
break
;
case
EHOSTUNREACH
:
return
"No route to host"
;
msg
=
"No route to host"
;
break
;
case
EPROCLIM
:
return
"Too many processes"
;
msg
=
"Too many processes"
;
break
;
case
EUSERS
:
return
"Too many users"
;
msg
=
"Too many users"
;
break
;
case
EDQUOT
:
return
"Disk quota exceeded"
;
msg
=
"Disk quota exceeded"
;
break
;
case
ESTALE
:
return
"Stale NFS file handle"
;
msg
=
"Stale NFS file handle"
;
break
;
case
EREMOTE
:
return
"Object is remote"
;
msg
=
"Object is remote"
;
break
;
# if HAVE_WINSOCK2_H
/* WSA_INVALID_HANDLE maps to EBADF */
/* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
/* WSA_INVALID_PARAMETER maps to EINVAL */
case
WSA_OPERATION_ABORTED
:
return
"Overlapped operation aborted"
;
msg
=
"Overlapped operation aborted"
;
break
;
case
WSA_IO_INCOMPLETE
:
return
"Overlapped I/O event object not in signaled state"
;
msg
=
"Overlapped I/O event object not in signaled state"
;
break
;
case
WSA_IO_PENDING
:
return
"Overlapped operations will complete later"
;
msg
=
"Overlapped operations will complete later"
;
break
;
/* WSAEINTR maps to EINTR */
/* WSAEBADF maps to EBADF */
/* WSAEACCES maps to EACCES */
...
...
@@ -172,98 +211,127 @@ rpl_strerror (int n)
/* WSAESTALE is ESTALE */
/* WSAEREMOTE is EREMOTE */
case
WSASYSNOTREADY
:
return
"Network subsystem is unavailable"
;
msg
=
"Network subsystem is unavailable"
;
break
;
case
WSAVERNOTSUPPORTED
:
return
"Winsock.dll version out of range"
;
msg
=
"Winsock.dll version out of range"
;
break
;
case
WSANOTINITIALISED
:
return
"Successful WSAStartup not yet performed"
;
msg
=
"Successful WSAStartup not yet performed"
;
break
;
case
WSAEDISCON
:
return
"Graceful shutdown in progress"
;
msg
=
"Graceful shutdown in progress"
;
break
;
case
WSAENOMORE
:
case
WSA_E_NO_MORE
:
return
"No more results"
;
msg
=
"No more results"
;
break
;
case
WSAECANCELLED
:
case
WSA_E_CANCELLED
:
return
"Call was canceled"
;
msg
=
"Call was canceled"
;
break
;
case
WSAEINVALIDPROCTABLE
:
return
"Procedure call table is invalid"
;
msg
=
"Procedure call table is invalid"
;
break
;
case
WSAEINVALIDPROVIDER
:
return
"Service provider is invalid"
;
msg
=