Imported Upstream version 2.0

This commit is contained in:
Jan Wagner 2014-07-11 21:01:00 +02:00
parent c89ccc3c74
commit 0841b5c7c7
165 changed files with 25440 additions and 4442 deletions

View file

@ -27,7 +27,7 @@
# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files base64 crypto/sha1 dirname environ floorf fsusage getaddrinfo gethostname getloadavg getopt-gnu gettext mountlist regex setenv strsep timegm unsetenv vasprintf vsnprintf
# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files base64 crypto/sha1 dirname environ floorf fsusage getaddrinfo gethostname getloadavg getopt-gnu gettext idpriv-droptemp mountlist regex setenv strcase strsep timegm unsetenv vasprintf vsnprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
@ -43,9 +43,11 @@ gl_MODULES([
getloadavg
getopt-gnu
gettext
idpriv-droptemp
mountlist
regex
setenv
strcase
strsep
timegm
unsetenv

View file

@ -28,7 +28,7 @@
# other built files.
# This macro should be invoked from ./configure.in, in the section
# This macro should be invoked from ./configure.ac, in the section
# "Checks for programs", right after AC_PROG_CC, and certainly before
# any checks for libraries, header files, types and library functions.
AC_DEFUN([gl_EARLY],
@ -70,6 +70,7 @@ AC_DEFUN([gl_EARLY],
# Code from module gettext-h:
# Code from module havelib:
# Code from module hostent:
# Code from module idpriv-droptemp:
# Code from module include_next:
# Code from module inet_ntop:
# Code from module intprops:
@ -119,10 +120,12 @@ AC_DEFUN([gl_EARLY],
# Code from module stdint:
# Code from module stdio:
# Code from module stdlib:
# Code from module strcase:
# Code from module streq:
# Code from module strerror:
# Code from module strerror-override:
# Code from module string:
# Code from module strings:
# Code from module strndup:
# Code from module strnlen:
# Code from module strsep:
@ -151,7 +154,7 @@ AC_DEFUN([gl_EARLY],
# Code from module xstrndup:
])
# This macro should be invoked from ./configure.in, in the section
# This macro should be invoked from ./configure.ac, in the section
# "Check for header files, types and library functions".
AC_DEFUN([gl_INIT],
[
@ -256,6 +259,7 @@ AC_DEFUN([gl_INIT],
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_HOSTENT
gl_IDPRIV
gl_FUNC_INET_NTOP
if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
AC_LIBOBJ([inet_ntop])
@ -377,6 +381,15 @@ AC_DEFUN([gl_INIT],
gl_STDINT_H
gl_STDIO_H
gl_STDLIB_H
gl_STRCASE
if test $HAVE_STRCASECMP = 0; then
AC_LIBOBJ([strcasecmp])
gl_PREREQ_STRCASECMP
fi
if test $HAVE_STRNCASECMP = 0; then
AC_LIBOBJ([strncasecmp])
gl_PREREQ_STRNCASECMP
fi
gl_FUNC_STRERROR
if test $REPLACE_STRERROR = 1; then
AC_LIBOBJ([strerror])
@ -390,6 +403,7 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_SYS_H_WINSOCK2
fi
gl_HEADER_STRING_H
gl_HEADER_STRINGS_H
gl_FUNC_STRNDUP
if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
AC_LIBOBJ([strndup])
@ -646,6 +660,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/glthread/lock.c
lib/glthread/lock.h
lib/glthread/threadlib.c
lib/idpriv-droptemp.c
lib/idpriv.h
lib/inet_ntop.c
lib/intprops.h
lib/itold.c
@ -706,12 +722,15 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stdio.in.h
lib/stdlib.in.h
lib/str-two-way.h
lib/strcasecmp.c
lib/streq.h
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/strsep.c
@ -775,6 +794,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/gnulib-common.m4
m4/hostent.m4
m4/iconv.m4
m4/idpriv.m4
m4/include_next.m4
m4/inet_ntop.m4
m4/intdiv0.m4
@ -845,8 +865,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdint_h.m4
m4/stdio_h.m4
m4/stdlib_h.m4
m4/strcase.m4
m4/strerror.m4
m4/string_h.m4
m4/strings_h.m4
m4/strndup.m4
m4/strnlen.m4
m4/strsep.m4

14
gl/m4/idpriv.m4 Normal file
View file

@ -0,0 +1,14 @@
# idpriv.m4 serial 1
dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_IDPRIV],
[
dnl Persuade glibc <unistd.h> to declare {get,set}res{uid,gid}.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([getuid geteuid getresuid getgid getegid getresgid])
AC_CHECK_FUNCS_ONCE([setresuid setreuid seteuid setresgid setregid setegid])
])

45
gl/m4/strcase.m4 Normal file
View file

@ -0,0 +1,45 @@
# strcase.m4 serial 11
dnl Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STRCASE],
[
gl_FUNC_STRCASECMP
gl_FUNC_STRNCASECMP
])
AC_DEFUN([gl_FUNC_STRCASECMP],
[
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
AC_CHECK_FUNCS([strcasecmp])
if test $ac_cv_func_strcasecmp = no; then
HAVE_STRCASECMP=0
fi
])
AC_DEFUN([gl_FUNC_STRNCASECMP],
[
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
AC_CHECK_FUNCS([strncasecmp])
if test $ac_cv_func_strncasecmp = yes; then
HAVE_STRNCASECMP=1
else
HAVE_STRNCASECMP=0
fi
AC_CHECK_DECLS([strncasecmp])
if test $ac_cv_have_decl_strncasecmp = no; then
HAVE_DECL_STRNCASECMP=0
fi
])
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
:
])
# Prerequisites of lib/strncasecmp.c.
AC_DEFUN([gl_PREREQ_STRNCASECMP], [
:
])

52
gl/m4/strings_h.m4 Normal file
View file

@ -0,0 +1,52 @@
# Configure a replacement for <strings.h>.
# serial 6
# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_HEADER_STRINGS_H],
[
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
])
AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
[
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([strings.h])
if test $ac_cv_header_strings_h = yes; then
HAVE_STRINGS_H=1
else
HAVE_STRINGS_H=0
fi
AC_SUBST([HAVE_STRINGS_H])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* Minix 3.1.8 has a bug: <sys/types.h> must be included before
<strings.h>. */
#include <sys/types.h>
#include <strings.h>
]], [ffs strcasecmp strncasecmp])
])
AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
[
GNULIB_FFS=0; AC_SUBST([GNULIB_FFS])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FFS=1; AC_SUBST([HAVE_FFS])
HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
])