gnulib: Upgrade and build as a libtool library.

* lib/Makefile.am lib/alloca.in.h lib/argp-ba.c lib/argp-eexst.c
lib/argp-fmtstream.c lib/argp-fmtstream.h lib/argp-fs-xinl.c
lib/argp-help.c lib/argp-namefrob.h lib/argp-parse.c lib/argp-pin.c
lib/argp-pv.c lib/argp-pvh.c lib/argp-xinl.c lib/argp.h lib/asnprintf.c
lib/basename-lgpl.c lib/dirname-lgpl.c lib/dirname.h lib/dosname.h
lib/errno.in.h lib/error.c lib/error.h lib/fcntl.in.h lib/float+.h
lib/float.c lib/float.in.h lib/gethrxtime.c lib/gethrxtime.h
lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h
lib/gettext.h lib/gettime.c lib/gettimeofday.c lib/intprops.h
lib/itold.c lib/lstat.c lib/malloc.c lib/memchr.c lib/mempcpy.c
lib/mkstemp.c lib/msvc-inval.c lib/msvc-inval.h lib/msvc-nothrow.c
lib/msvc-nothrow.h lib/pathmax.h lib/printf-args.c lib/printf-args.h
lib/printf-parse.c lib/printf-parse.h lib/progname.c lib/progname.h
lib/rawmemchr.c lib/size_max.h lib/sleep.c lib/stat.c lib/stdalign.in.h
lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h lib/stdio.in.h
lib/stdlib.in.h lib/strcasecmp.c lib/strchrnul.c lib/strerror-override.c
lib/strerror-override.h lib/strerror.c lib/string.in.h lib/strings.in.h
lib/stripslash.c lib/strncasecmp.c lib/strndup.c lib/strnlen.c
lib/sys_stat.in.h lib/sys_time.in.h lib/sys_types.in.h lib/sys_wait.in.h
lib/sysexits.in.h lib/tempname.c lib/tempname.h lib/time.in.h
lib/timespec.h lib/unistd.in.h lib/vasnprintf.c lib/vasnprintf.h
lib/verify.h lib/vsnprintf.c lib/wchar.in.h lib/xsize.h lib/xtime.h
m4/00gnulib.m4 m4/alloca.m4 m4/argp.m4 m4/clock_time.m4 m4/dirname.m4
m4/double-slash-root.m4 m4/errno_h.m4 m4/error.m4 m4/exponentd.m4
m4/extensions.m4 m4/extern-inline.m4 m4/fcntl-o.m4 m4/fcntl_h.m4
m4/float_h.m4 m4/gethrxtime.m4 m4/getopt.m4 m4/gettime.m4
m4/gettimeofday.m4 m4/gnulib-cache.m4 m4/gnulib-common.m4
m4/gnulib-comp.m4 m4/gnulib-tool.m4 m4/include_next.m4 m4/intmax_t.m4
m4/inttypes_h.m4 m4/largefile.m4 m4/longlong.m4 m4/lstat.m4 m4/malloc.m4
m4/math_h.m4 m4/memchr.m4 m4/mempcpy.m4 m4/mkstemp.m4 m4/mmap-anon.m4
m4/msvc-inval.m4 m4/msvc-nothrow.m4 m4/multiarch.m4 m4/nocrash.m4
m4/off_t.m4 m4/pathmax.m4 m4/printf.m4 m4/rawmemchr.m4 m4/size_max.m4
m4/sleep.m4 m4/ssize_t.m4 m4/stat.m4 m4/stdalign.m4 m4/stdbool.m4
m4/stddef_h.m4 m4/stdint.m4 m4/stdint_h.m4 m4/stdio_h.m4 m4/stdlib_h.m4
m4/strcase.m4 m4/strchrnul.m4 m4/strerror.m4 m4/string_h.m4
m4/strings_h.m4 m4/strndup.m4 m4/strnlen.m4 m4/sys_socket_h.m4
m4/sys_stat_h.m4 m4/sys_time_h.m4 m4/sys_types_h.m4 m4/sys_wait_h.m4
m4/sysexits.m4 m4/tempname.m4 m4/time_h.m4 m4/timespec.m4 m4/unistd_h.m4
m4/vasnprintf.m4 m4/vsnprintf.m4 m4/warn-on-use.m4 m4/wchar_h.m4
m4/wchar_t.m4 m4/wint_t.m4 m4/xsize.m4 tools/snippet/arg-nonnull.h
tools/snippet/c++defs.h tools/snippet/warn-on-use.h: Upgrade to
gnulib 9ceceed274f83094127f9ff0bf061293c9fe1e7f.
* m4/secure_getenv.m4, lib/secure_getenv.c, lib/unistd.c,
lib/xtime.c: New files.
* src/bin/Makefile.am: Link with the libtool library.
This commit is contained in:
Alexandre Duret-Lutz 2013-07-04 18:56:29 +02:00
parent cee552689a
commit f8cdaf0c12
178 changed files with 697 additions and 503 deletions

2
lib/.gitignore vendored
View file

@ -1,6 +1,7 @@
alloca.h alloca.h
arg-nonnull.h arg-nonnull.h
c++defs.h c++defs.h
dummy.c
fcntl.h fcntl.h
getopt.h getopt.h
libgnu.a libgnu.a
@ -14,3 +15,4 @@ time.h
unistd.h unistd.h
warn-on-use.h warn-on-use.h
wchar.h wchar.h
wctype.h

View file

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY! ## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2012 Free Software Foundation, Inc. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
# #
# This file is free software; you can redistribute it and/or modify # This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -21,9 +21,9 @@
# the same distribution terms as the rest of that program. # the same distribution terms as the rest of that program.
# #
# Generated by gnulib-tool. # Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=tools --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files --no-libtool --no-vc-files argp error gethrxtime mkstemp progname sys_wait # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=tools --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files argp error gethrxtime mkstemp progname sys_wait
AUTOMAKE_OPTIONS = 1.5 gnits AUTOMAKE_OPTIONS = 1.9.6 gnits
SUBDIRS = SUBDIRS =
noinst_HEADERS = noinst_HEADERS =
@ -41,21 +41,26 @@ MAINTAINERCLEANFILES =
AM_CPPFLAGS = AM_CPPFLAGS =
AM_CFLAGS = AM_CFLAGS =
noinst_LIBRARIES += libgnu.a noinst_LTLIBRARIES += libgnu.la
libgnu_a_SOURCES = libgnu_la_SOURCES =
libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_la_LIBADD = $(gl_LTLIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
EXTRA_libgnu_a_SOURCES = EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
libgnu_la_LDFLAGS += -no-undefined
libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
libgnu_la_LDFLAGS += $(LIB_GETHRXTIME)
libgnu_la_LDFLAGS += $(LTLIBINTL)
## begin gnulib module alloca ## begin gnulib module alloca
libgnu_a_LIBADD += @ALLOCA@ libgnu_la_LIBADD += @LTALLOCA@
libgnu_a_DEPENDENCIES += @ALLOCA@ libgnu_la_DEPENDENCIES += @LTALLOCA@
EXTRA_DIST += alloca.c EXTRA_DIST += alloca.c
EXTRA_libgnu_a_SOURCES += alloca.c EXTRA_libgnu_la_SOURCES += alloca.c
## end gnulib module alloca ## end gnulib module alloca
@ -84,7 +89,7 @@ EXTRA_DIST += alloca.in.h
## begin gnulib module argp ## begin gnulib module argp
libgnu_a_SOURCES += argp.h argp-ba.c argp-eexst.c \ libgnu_la_SOURCES += argp.h argp-ba.c argp-eexst.c \
argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c \ argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c \
argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c \ argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c \
argp-xinl.c argp-xinl.c
@ -93,7 +98,7 @@ libgnu_a_SOURCES += argp.h argp-ba.c argp-eexst.c \
## begin gnulib module dirname-lgpl ## begin gnulib module dirname-lgpl
libgnu_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c libgnu_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
EXTRA_DIST += dirname.h EXTRA_DIST += dirname.h
@ -145,7 +150,7 @@ EXTRA_DIST += errno.in.h
EXTRA_DIST += error.c error.h EXTRA_DIST += error.c error.h
EXTRA_libgnu_a_SOURCES += error.c EXTRA_libgnu_la_SOURCES += error.c
## end gnulib module error ## end gnulib module error
@ -211,16 +216,15 @@ MOSTLYCLEANFILES += float.h float.h-t
EXTRA_DIST += float.c float.in.h itold.c EXTRA_DIST += float.c float.in.h itold.c
EXTRA_libgnu_a_SOURCES += float.c itold.c EXTRA_libgnu_la_SOURCES += float.c itold.c
## end gnulib module float ## end gnulib module float
## begin gnulib module gethrxtime ## begin gnulib module gethrxtime
libgnu_la_SOURCES += gethrxtime.c xtime.c
EXTRA_DIST += gethrxtime.c gethrxtime.h xtime.h EXTRA_DIST += gethrxtime.h xtime.h
EXTRA_libgnu_a_SOURCES += gethrxtime.c
## end gnulib module gethrxtime ## end gnulib module gethrxtime
@ -247,19 +251,19 @@ MOSTLYCLEANFILES += getopt.h getopt.h-t
EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c
## end gnulib module getopt-posix ## end gnulib module getopt-posix
## begin gnulib module gettext-h ## begin gnulib module gettext-h
libgnu_a_SOURCES += gettext.h libgnu_la_SOURCES += gettext.h
## end gnulib module gettext-h ## end gnulib module gettext-h
## begin gnulib module gettime ## begin gnulib module gettime
libgnu_a_SOURCES += gettime.c libgnu_la_SOURCES += gettime.c
## end gnulib module gettime ## end gnulib module gettime
@ -268,7 +272,7 @@ libgnu_a_SOURCES += gettime.c
EXTRA_DIST += gettimeofday.c EXTRA_DIST += gettimeofday.c
EXTRA_libgnu_a_SOURCES += gettimeofday.c EXTRA_libgnu_la_SOURCES += gettimeofday.c
## end gnulib module gettimeofday ## end gnulib module gettimeofday
@ -284,7 +288,7 @@ EXTRA_DIST += intprops.h
EXTRA_DIST += lstat.c EXTRA_DIST += lstat.c
EXTRA_libgnu_a_SOURCES += lstat.c EXTRA_libgnu_la_SOURCES += lstat.c
## end gnulib module lstat ## end gnulib module lstat
@ -293,7 +297,7 @@ EXTRA_libgnu_a_SOURCES += lstat.c
EXTRA_DIST += malloc.c EXTRA_DIST += malloc.c
EXTRA_libgnu_a_SOURCES += malloc.c EXTRA_libgnu_la_SOURCES += malloc.c
## end gnulib module malloc-gnu ## end gnulib module malloc-gnu
@ -302,7 +306,7 @@ EXTRA_libgnu_a_SOURCES += malloc.c
EXTRA_DIST += malloc.c EXTRA_DIST += malloc.c
EXTRA_libgnu_a_SOURCES += malloc.c EXTRA_libgnu_la_SOURCES += malloc.c
## end gnulib module malloc-posix ## end gnulib module malloc-posix
@ -311,7 +315,7 @@ EXTRA_libgnu_a_SOURCES += malloc.c
EXTRA_DIST += memchr.c memchr.valgrind EXTRA_DIST += memchr.c memchr.valgrind
EXTRA_libgnu_a_SOURCES += memchr.c EXTRA_libgnu_la_SOURCES += memchr.c
## end gnulib module memchr ## end gnulib module memchr
@ -320,7 +324,7 @@ EXTRA_libgnu_a_SOURCES += memchr.c
EXTRA_DIST += mempcpy.c EXTRA_DIST += mempcpy.c
EXTRA_libgnu_a_SOURCES += mempcpy.c EXTRA_libgnu_la_SOURCES += mempcpy.c
## end gnulib module mempcpy ## end gnulib module mempcpy
@ -329,7 +333,7 @@ EXTRA_libgnu_a_SOURCES += mempcpy.c
EXTRA_DIST += mkstemp.c EXTRA_DIST += mkstemp.c
EXTRA_libgnu_a_SOURCES += mkstemp.c EXTRA_libgnu_la_SOURCES += mkstemp.c
## end gnulib module mkstemp ## end gnulib module mkstemp
@ -338,7 +342,7 @@ EXTRA_libgnu_a_SOURCES += mkstemp.c
EXTRA_DIST += msvc-inval.c msvc-inval.h EXTRA_DIST += msvc-inval.c msvc-inval.h
EXTRA_libgnu_a_SOURCES += msvc-inval.c EXTRA_libgnu_la_SOURCES += msvc-inval.c
## end gnulib module msvc-inval ## end gnulib module msvc-inval
@ -347,7 +351,7 @@ EXTRA_libgnu_a_SOURCES += msvc-inval.c
EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h
EXTRA_libgnu_a_SOURCES += msvc-nothrow.c EXTRA_libgnu_la_SOURCES += msvc-nothrow.c
## end gnulib module msvc-nothrow ## end gnulib module msvc-nothrow
@ -360,7 +364,7 @@ EXTRA_DIST += pathmax.h
## begin gnulib module progname ## begin gnulib module progname
libgnu_a_SOURCES += progname.h progname.c libgnu_la_SOURCES += progname.h progname.c
## end gnulib module progname ## end gnulib module progname
@ -369,13 +373,22 @@ libgnu_a_SOURCES += progname.h progname.c
EXTRA_DIST += rawmemchr.c rawmemchr.valgrind EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
EXTRA_libgnu_a_SOURCES += rawmemchr.c EXTRA_libgnu_la_SOURCES += rawmemchr.c
## end gnulib module rawmemchr ## end gnulib module rawmemchr
## begin gnulib module secure_getenv
EXTRA_DIST += secure_getenv.c
EXTRA_libgnu_la_SOURCES += secure_getenv.c
## end gnulib module secure_getenv
## begin gnulib module size_max ## begin gnulib module size_max
libgnu_a_SOURCES += size_max.h libgnu_la_SOURCES += size_max.h
## end gnulib module size_max ## end gnulib module size_max
@ -384,7 +397,7 @@ libgnu_a_SOURCES += size_max.h
EXTRA_DIST += sleep.c EXTRA_DIST += sleep.c
EXTRA_libgnu_a_SOURCES += sleep.c EXTRA_libgnu_la_SOURCES += sleep.c
## end gnulib module sleep ## end gnulib module sleep
@ -474,7 +487,7 @@ EXTRA_DIST += $(top_srcdir)/tools/snippet/warn-on-use.h
EXTRA_DIST += stat.c EXTRA_DIST += stat.c
EXTRA_libgnu_a_SOURCES += stat.c EXTRA_libgnu_la_SOURCES += stat.c
## end gnulib module stat ## end gnulib module stat
@ -770,6 +783,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
-e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
-e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
-e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
-e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
-e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
@ -798,6 +812,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
-e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@ -838,7 +853,7 @@ EXTRA_DIST += stdlib.in.h
EXTRA_DIST += strcasecmp.c strncasecmp.c EXTRA_DIST += strcasecmp.c strncasecmp.c
EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c EXTRA_libgnu_la_SOURCES += strcasecmp.c strncasecmp.c
## end gnulib module strcase ## end gnulib module strcase
@ -847,7 +862,7 @@ EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c
EXTRA_DIST += strchrnul.c strchrnul.valgrind EXTRA_DIST += strchrnul.c strchrnul.valgrind
EXTRA_libgnu_a_SOURCES += strchrnul.c EXTRA_libgnu_la_SOURCES += strchrnul.c
## end gnulib module strchrnul ## end gnulib module strchrnul
@ -856,7 +871,7 @@ EXTRA_libgnu_a_SOURCES += strchrnul.c
EXTRA_DIST += strerror.c EXTRA_DIST += strerror.c
EXTRA_libgnu_a_SOURCES += strerror.c EXTRA_libgnu_la_SOURCES += strerror.c
## end gnulib module strerror ## end gnulib module strerror
@ -865,7 +880,7 @@ EXTRA_libgnu_a_SOURCES += strerror.c
EXTRA_DIST += strerror-override.c strerror-override.h EXTRA_DIST += strerror-override.c strerror-override.h
EXTRA_libgnu_a_SOURCES += strerror-override.c EXTRA_libgnu_la_SOURCES += strerror-override.c
## end gnulib module strerror-override ## end gnulib module strerror-override
@ -1005,7 +1020,7 @@ EXTRA_DIST += strings.in.h
EXTRA_DIST += strndup.c EXTRA_DIST += strndup.c
EXTRA_libgnu_a_SOURCES += strndup.c EXTRA_libgnu_la_SOURCES += strndup.c
## end gnulib module strndup ## end gnulib module strndup
@ -1014,7 +1029,7 @@ EXTRA_libgnu_a_SOURCES += strndup.c
EXTRA_DIST += strnlen.c EXTRA_DIST += strnlen.c
EXTRA_libgnu_a_SOURCES += strnlen.c EXTRA_libgnu_la_SOURCES += strnlen.c
## end gnulib module strnlen ## end gnulib module strnlen
@ -1198,7 +1213,7 @@ EXTRA_DIST += sysexits.in.h
## begin gnulib module tempname ## begin gnulib module tempname
libgnu_a_SOURCES += tempname.c libgnu_la_SOURCES += tempname.c
EXTRA_DIST += tempname.h EXTRA_DIST += tempname.h
@ -1248,7 +1263,7 @@ EXTRA_DIST += time.in.h
## begin gnulib module timespec ## begin gnulib module timespec
libgnu_a_SOURCES += timespec.c libgnu_la_SOURCES += timespec.c
EXTRA_DIST += timespec.h EXTRA_DIST += timespec.h
@ -1257,6 +1272,7 @@ EXTRA_DIST += timespec.h
## begin gnulib module unistd ## begin gnulib module unistd
BUILT_SOURCES += unistd.h BUILT_SOURCES += unistd.h
libgnu_la_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for # We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one. # <unistd.h> when the system doesn't have one.
@ -1409,7 +1425,7 @@ EXTRA_DIST += unistd.in.h
EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c EXTRA_libgnu_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
## end gnulib module vasnprintf ## end gnulib module vasnprintf
@ -1425,7 +1441,7 @@ EXTRA_DIST += verify.h
EXTRA_DIST += vsnprintf.c EXTRA_DIST += vsnprintf.c
EXTRA_libgnu_a_SOURCES += vsnprintf.c EXTRA_libgnu_la_SOURCES += vsnprintf.c
## end gnulib module vsnprintf ## end gnulib module vsnprintf
@ -1552,7 +1568,7 @@ EXTRA_DIST += wchar.in.h
## begin gnulib module xsize ## begin gnulib module xsize
libgnu_a_SOURCES += xsize.h xsize.c libgnu_la_SOURCES += xsize.h xsize.c
## end gnulib module xsize ## end gnulib module xsize

View file

@ -1,6 +1,6 @@
/* Memory allocation on the stack. /* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation, Copyright (C) 1995, 1999, 2001-2004, 2006-2013 Free Software Foundation,
Inc. Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS. /* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
Copyright (C) 1996-1997, 1999, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1996-1997, 1999, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Default definition for ARGP_ERR_EXIT_STATUS /* Default definition for ARGP_ERR_EXIT_STATUS
Copyright (C) 1997, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1997, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams /* Word-wrapping and line-truncating streams
Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2012 Free Software Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams. /* Word-wrapping and line-truncating streams.
Copyright (C) 1997, 2006-2012 Free Software Foundation, Inc. Copyright (C) 1997, 2006-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.
@ -133,7 +133,7 @@ extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
const char *__fmt, ...) const char *__fmt, ...)
_GL_ATTRIBUTE_FORMAT ((printf, 2, 3)); _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
#if _LIBC || !defined __OPTIMIZE__ #if _LIBC
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
@ -154,7 +154,7 @@ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin #define __argp_fmtstream_rmargin argp_fmtstream_rmargin
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
#if _LIBC || !defined __OPTIMIZE__ #if _LIBC
/* Set __FS's left margin to LMARGIN and return the old value. */ /* Set __FS's left margin to LMARGIN and return the old value. */
extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
size_t __lmargin); size_t __lmargin);
@ -184,7 +184,7 @@ extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
#ifdef __OPTIMIZE__ #if !_LIBC || defined __OPTIMIZE__
/* Inline versions of above routines. */ /* Inline versions of above routines. */
#if !_LIBC #if !_LIBC
@ -197,6 +197,10 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
#define __argp_fmtstream_point argp_fmtstream_point #define __argp_fmtstream_point argp_fmtstream_point
#define __argp_fmtstream_update _argp_fmtstream_update #define __argp_fmtstream_update _argp_fmtstream_update
#define __argp_fmtstream_ensure _argp_fmtstream_ensure #define __argp_fmtstream_ensure _argp_fmtstream_ensure
_GL_INLINE_HEADER_BEGIN
#ifndef ARGP_FS_EI
# define ARGP_FS_EI _GL_INLINE
#endif
#endif #endif
#ifndef ARGP_FS_EI #ifndef ARGP_FS_EI
@ -345,9 +349,10 @@ __argp_fmtstream_point (argp_fmtstream_t __fs)
#undef __argp_fmtstream_point #undef __argp_fmtstream_point
#undef __argp_fmtstream_update #undef __argp_fmtstream_update
#undef __argp_fmtstream_ensure #undef __argp_fmtstream_ensure
_GL_INLINE_HEADER_END
#endif #endif
#endif /* __OPTIMIZE__ */ #endif /* !_LIBC || __OPTIMIZE__ */
#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */ #endif /* ARGP_FMTSTREAM_USE_LINEWRAP */

View file

@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp-fmtstream.h /* Real definitions for extern inline functions in argp-fmtstream.h
Copyright (C) 1997, 2003-2004, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1997, 2003-2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.
@ -20,7 +20,11 @@
# include <config.h> # include <config.h>
#endif #endif
#define ARGP_FS_EI #ifdef _LIBC
# define ARGP_FS_EI
#else
# define ARGP_FS_EI _GL_EXTERN_INLINE
#endif
#undef __OPTIMIZE__ #undef __OPTIMIZE__
#define __OPTIMIZE__ 1 #define __OPTIMIZE__ 1
#include "argp-fmtstream.h" #include "argp-fmtstream.h"

View file

@ -1,5 +1,5 @@
/* Hierarchical argument parsing help output /* Hierarchical argument parsing help output
Copyright (C) 1995-2005, 2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1995-2005, 2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.
@ -649,7 +649,7 @@ hol_find_entry (struct hol *hol, const char *name)
return 0; return 0;
} }
/* If an entry with the long option NAME occurs in HOL, set it's special /* If an entry with the long option NAME occurs in HOL, set its special
sort position to GROUP. */ sort position to GROUP. */
static void static void
hol_set_group (struct hol *hol, const char *name, int group) hol_set_group (struct hol *hol, const char *name, int group)

View file

@ -1,5 +1,5 @@
/* Name frobnication for compiling argp outside of glibc /* Name frobnication for compiling argp outside of glibc
Copyright (C) 1997, 2003, 2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1997, 2003, 2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt /* Hierarchical argument parsing, layered over getopt
Copyright (C) 1995-2000, 2002-2004, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1995-2000, 2002-2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Full and short program names for argp module /* Full and short program names for argp module
Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION. /* Default definition for ARGP_PROGRAM_VERSION.
Copyright (C) 1996-1997, 1999, 2006, 2009-2012 Free Software Foundation, Copyright (C) 1996-1997, 1999, 2006, 2009-2013 Free Software Foundation,
Inc. Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION_HOOK. /* Default definition for ARGP_PROGRAM_VERSION_HOOK.
Copyright (C) 1996-1997, 1999, 2004, 2009-2012 Free Software Foundation, Copyright (C) 1996-1997, 1999, 2004, 2009-2013 Free Software Foundation,
Inc. Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.

View file

@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp.h /* Real definitions for extern inline functions in argp.h
Copyright (C) 1997-1998, 2004, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1997-1998, 2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.
@ -27,7 +27,11 @@
#ifndef __USE_EXTERN_INLINES #ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1 # define __USE_EXTERN_INLINES 1
#endif #endif
#define ARGP_EI #ifdef _LIBC
# define ARGP_EI
#else
# define ARGP_EI _GL_EXTERN_INLINE
#endif
#undef __OPTIMIZE__ #undef __OPTIMIZE__
#define __OPTIMIZE__ 1 #define __OPTIMIZE__ 1
#include "argp.h" #include "argp.h"

View file

@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt. /* Hierarchical argument parsing, layered over getopt.
Copyright (C) 1995-1999, 2003-2012 Free Software Foundation, Inc. Copyright (C) 1995-1999, 2003-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.
@ -519,7 +519,7 @@ extern void __argp_state_help (const struct argp_state *__restrict __state,
FILE *__restrict __stream, FILE *__restrict __stream,
unsigned int __flags); unsigned int __flags);
#if _LIBC || !defined __USE_EXTERN_INLINES #if _LIBC
/* Possibly output the standard usage message for ARGP to stderr and exit. */ /* Possibly output the standard usage message for ARGP to stderr and exit. */
extern void argp_usage (const struct argp_state *__state); extern void argp_usage (const struct argp_state *__state);
extern void __argp_usage (const struct argp_state *__state); extern void __argp_usage (const struct argp_state *__state);
@ -552,7 +552,7 @@ extern void __argp_failure (const struct argp_state *__restrict __state,
const char *__restrict __fmt, ...) const char *__restrict __fmt, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5)); _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
#if _LIBC || !defined __USE_EXTERN_INLINES #if _LIBC
/* Returns true if the option OPT is a valid short option. */ /* Returns true if the option OPT is a valid short option. */
extern int _option_is_short (const struct argp_option *__opt) __THROW; extern int _option_is_short (const struct argp_option *__opt) __THROW;
extern int __option_is_short (const struct argp_option *__opt) __THROW; extern int __option_is_short (const struct argp_option *__opt) __THROW;
@ -572,13 +572,17 @@ extern void *__argp_input (const struct argp *__restrict __argp,
const struct argp_state *__restrict __state) const struct argp_state *__restrict __state)
__THROW; __THROW;
#ifdef __USE_EXTERN_INLINES #if !_LIBC || defined __USE_EXTERN_INLINES
# if !_LIBC # if !_LIBC
# define __argp_usage argp_usage # define __argp_usage argp_usage
# define __argp_state_help argp_state_help # define __argp_state_help argp_state_help
# define __option_is_short _option_is_short # define __option_is_short _option_is_short
# define __option_is_end _option_is_end # define __option_is_end _option_is_end
_GL_INLINE_HEADER_BEGIN
# ifndef ARGP_EI
# define ARGP_EI _GL_INLINE
# endif
# endif # endif
# ifndef ARGP_EI # ifndef ARGP_EI
@ -635,6 +639,7 @@ __NTH (__option_is_end (const struct argp_option *__opt))
# undef __argp_state_help # undef __argp_state_help
# undef __option_is_short # undef __option_is_short
# undef __option_is_end # undef __option_is_end
_GL_INLINE_HEADER_END
# endif # endif
#endif /* Use extern inlines. */ #endif /* Use extern inlines. */

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>. /* A POSIX-like <errno.h>.
Copyright (C) 2008-2012 Free Software Foundation, Inc. Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -270,5 +270,10 @@
# define GNULIB_defined_ENOTRECOVERABLE 1 # define GNULIB_defined_ENOTRECOVERABLE 1
# endif # endif
# ifndef EILSEQ
# define EILSEQ 2015
# define GNULIB_defined_EILSEQ 1
# endif
#endif /* _@GUARD_PREFIX@_ERRNO_H */ #endif /* _@GUARD_PREFIX@_ERRNO_H */
#endif /* _@GUARD_PREFIX@_ERRNO_H */ #endif /* _@GUARD_PREFIX@_ERRNO_H */

View file

@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities /* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1990-1998, 2000-2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -121,7 +121,7 @@ extern char *program_name;
#if !_LIBC #if !_LIBC
/* Return non-zero if FD is open. */ /* Return non-zero if FD is open. */
static inline int static int
is_open (int fd) is_open (int fd)
{ {
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@ -139,7 +139,7 @@ is_open (int fd)
} }
#endif #endif
static inline void static void
flush_stdout (void) flush_stdout (void)
{ {
#if !_LIBC #if !_LIBC

View file

@ -1,5 +1,5 @@
/* Declaration for error-reporting function /* Declaration for error-reporting function
Copyright (C) 1995-1997, 2003, 2006, 2008-2012 Free Software Foundation, Copyright (C) 1995-1997, 2003, 2006, 2008-2013 Free Software Foundation,
Inc. Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.

View file

@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0. /* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2012 Free Software Foundation, Inc. Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -216,6 +216,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ # define O_EXEC O_RDONLY /* This is often close enough in older systems. */
#endif #endif
#ifndef O_IGNORE_CTTY
# define O_IGNORE_CTTY 0
#endif
#ifndef O_NDELAY #ifndef O_NDELAY
# define O_NDELAY 0 # define O_NDELAY 0
#endif #endif
@ -249,10 +253,18 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_NOFOLLOW 0 # define O_NOFOLLOW 0
#endif #endif
#ifndef O_NOLINK
# define O_NOLINK 0
#endif
#ifndef O_NOLINKS #ifndef O_NOLINKS
# define O_NOLINKS 0 # define O_NOLINKS 0
#endif #endif
#ifndef O_NOTRANS
# define O_NOTRANS 0
#endif
#ifndef O_RSYNC #ifndef O_RSYNC
# define O_RSYNC 0 # define O_RSYNC 0
#endif #endif
@ -269,7 +281,7 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_TTY_INIT 0 # define O_TTY_INIT 0
#endif #endif
#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) #if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
# undef O_ACCMODE # undef O_ACCMODE
# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
#endif #endif

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* gethrxtime -- get high resolution real time /* gethrxtime -- get high resolution real time
Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -19,8 +19,11 @@
#include <config.h> #include <config.h>
#define GETHRXTIME_INLINE _GL_EXTERN_INLINE
#include "gethrxtime.h" #include "gethrxtime.h"
#if ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME)
#include <sys/time.h> #include <sys/time.h>
#include "timespec.h" #include "timespec.h"
@ -32,30 +35,30 @@
xtime_t xtime_t
gethrxtime (void) gethrxtime (void)
{ {
#if HAVE_NANOUPTIME # if HAVE_NANOUPTIME
{ {
struct timespec ts; struct timespec ts;
nanouptime (&ts); nanouptime (&ts);
return xtime_make (ts.tv_sec, ts.tv_nsec); return xtime_make (ts.tv_sec, ts.tv_nsec);
} }
#else # else
# if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME # if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME
{ {
struct timespec ts; struct timespec ts;
if (clock_gettime (CLOCK_MONOTONIC, &ts) == 0) if (clock_gettime (CLOCK_MONOTONIC, &ts) == 0)
return xtime_make (ts.tv_sec, ts.tv_nsec); return xtime_make (ts.tv_sec, ts.tv_nsec);
} }
# endif # endif
# if HAVE_MICROUPTIME # if HAVE_MICROUPTIME
{ {
struct timeval tv; struct timeval tv;
microuptime (&tv); microuptime (&tv);
return xtime_make (tv.tv_sec, 1000 * tv.tv_usec); return xtime_make (tv.tv_sec, 1000 * tv.tv_usec);
} }
# else # else
/* No monotonically increasing clocks are available; fall back on a /* No monotonically increasing clocks are available; fall back on a
clock that might jump backwards, since it's the best we can do. */ clock that might jump backwards, since it's the best we can do. */
{ {
@ -63,6 +66,8 @@ gethrxtime (void)
gettime (&ts); gettime (&ts);
return xtime_make (ts.tv_sec, ts.tv_nsec); return xtime_make (ts.tv_sec, ts.tv_nsec);
} }
# endif
# endif # endif
#endif
} }
#endif

View file

@ -1,6 +1,6 @@
/* gethrxtime -- get high resolution real time /* gethrxtime -- get high resolution real time
Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -18,9 +18,14 @@
/* Written by Paul Eggert. */ /* Written by Paul Eggert. */
#ifndef GETHRXTIME_H_ #ifndef GETHRXTIME_H_
# define GETHRXTIME_H_ 1 #define GETHRXTIME_H_ 1
# include "xtime.h" #include "xtime.h"
_GL_INLINE_HEADER_BEGIN
#ifndef GETHRXTIME_INLINE
# define GETHRXTIME_INLINE _GL_INLINE
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -31,12 +36,14 @@ extern "C" {
high-resolution clock that is not subject to resetting or high-resolution clock that is not subject to resetting or
drifting. */ drifting. */
# if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME #if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME
# include <time.h> # include <time.h>
static inline xtime_t gethrxtime (void) { return gethrtime (); } GETHRXTIME_INLINE xtime_t gethrxtime (void) { return gethrtime (); }
# else # else
xtime_t gethrxtime (void); xtime_t gethrxtime (void);
# endif #endif
_GL_INLINE_HEADER_END
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org "Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it! before changing it!
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2013 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Declarations for getopt. /* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
@ -49,7 +49,9 @@
linkers. */ linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt #if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@ # if !@HAVE_GETOPT_H@
# define __need_system_stdlib_h
# include <stdlib.h> # include <stdlib.h>
# undef __need_system_stdlib_h
# include <stdio.h> # include <stdio.h>
# include <unistd.h> # include <unistd.h>
# endif # endif

View file

@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt. /* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Internal declarations for getopt. /* Internal declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.

View file

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

View file

@ -1,6 +1,6 @@
/* gettime -- get the system clock /* gettime -- get the system clock
Copyright (C) 2002, 2004-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2002, 2004-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

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

View file

@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types /* intprops.h -- properties of integer types
Copyright (C) 2001-2005, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2001-2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -89,7 +89,7 @@
/* Return 1 if the __typeof__ keyword works. This could be done by /* Return 1 if the __typeof__ keyword works. This could be done by
'configure', but for now it's easier to do it by hand. */ 'configure', but for now it's easier to do it by hand. */
#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C #if 2 <= __GNUC__ || defined __IBM__TYPEOF__ || 0x5110 <= __SUNPRO_C
# define _GL_HAVE___TYPEOF__ 1 # define _GL_HAVE___TYPEOF__ 1
#else #else
# define _GL_HAVE___TYPEOF__ 0 # define _GL_HAVE___TYPEOF__ 0

View file

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

View file

@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems /* Work around a bug of lstat on some systems
Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc. Copyright (C) 1997-2006, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -35,7 +35,7 @@ typedef int dummy;
# include <sys/stat.h> # include <sys/stat.h>
# undef __need_system_sys_stat_h # undef __need_system_sys_stat_h
static inline int static int
orig_lstat (const char *filename, struct stat *buf) orig_lstat (const char *filename, struct stat *buf)
{ {
return lstat (filename, buf); return lstat (filename, buf);

View file

@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible. /* malloc() function that is glibc compatible.
Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1997-1998, 2006-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012 /* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2013
Free Software Foundation, Inc. Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se), Based on strlen implementation by Torbjorn Granlund (tege@sics.se),

View file

@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte. /* Copy memory area and return pointer after last written byte.
Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2003, 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2012 Free Software /* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This file is derived from the one in the GNU C Library. This file is derived from the one in the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries. /* Invalid parameter handler for MSVC runtime libraries.
Copyright (C) 2011-2012 Free Software Foundation, Inc. Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries. /* Invalid parameter handler for MSVC runtime libraries.
Copyright (C) 2011-2012 Free Software Foundation, Inc. Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications /* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries. with MSVC runtime libraries.
Copyright (C) 2011-2012 Free Software Foundation, Inc. Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications /* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries. with MSVC runtime libraries.
Copyright (C) 2011-2012 Free Software Foundation, Inc. Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h. /* Define PATH_MAX somehow. Requires sys/types.h.
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Decomposed printf argument list. /* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2012 Free Software Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Decomposed printf argument list. /* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2012 Free Software Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2013 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Formatted output to strings. /* Formatted output to strings.
Copyright (C) 1999-2000, 2002-2003, 2006-2012 Free Software Foundation, Inc. Copyright (C) 1999-2000, 2002-2003, 2006-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* Parse printf format string. /* Parse printf format string.
Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2012 Free Software Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2013 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Program name management. /* Program name management.
Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Program name management. /* Program name management.
Copyright (C) 2001-2004, 2006, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2001-2004, 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001. Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Searching in a string. /* Searching in a string.
Copyright (C) 2008-2012 Free Software Foundation, Inc. Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

41
lib/secure_getenv.c Normal file
View file

@ -0,0 +1,41 @@
/* Look up an environment variable more securely.
Copyright 2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdlib.h>
#if !HAVE___SECURE_GETENV
# if HAVE_ISSETUGID
# include <unistd.h>
# else
# undef issetugid
# define issetugid() 1
# endif
#endif
char *
secure_getenv (char const *name)
{
#if HAVE___SECURE_GETENV
return __secure_getenv (name);
#else
if (issetugid ())
return 0;
return getenv (name);
#endif
}

View file

@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers /* size_max.h -- declare SIZE_MAX through system headers
Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson. Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Pausing execution of the current thread. /* Pausing execution of the current thread.
Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007. Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Work around platform bugs in stat. /* Work around platform bugs in stat.
Copyright (C) 2009-2012 Free Software Foundation, Inc. Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@
# endif # endif
#endif #endif
static inline int static int
orig_stat (const char *filename, struct stat *buf) orig_stat (const char *filename, struct stat *buf)
{ {
return stat (filename, buf); return stat (filename, buf);

View file

@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>. /* A substitute for ISO C11 <stdalign.h>.
Copyright 2011-2012 Free Software Foundation, Inc. Copyright 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc. /* Copyright (C) 2001-2003, 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001. Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
Copyright (C) 2009-2012 Free Software Foundation, Inc. Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc. /* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib. This file is part of gnulib.
@ -39,7 +39,7 @@
Ideally we should test __BIONIC__ here, but it is only defined after Ideally we should test __BIONIC__ here, but it is only defined after
<sys/cdefs.h> has been included; hence test __ANDROID__ instead. */ <sys/cdefs.h> has been included; hence test __ANDROID__ instead. */
#if defined __ANDROID__ \ #if defined __ANDROID__ \
&& defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_ && defined _SYS_TYPES_H_ && !defined __need_size_t
# @INCLUDE_NEXT@ @NEXT_STDINT_H@ # @INCLUDE_NEXT@ @NEXT_STDINT_H@
#else #else

View file

@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>. /* A GNU-like <stdio.h>.
Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -575,21 +575,27 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
_GL_CXXALIAS_SYS (fwrite, size_t, _GL_CXXALIAS_SYS (fwrite, size_t,
(const void *ptr, size_t s, size_t n, FILE *stream)); (const void *ptr, size_t s, size_t n, FILE *stream));
/* Work around glibc bug 11959 /* Work around bug 11959 when fortifying glibc 2.4 through 2.15
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
which sometimes causes an unwanted diagnostic for fwrite calls. which sometimes causes an unwanted diagnostic for fwrite calls.
This affects only function declaration attributes, so it's not This affects only function declaration attributes under certain
needed for C++. */ versions of gcc and clang, and is not needed for C++. */
# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL # if (0 < __USE_FORTIFY_LEVEL \
static inline size_t _GL_ARG_NONNULL ((1, 4)) && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
{ && !defined __cplusplus)
size_t r = fwrite (ptr, s, n, stream);
(void) r;
return r;
}
# undef fwrite # undef fwrite
# undef fwrite_unlocked
extern size_t __REDIRECT (rpl_fwrite,
(const void *__restrict, size_t, size_t,
FILE *__restrict),
fwrite);
extern size_t __REDIRECT (rpl_fwrite_unlocked,
(const void *__restrict, size_t, size_t,
FILE *__restrict),
fwrite_unlocked);
# define fwrite rpl_fwrite # define fwrite rpl_fwrite
# define fwrite_unlocked rpl_fwrite_unlocked
# endif # endif
# endif # endif
_GL_CXXALIASWARN (fwrite); _GL_CXXALIASWARN (fwrite);
@ -1333,7 +1339,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"POSIX compliance"); "POSIX compliance");
#endif #endif
#endif /* _@GUARD_PREFIX@_STDIO_H */ #endif /* _@GUARD_PREFIX@_STDIO_H */
#endif /* _@GUARD_PREFIX@_STDIO_H */ #endif /* _@GUARD_PREFIX@_STDIO_H */
#endif #endif

View file

@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>. /* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc. Copyright (C) 1995, 2001-2004, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -20,8 +20,9 @@
#endif #endif
@PRAGMA_COLUMNS@ @PRAGMA_COLUMNS@
#if defined __need_malloc_and_calloc #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */ /* Special invocation conventions inside some gnulib header files,
and inside some glibc header files, respectively. */
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
@ -766,6 +767,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
# endif # endif
#endif #endif
#if @GNULIB_SECURE_GETENV@
/* Look up NAME in the environment, returning 0 in insecure situations. */
# if !@HAVE_SECURE_GETENV@
_GL_FUNCDECL_SYS (secure_getenv, char *,
(char const *name) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
_GL_CXXALIASWARN (secure_getenv);
#elif defined GNULIB_POSIXCHECK
# undef secure_getenv
# if HAVE_RAW_DECL_SECURE_GETENV
_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
"use gnulib module secure_getenv for portability");
# endif
#endif
#if @GNULIB_SETENV@ #if @GNULIB_SETENV@
/* Set NAME to VALUE in the environment. /* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */ If REPLACE is nonzero, overwrite an existing value. */

View file

@ -1,5 +1,5 @@
/* Case-insensitive string comparison function. /* Case-insensitive string comparison function.
Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1998-1999, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* Searching in a string. /* Searching in a string.
Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine /* strerror-override.c --- POSIX compatible system error routine
Copyright (C) 2010-2012 Free Software Foundation, Inc. Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -291,6 +291,11 @@ strerror_override (int errnum)
return "State not recoverable"; return "State not recoverable";
#endif #endif
#if GNULIB_defined_EILSEQ
case EILSEQ:
return "Invalid or incomplete multibyte or wide character";
#endif
default: default:
return NULL; return NULL;
} }

View file

@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine /* strerror-override.h --- POSIX compatible system error routine
Copyright (C) 2010-2012 Free Software Foundation, Inc. Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -46,7 +46,8 @@
|| GNULIB_defined_EDQUOT \ || GNULIB_defined_EDQUOT \
|| GNULIB_defined_ECANCELED \ || GNULIB_defined_ECANCELED \
|| GNULIB_defined_EOWNERDEAD \ || GNULIB_defined_EOWNERDEAD \
|| GNULIB_defined_ENOTRECOVERABLE || GNULIB_defined_ENOTRECOVERABLE \
|| GNULIB_defined_EILSEQ
extern const char *strerror_override (int errnum); extern const char *strerror_override (int errnum);
# else # else
# define strerror_override(ignored) NULL # define strerror_override(ignored) NULL

View file

@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine /* strerror.c --- POSIX compatible system error routine
Copyright (C) 2007-2012 Free Software Foundation, Inc. Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* A GNU-like <string.h>. /* A GNU-like <string.h>.
Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. Copyright (C) 1995-1996, 2001-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* A substitute <strings.h>. /* A substitute <strings.h>.
Copyright (C) 2007-2012 Free Software Foundation, Inc. Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name /* stripslash.c -- remove redundant trailing slashes from a file name
Copyright (C) 1990, 2001, 2003-2006, 2009-2012 Free Software Foundation, Copyright (C) 1990, 2001, 2003-2006, 2009-2013 Free Software Foundation,
Inc. Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* strncasecmp.c -- case insensitive string comparator /* strncasecmp.c -- case insensitive string comparator
Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1998-1999, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* A replacement function, for systems that lack strndup. /* A replacement function, for systems that lack strndup.
Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2012 Free Software Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters. /* Find the length of STRING, but scan at most MAXLEN characters.
Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson. Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Provide a more complete sys/stat header file. /* Provide a more complete sys/stat header file.
Copyright (C) 2005-2012 Free Software Foundation, Inc. Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -150,6 +150,10 @@
# endif # endif
#endif #endif
#ifndef S_ISMPX /* AIX */
# define S_ISMPX(m) 0
#endif
#ifndef S_ISNAM /* Xenix */ #ifndef S_ISNAM /* Xenix */
# ifdef S_IFNAM # ifdef S_IFNAM
# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
@ -497,7 +501,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir # if !GNULIB_defined_rpl_mkdir
static inline int static int
rpl_mkdir (char const *name, mode_t mode) rpl_mkdir (char const *name, mode_t mode)
{ {
return _mkdir (name); return _mkdir (name);

View file

@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h. /* Provide a more complete sys/time.h.
Copyright (C) 2007-2012 Free Software Foundation, Inc. Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -17,37 +17,42 @@
/* Written by Paul Eggert. */ /* Written by Paul Eggert. */
#ifndef _@GUARD_PREFIX@_SYS_TIME_H
#if __GNUC__ >= 3 #if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@ @PRAGMA_SYSTEM_HEADER@
#endif #endif
@PRAGMA_COLUMNS@ @PRAGMA_COLUMNS@
#if defined _@GUARD_PREFIX@_SYS_TIME_H /* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
Simply delegate to the system's header in this case; it is a no-op.
/* Simply delegate to the system's header, without adding anything. */ Without this extra ifdef, the C++ gettimeofday declaration below
# if @HAVE_SYS_TIME_H@ would be a forward declaration in gnulib's nested <sys/time.h>. */
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ #ifdef _CYGWIN_SYS_TIME_H
# endif # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
#else #else
# define _@GUARD_PREFIX@_SYS_TIME_H /* The include_next requires a split double-inclusion guard. */
#if @HAVE_SYS_TIME_H@
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
#endif
# if @HAVE_SYS_TIME_H@ #ifndef _@GUARD_PREFIX@_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ #define _@GUARD_PREFIX@_SYS_TIME_H
# else
# include <time.h> #if ! @HAVE_SYS_TIME_H@
# endif # include <time.h>
#endif
/* On native Windows with MSVC, get the 'struct timeval' type. /* On native Windows with MSVC, get the 'struct timeval' type.
Also, on native Windows with a 64-bit time_t, where we are overriding the Also, on native Windows with a 64-bit time_t, where we are overriding the
'struct timeval' type, get all declarations of system functions whose 'struct timeval' type, get all declarations of system functions whose
signature contains 'struct timeval'. */ signature contains 'struct timeval'. */
# if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H #if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
# define _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H
# include <winsock2.h> # include <winsock2.h>
# undef _GL_INCLUDING_WINSOCK2_H # undef _GL_INCLUDING_WINSOCK2_H
# endif #endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@ -55,112 +60,112 @@
/* The definition of _GL_WARN_ON_USE is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */
# ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif
#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
# if @REPLACE_STRUCT_TIMEVAL@
# define timeval rpl_timeval
# endif # endif
# if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ # if !GNULIB_defined_struct_timeval
# if @REPLACE_STRUCT_TIMEVAL@
# define timeval rpl_timeval
# endif
# if !GNULIB_defined_struct_timeval
struct timeval struct timeval
{ {
time_t tv_sec; time_t tv_sec;
long int tv_usec; long int tv_usec;
}; };
# define GNULIB_defined_struct_timeval 1 # define GNULIB_defined_struct_timeval 1
# endif
# endif # endif
# ifdef __cplusplus #endif
#ifdef __cplusplus
} }
# endif #endif
# if @GNULIB_GETTIMEOFDAY@ #if @GNULIB_GETTIMEOFDAY@
# if @REPLACE_GETTIMEOFDAY@ # if @REPLACE_GETTIMEOFDAY@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gettimeofday # undef gettimeofday
# define gettimeofday rpl_gettimeofday # define gettimeofday rpl_gettimeofday
# endif # endif
_GL_FUNCDECL_RPL (gettimeofday, int, _GL_FUNCDECL_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict) (struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1))); _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (gettimeofday, int, _GL_CXXALIAS_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict)); (struct timeval *restrict, void *restrict));
# else # else
# if !@HAVE_GETTIMEOFDAY@ # if !@HAVE_GETTIMEOFDAY@
_GL_FUNCDECL_SYS (gettimeofday, int, _GL_FUNCDECL_SYS (gettimeofday, int,
(struct timeval *restrict, void *restrict) (struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1))); _GL_ARG_NONNULL ((1)));
# endif # endif
/* Need to cast, because on glibc systems, by default, the second argument is /* Need to cast, because on glibc systems, by default, the second argument is
struct timezone *. */ struct timezone *. */
_GL_CXXALIAS_SYS_CAST (gettimeofday, int, _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
(struct timeval *restrict, void *restrict)); (struct timeval *restrict, void *restrict));
# endif # endif
_GL_CXXALIASWARN (gettimeofday); _GL_CXXALIASWARN (gettimeofday);
# elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# undef gettimeofday # undef gettimeofday
# if HAVE_RAW_DECL_GETTIMEOFDAY # if HAVE_RAW_DECL_GETTIMEOFDAY
_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"use gnulib module gettimeofday for portability"); "use gnulib module gettimeofday for portability");
# endif
# endif # endif
#endif
/* Hide some function declarations from <winsock2.h>. */ /* Hide some function declarations from <winsock2.h>. */
# if defined _MSC_VER && @HAVE_WINSOCK2_H@ #if defined _MSC_VER && @HAVE_WINSOCK2_H@
# if !defined _@GUARD_PREFIX@_UNISTD_H # if !defined _@GUARD_PREFIX@_UNISTD_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef close # undef close
# define close close_used_without_including_unistd_h # define close close_used_without_including_unistd_h
# else # else
_GL_WARN_ON_USE (close, _GL_WARN_ON_USE (close,
"close() used without including <unistd.h>"); "close() used without including <unistd.h>");
# endif # endif
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gethostname # undef gethostname
# define gethostname gethostname_used_without_including_unistd_h # define gethostname gethostname_used_without_including_unistd_h
# else # else
_GL_WARN_ON_USE (gethostname, _GL_WARN_ON_USE (gethostname,
"gethostname() used without including <unistd.h>"); "gethostname() used without including <unistd.h>");
# endif
# endif # endif
# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H # endif
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
# undef socket # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define socket socket_used_without_including_sys_socket_h # undef socket
# undef connect # define socket socket_used_without_including_sys_socket_h
# define connect connect_used_without_including_sys_socket_h # undef connect
# undef accept # define connect connect_used_without_including_sys_socket_h
# define accept accept_used_without_including_sys_socket_h # undef accept
# undef bind # define accept accept_used_without_including_sys_socket_h
# define bind bind_used_without_including_sys_socket_h # undef bind
# undef getpeername # define bind bind_used_without_including_sys_socket_h
# define getpeername getpeername_used_without_including_sys_socket_h # undef getpeername
# undef getsockname # define getpeername getpeername_used_without_including_sys_socket_h
# define getsockname getsockname_used_without_including_sys_socket_h # undef getsockname
# undef getsockopt # define getsockname getsockname_used_without_including_sys_socket_h
# define getsockopt getsockopt_used_without_including_sys_socket_h # undef getsockopt
# undef listen # define getsockopt getsockopt_used_without_including_sys_socket_h
# define listen listen_used_without_including_sys_socket_h # undef listen
# undef recv # define listen listen_used_without_including_sys_socket_h
# define recv recv_used_without_including_sys_socket_h # undef recv
# undef send # define recv recv_used_without_including_sys_socket_h
# define send send_used_without_including_sys_socket_h # undef send
# undef recvfrom # define send send_used_without_including_sys_socket_h
# define recvfrom recvfrom_used_without_including_sys_socket_h # undef recvfrom
# undef sendto # define recvfrom recvfrom_used_without_including_sys_socket_h
# define sendto sendto_used_without_including_sys_socket_h # undef sendto
# undef setsockopt # define sendto sendto_used_without_including_sys_socket_h
# define setsockopt setsockopt_used_without_including_sys_socket_h # undef setsockopt
# undef shutdown # define setsockopt setsockopt_used_without_including_sys_socket_h
# define shutdown shutdown_used_without_including_sys_socket_h # undef shutdown
# else # define shutdown shutdown_used_without_including_sys_socket_h
# else
_GL_WARN_ON_USE (socket, _GL_WARN_ON_USE (socket,
"socket() used without including <sys/socket.h>"); "socket() used without including <sys/socket.h>");
_GL_WARN_ON_USE (connect, _GL_WARN_ON_USE (connect,
@ -189,17 +194,19 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"setsockopt() used without including <sys/socket.h>"); "setsockopt() used without including <sys/socket.h>");
_GL_WARN_ON_USE (shutdown, _GL_WARN_ON_USE (shutdown,
"shutdown() used without including <sys/socket.h>"); "shutdown() used without including <sys/socket.h>");
# endif
# endif
# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef select
# define select select_used_without_including_sys_select_h
# else
_GL_WARN_ON_USE (select,
"select() used without including <sys/select.h>");
# endif
# endif # endif
# endif # endif
# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef select
# define select select_used_without_including_sys_select_h
# else
_GL_WARN_ON_USE (select,
"select() used without including <sys/select.h>");
# endif
# endif
#endif
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ #endif /* _@GUARD_PREFIX@_SYS_TIME_H */
#endif /* _CYGWIN_SYS_TIME_H */
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */

View file

@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h. /* Provide a more complete sys/types.h.
Copyright (C) 2011-2012 Free Software Foundation, Inc. Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* A POSIX-like <sys/wait.h>. /* A POSIX-like <sys/wait.h>.
Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* exit() exit codes for some BSD system programs. /* exit() exit codes for some BSD system programs.
Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* tempname.c - generate the name of a temporary file. /* tempname.c - generate the name of a temporary file.
Copyright (C) 1991-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1991-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -68,10 +68,7 @@
# define __mkdir mkdir # define __mkdir mkdir
# define __open open # define __open open
# define __lxstat64(version, file, buf) lstat (file, buf) # define __lxstat64(version, file, buf) lstat (file, buf)
#endif # define __secure_getenv secure_getenv
#if ! (HAVE___SECURE_GETENV || _LIBC)
# define __secure_getenv getenv
#endif #endif
#ifdef _LIBC #ifdef _LIBC

View file

@ -1,6 +1,6 @@
/* Create a temporary file or directory. /* Create a temporary file or directory.
Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* A more-standard <time.h>. /* A more-standard <time.h>.
Copyright (C) 2007-2012 Free Software Foundation, Inc. Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* timespec -- System time interface /* timespec -- System time interface
Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2012 Free Software Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2013 Free Software
Foundation, Inc. Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

3
lib/unistd.c Normal file
View file

@ -0,0 +1,3 @@
#include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include "unistd.h"

View file

@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>. /* Substitute for and wrapper around <unistd.h>.
Copyright (C) 2003-2012 Free Software Foundation, Inc. Copyright (C) 2003-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -14,29 +14,13 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_UNISTD_H
#if __GNUC__ >= 3 #if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@ @PRAGMA_SYSTEM_HEADER@
#endif #endif
@PRAGMA_COLUMNS@ @PRAGMA_COLUMNS@
/* Special invocation convention:
- On mingw, several headers, including <winsock2.h>, include <unistd.h>,
but we need to ensure that both the system <unistd.h> and <winsock2.h>
are completely included before we replace gethostname. */
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
&& !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
/* <unistd.h> is being indirectly included for the first time from
<winsock2.h>; avoid declaring any overrides. */
# if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
# else
# error unexpected; report this to bug-gnulib@gnu.org
# endif
# define _GL_WINSOCK2_H_WITNESS
/* Normal invocation. */
#elif !defined _@GUARD_PREFIX@_UNISTD_H
/* The include_next requires a split double-inclusion guard. */ /* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@ #if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
@ -77,9 +61,13 @@
/* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
<unistd.h>. */ <unistd.h>. */
/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
included here. */
/* But avoid namespace pollution on glibc systems. */ /* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__ #if !defined __GLIBC__ && !defined __osf__
# define __need_system_stdlib_h
# include <stdlib.h> # include <stdlib.h>
# undef __need_system_stdlib_h
#endif #endif
/* Native Windows platforms declare chdir, getcwd, rmdir in /* Native Windows platforms declare chdir, getcwd, rmdir in
@ -124,9 +112,15 @@
/* Get getopt(), optarg, optind, opterr, optopt. /* Get getopt(), optarg, optind, opterr, optopt.
But avoid namespace pollution on glibc systems. */ But avoid namespace pollution on glibc systems. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
# define __need_getopt
# include <getopt.h> # include <getopt.h>
#endif #endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */
@ -404,7 +398,7 @@ extern char **environ;
# endif # endif
#elif defined GNULIB_POSIXCHECK #elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON # if HAVE_RAW_DECL_ENVIRON
static inline char *** _GL_UNISTD_INLINE char ***
rpl_environ (void) rpl_environ (void)
{ {
return &environ; return &environ;
@ -862,7 +856,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
# define getpagesize() _gl_getpagesize () # define getpagesize() _gl_getpagesize ()
# else # else
# if !GNULIB_defined_getpagesize_function # if !GNULIB_defined_getpagesize_function
static inline int _GL_UNISTD_INLINE int
getpagesize () getpagesize ()
{ {
return _gl_getpagesize (); return _gl_getpagesize ();
@ -1530,6 +1524,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
_GL_CXXALIASWARN (write); _GL_CXXALIASWARN (write);
#endif #endif
_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */

View file

@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation. /* vsprintf with automatic memory allocation.
Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. Copyright (C) 1999, 2002-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -1530,7 +1530,7 @@ is_borderline (const char *digits, size_t precision)
/* Returns the number of TCHAR_T units needed as temporary space for the result /* Returns the number of TCHAR_T units needed as temporary space for the result
of sprintf or SNPRINTF of a single conversion directive. */ of sprintf or SNPRINTF of a single conversion directive. */
static inline size_t static size_t
MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion, MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
arg_type type, int flags, size_t width, int has_precision, arg_type type, int flags, size_t width, int has_precision,
size_t precision, int pad_ourselves) size_t precision, int pad_ourselves)

View file

@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation. /* vsprintf with automatic memory allocation.
Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. Copyright (C) 2002-2004, 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* Compile-time assert-like macros. /* Compile-time assert-like macros.
Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* Formatted output to strings. /* Formatted output to strings.
Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues. /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
Copyright (C) 2007-2012 Free Software Foundation, Inc. Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations. /* xsize.h -- Checked size_t computations.
Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc. Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

3
lib/xtime.c Normal file
View file

@ -0,0 +1,3 @@
#include <config.h>
#define XTIME_INLINE _GL_EXTERN_INLINE
#include "xtime.h"

View file

@ -1,6 +1,6 @@
/* xtime -- extended-resolution integer time stamps /* xtime -- extended-resolution integer time stamps
Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -18,24 +18,29 @@
/* Written by Paul Eggert. */ /* Written by Paul Eggert. */
#ifndef XTIME_H_ #ifndef XTIME_H_
# define XTIME_H_ 1 #define XTIME_H_ 1
_GL_INLINE_HEADER_BEGIN
#ifndef XTIME_INLINE
# define XTIME_INLINE _GL_INLINE
#endif
/* xtime_t is a signed type used for time stamps. It is an integer /* xtime_t is a signed type used for time stamps. It is an integer
type that is a count of nanoseconds -- except for obsolescent hosts type that is a count of nanoseconds -- except for obsolescent hosts
without sufficiently-wide integers, where it is a count of without sufficiently-wide integers, where it is a count of
seconds. */ seconds. */
# if HAVE_LONG_LONG_INT #if HAVE_LONG_LONG_INT
typedef long long int xtime_t; typedef long long int xtime_t;
# define XTIME_PRECISION 1000000000 # define XTIME_PRECISION 1000000000
# else #else
# include <limits.h> # include <limits.h>
typedef long int xtime_t; typedef long int xtime_t;
# if LONG_MAX >> 31 >> 31 == 0 # if LONG_MAX >> 31 >> 31 == 0
# define XTIME_PRECISION 1 # define XTIME_PRECISION 1
# else # else
# define XTIME_PRECISION 1000000000 # define XTIME_PRECISION 1000000000
# endif
# endif # endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -43,7 +48,7 @@ extern "C" {
/* Return an extended time value that contains S seconds and NS /* Return an extended time value that contains S seconds and NS
nanoseconds, without any overflow checking. */ nanoseconds, without any overflow checking. */
static inline xtime_t XTIME_INLINE xtime_t
xtime_make (xtime_t s, long int ns) xtime_make (xtime_t s, long int ns)
{ {
if (XTIME_PRECISION == 1) if (XTIME_PRECISION == 1)
@ -53,14 +58,14 @@ xtime_make (xtime_t s, long int ns)
} }
/* Return the number of seconds in T, which must be nonnegative. */ /* Return the number of seconds in T, which must be nonnegative. */
static inline xtime_t XTIME_INLINE xtime_t
xtime_nonnegative_sec (xtime_t t) xtime_nonnegative_sec (xtime_t t)
{ {
return t / XTIME_PRECISION; return t / XTIME_PRECISION;
} }
/* Return the number of seconds in T. */ /* Return the number of seconds in T. */
static inline xtime_t XTIME_INLINE xtime_t
xtime_sec (xtime_t t) xtime_sec (xtime_t t)
{ {
return (XTIME_PRECISION == 1 return (XTIME_PRECISION == 1
@ -71,14 +76,14 @@ xtime_sec (xtime_t t)
} }
/* Return the number of nanoseconds in T, which must be nonnegative. */ /* Return the number of nanoseconds in T, which must be nonnegative. */
static inline long int XTIME_INLINE long int
xtime_nonnegative_nsec (xtime_t t) xtime_nonnegative_nsec (xtime_t t)
{ {
return t % XTIME_PRECISION; return t % XTIME_PRECISION;
} }
/* Return the number of nanoseconds in T. */ /* Return the number of nanoseconds in T. */
static inline long int XTIME_INLINE long int
xtime_nsec (xtime_t t) xtime_nsec (xtime_t t)
{ {
long int ns = t % XTIME_PRECISION; long int ns = t % XTIME_PRECISION;

View file

@ -1,5 +1,5 @@
# 00gnulib.m4 serial 2 # 00gnulib.m4 serial 2
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.

View file

@ -1,5 +1,5 @@
# alloca.m4 serial 14 # alloca.m4 serial 14
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Copyright (C) 2002-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc. dnl Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,

View file

@ -1,5 +1,5 @@
# argp.m4 serial 14 # argp.m4 serial 14
dnl Copyright (C) 2003-2012 Free Software Foundation, Inc. dnl Copyright (C) 2003-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.

View file

@ -1,5 +1,5 @@
# clock_time.m4 serial 10 # clock_time.m4 serial 10
dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.

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