mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Use Gnulib's `stat-time' module; update Gnulib.
This updates Gnulib files to v0.0-4207-gc82b481. * m4/gnulib-cache.m4: Add `stat-time'.
This commit is contained in:
parent
fb0b64c12a
commit
9157d90102
49 changed files with 1230 additions and 682 deletions
|
@ -2,7 +2,7 @@
|
||||||
# gendocs.sh -- generate a GNU manual in many formats. This script is
|
# gendocs.sh -- generate a GNU manual in many formats. This script is
|
||||||
# mentioned in maintain.texi. See the help message below for usage details.
|
# mentioned in maintain.texi. See the help message below for usage details.
|
||||||
|
|
||||||
scriptversion=2010-05-04.09
|
scriptversion=2010-07-26.16
|
||||||
|
|
||||||
# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
@ -44,7 +44,7 @@ unset use_texi2html
|
||||||
|
|
||||||
version="gendocs.sh $scriptversion
|
version="gendocs.sh $scriptversion
|
||||||
|
|
||||||
Copyright 2009 Free Software Foundation, Inc.
|
Copyright 2010 Free Software Foundation, Inc.
|
||||||
There is NO warranty. You may redistribute this software
|
There is NO warranty. You may redistribute this software
|
||||||
under the terms of the GNU General Public License.
|
under the terms of the GNU General Public License.
|
||||||
For more information about these matters, see the files named COPYING."
|
For more information about these matters, see the files named COPYING."
|
||||||
|
@ -95,16 +95,16 @@ If a manual's Texinfo sources are spread across several directories,
|
||||||
first copy or symlink all Texinfo sources into a single directory.
|
first copy or symlink all Texinfo sources into a single directory.
|
||||||
(Part of the script's work is to make a tar.gz of the sources.)
|
(Part of the script's work is to make a tar.gz of the sources.)
|
||||||
|
|
||||||
You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
|
You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
|
||||||
control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
|
DVIPS to control the programs that get executed, and
|
||||||
control where the gendocs_template file is looked for. (With --docbook,
|
GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
|
||||||
the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and
|
looked for. With --docbook, the environment variables DOCBOOK2HTML,
|
||||||
DOCBOOK2TXT are also respected.)
|
DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.
|
||||||
|
|
||||||
By default, makeinfo is run in the default (English) locale, since
|
By default, makeinfo and texi2dvi are run in the default (English)
|
||||||
that's the language of most Texinfo manuals. If you happen to have a
|
locale, since that's the language of most Texinfo manuals. If you
|
||||||
non-English manual and non-English web site, see the SETLANG setting
|
happen to have a non-English manual and non-English web site, see the
|
||||||
in the source.
|
SETLANG setting in the source.
|
||||||
|
|
||||||
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
|
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
|
||||||
"
|
"
|
||||||
|
@ -192,7 +192,7 @@ info_tgz_size=`calcsize $outdir/$PACKAGE.info.tar.gz`
|
||||||
# do not mv the info files, there's no point in having them available
|
# do not mv the info files, there's no point in having them available
|
||||||
# separately on the web.
|
# separately on the web.
|
||||||
|
|
||||||
cmd="${TEXI2DVI} \"$srcfile\""
|
cmd="$SETLANG ${TEXI2DVI} \"$srcfile\""
|
||||||
echo "Generating dvi ... ($cmd)"
|
echo "Generating dvi ... ($cmd)"
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ gzip -f -9 $PACKAGE.dvi
|
||||||
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
|
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
|
||||||
mv $PACKAGE.dvi.gz $outdir/
|
mv $PACKAGE.dvi.gz $outdir/
|
||||||
|
|
||||||
cmd="${TEXI2DVI} --pdf \"$srcfile\""
|
cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\""
|
||||||
echo "Generating pdf ... ($cmd)"
|
echo "Generating pdf ... ($cmd)"
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
pdf_size=`calcsize $PACKAGE.pdf`
|
pdf_size=`calcsize $PACKAGE.pdf`
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# 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=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stat-time stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
|
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
|
||||||
|
|
||||||
|
@ -796,6 +796,13 @@ EXTRA_libgnu_la_SOURCES += stat.c
|
||||||
|
|
||||||
## end gnulib module stat
|
## end gnulib module stat
|
||||||
|
|
||||||
|
## begin gnulib module stat-time
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST += stat-time.h
|
||||||
|
|
||||||
|
## end gnulib module stat-time
|
||||||
|
|
||||||
## begin gnulib module stdarg
|
## begin gnulib module stdarg
|
||||||
|
|
||||||
BUILT_SOURCES += $(STDARG_H)
|
BUILT_SOURCES += $(STDARG_H)
|
||||||
|
@ -1022,6 +1029,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||||
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
|
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
|
||||||
|
-e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
|
||||||
-e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
|
-e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
|
||||||
-e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
|
-e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
|
||||||
-e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
|
-e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
|
||||||
|
@ -1046,13 +1054,12 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||||
-e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
|
-e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
|
||||||
-e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
|
-e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
|
||||||
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
|
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
|
||||||
|
-e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
|
||||||
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
|
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
|
||||||
-e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
|
|
||||||
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
|
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
|
||||||
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
|
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
|
||||||
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
|
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
|
||||||
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
|
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
|
||||||
-e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
|
|
||||||
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
|
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
|
||||||
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
|
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
|
||||||
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
|
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
|
||||||
|
@ -1061,7 +1068,6 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||||
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
|
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
|
||||||
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
|
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
|
||||||
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
|
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
|
||||||
-e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|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_SETENV''@|$(HAVE_SETENV)|g' \
|
-e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
|
||||||
|
@ -1072,9 +1078,12 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||||
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
|
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
|
||||||
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
|
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
|
||||||
-e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
|
-e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
|
||||||
|
-e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
|
||||||
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
|
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
|
||||||
|
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
|
||||||
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
|
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
|
||||||
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
|
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
|
||||||
|
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
|
||||||
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
|
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
|
||||||
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
|
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
|
||||||
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
|
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
|
||||||
|
|
|
@ -51,6 +51,12 @@
|
||||||
# include "pathmax.h"
|
# include "pathmax.h"
|
||||||
# include "malloca.h"
|
# include "malloca.h"
|
||||||
# if HAVE_GETCWD
|
# if HAVE_GETCWD
|
||||||
|
# if IN_RELOCWRAPPER
|
||||||
|
/* When building the relocatable program wrapper, use the system's getcwd
|
||||||
|
function, not the gnulib override, otherwise we would get a link error.
|
||||||
|
*/
|
||||||
|
# undef getcwd
|
||||||
|
# endif
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
/* We want the directory in Unix syntax, not in VMS syntax. */
|
/* We want the directory in Unix syntax, not in VMS syntax. */
|
||||||
# define __getcwd(buf, max) getcwd (buf, max, 0)
|
# define __getcwd(buf, max) getcwd (buf, max, 0)
|
||||||
|
@ -62,6 +68,8 @@
|
||||||
# endif
|
# endif
|
||||||
# define __readlink readlink
|
# define __readlink readlink
|
||||||
# define __set_errno(e) errno = (e)
|
# define __set_errno(e) errno = (e)
|
||||||
|
/* Use the system functions, not the gnulib overrides in this file. */
|
||||||
|
# undef malloc
|
||||||
# ifndef MAXSYMLINKS
|
# ifndef MAXSYMLINKS
|
||||||
# ifdef SYMLOOP_MAX
|
# ifdef SYMLOOP_MAX
|
||||||
# define MAXSYMLINKS SYMLOOP_MAX
|
# define MAXSYMLINKS SYMLOOP_MAX
|
||||||
|
|
|
@ -32,7 +32,9 @@ locale_t
|
||||||
rpl_duplocale (locale_t locale)
|
rpl_duplocale (locale_t locale)
|
||||||
{
|
{
|
||||||
/* Work around crash in the duplocale function in glibc < 2.12.
|
/* Work around crash in the duplocale function in glibc < 2.12.
|
||||||
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10969>. */
|
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10969>.
|
||||||
|
Also, on AIX 7.1, duplocale(LC_GLOBAL_LOCALE) returns (locale_t)0 with
|
||||||
|
errno set to EINVAL. */
|
||||||
if (locale == LC_GLOBAL_LOCALE)
|
if (locale == LC_GLOBAL_LOCALE)
|
||||||
{
|
{
|
||||||
/* Create a copy of the locale by fetching the name of each locale
|
/* Create a copy of the locale by fetching the name of each locale
|
||||||
|
|
|
@ -21,8 +21,11 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
|
/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
|
||||||
#ifdef malloc
|
#ifdef malloc
|
||||||
# define NEED_MALLOC_GNU
|
# define NEED_MALLOC_GNU 1
|
||||||
# undef malloc
|
# undef malloc
|
||||||
|
/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
|
||||||
|
#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
|
||||||
|
# define NEED_MALLOC_GNU 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Specification. */
|
/* Specification. */
|
||||||
|
@ -41,7 +44,7 @@ rpl_malloc (size_t n)
|
||||||
{
|
{
|
||||||
void *result;
|
void *result;
|
||||||
|
|
||||||
#ifdef NEED_MALLOC_GNU
|
#if NEED_MALLOC_GNU
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
n = 1;
|
n = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
/* Specification. */
|
/* Specification. */
|
||||||
#include "malloca.h"
|
#include "malloca.h"
|
||||||
|
|
||||||
|
/* Use the system functions, not the gnulib overrides in this file. */
|
||||||
|
#undef malloc
|
||||||
|
|
||||||
/* The speed critical point in this file is freea() applied to an alloca()
|
/* The speed critical point in this file is freea() applied to an alloca()
|
||||||
result: it must be fast, to match the speed of alloca(). The speed of
|
result: it must be fast, to match the speed of alloca(). The speed of
|
||||||
mmalloca() and freea() in the other case are not critical, because they
|
mmalloca() and freea() in the other case are not critical, because they
|
||||||
|
|
187
lib/stat-time.h
Normal file
187
lib/stat-time.h
Normal file
|
@ -0,0 +1,187 @@
|
||||||
|
/* stat-related time functions.
|
||||||
|
|
||||||
|
Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* Written by Paul Eggert. */
|
||||||
|
|
||||||
|
#ifndef STAT_TIME_H
|
||||||
|
#define STAT_TIME_H 1
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
|
||||||
|
struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST,
|
||||||
|
ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
|
||||||
|
if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim
|
||||||
|
for access, status change, data modification, or birth (creation)
|
||||||
|
time respectively.
|
||||||
|
|
||||||
|
These macros are private to stat-time.h. */
|
||||||
|
#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
|
||||||
|
# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
|
||||||
|
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
|
||||||
|
# else
|
||||||
|
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
|
||||||
|
# endif
|
||||||
|
#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
|
||||||
|
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
|
||||||
|
#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
|
||||||
|
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec)
|
||||||
|
#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
|
||||||
|
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Return the nanosecond component of *ST's access time. */
|
||||||
|
static inline long int
|
||||||
|
get_stat_atime_ns (struct stat const *st)
|
||||||
|
{
|
||||||
|
# if defined STAT_TIMESPEC
|
||||||
|
return STAT_TIMESPEC (st, st_atim).tv_nsec;
|
||||||
|
# elif defined STAT_TIMESPEC_NS
|
||||||
|
return STAT_TIMESPEC_NS (st, st_atim);
|
||||||
|
# else
|
||||||
|
return 0;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return the nanosecond component of *ST's status change time. */
|
||||||
|
static inline long int
|
||||||
|
get_stat_ctime_ns (struct stat const *st)
|
||||||
|
{
|
||||||
|
# if defined STAT_TIMESPEC
|
||||||
|
return STAT_TIMESPEC (st, st_ctim).tv_nsec;
|
||||||
|
# elif defined STAT_TIMESPEC_NS
|
||||||
|
return STAT_TIMESPEC_NS (st, st_ctim);
|
||||||
|
# else
|
||||||
|
return 0;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return the nanosecond component of *ST's data modification time. */
|
||||||
|
static inline long int
|
||||||
|
get_stat_mtime_ns (struct stat const *st)
|
||||||
|
{
|
||||||
|
# if defined STAT_TIMESPEC
|
||||||
|
return STAT_TIMESPEC (st, st_mtim).tv_nsec;
|
||||||
|
# elif defined STAT_TIMESPEC_NS
|
||||||
|
return STAT_TIMESPEC_NS (st, st_mtim);
|
||||||
|
# else
|
||||||
|
return 0;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return the nanosecond component of *ST's birth time. */
|
||||||
|
static inline long int
|
||||||
|
get_stat_birthtime_ns (struct stat const *st)
|
||||||
|
{
|
||||||
|
# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
|
||||||
|
return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
|
||||||
|
# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
|
||||||
|
return STAT_TIMESPEC_NS (st, st_birthtim);
|
||||||
|
# else
|
||||||
|
/* Avoid a "parameter unused" warning. */
|
||||||
|
(void) st;
|
||||||
|
return 0;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return *ST's access time. */
|
||||||
|
static inline struct timespec
|
||||||
|
get_stat_atime (struct stat const *st)
|
||||||
|
{
|
||||||
|
#ifdef STAT_TIMESPEC
|
||||||
|
return STAT_TIMESPEC (st, st_atim);
|
||||||
|
#else
|
||||||
|
struct timespec t;
|
||||||
|
t.tv_sec = st->st_atime;
|
||||||
|
t.tv_nsec = get_stat_atime_ns (st);
|
||||||
|
return t;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return *ST's status change time. */
|
||||||
|
static inline struct timespec
|
||||||
|
get_stat_ctime (struct stat const *st)
|
||||||
|
{
|
||||||
|
#ifdef STAT_TIMESPEC
|
||||||
|
return STAT_TIMESPEC (st, st_ctim);
|
||||||
|
#else
|
||||||
|
struct timespec t;
|
||||||
|
t.tv_sec = st->st_ctime;
|
||||||
|
t.tv_nsec = get_stat_ctime_ns (st);
|
||||||
|
return t;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return *ST's data modification time. */
|
||||||
|
static inline struct timespec
|
||||||
|
get_stat_mtime (struct stat const *st)
|
||||||
|
{
|
||||||
|
#ifdef STAT_TIMESPEC
|
||||||
|
return STAT_TIMESPEC (st, st_mtim);
|
||||||
|
#else
|
||||||
|
struct timespec t;
|
||||||
|
t.tv_sec = st->st_mtime;
|
||||||
|
t.tv_nsec = get_stat_mtime_ns (st);
|
||||||
|
return t;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return *ST's birth time, if available; otherwise return a value
|
||||||
|
with negative tv_nsec. */
|
||||||
|
static inline struct timespec
|
||||||
|
get_stat_birthtime (struct stat const *st)
|
||||||
|
{
|
||||||
|
struct timespec t;
|
||||||
|
|
||||||
|
#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
|
||||||
|
|| defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC)
|
||||||
|
t = STAT_TIMESPEC (st, st_birthtim);
|
||||||
|
#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
|
||||||
|
t.tv_sec = st->st_birthtime;
|
||||||
|
t.tv_nsec = st->st_birthtimensec;
|
||||||
|
#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
||||||
|
/* Woe32 native platforms (but not Cygwin) put the "file creation
|
||||||
|
time" in st_ctime (!). See
|
||||||
|
<http://msdn2.microsoft.com/de-de/library/14h5k7ff(VS.80).aspx>. */
|
||||||
|
t.tv_sec = st->st_ctime;
|
||||||
|
t.tv_nsec = 0;
|
||||||
|
#else
|
||||||
|
/* Birth time is not supported. Set tv_sec to avoid undefined behavior. */
|
||||||
|
t.tv_sec = -1;
|
||||||
|
t.tv_nsec = -1;
|
||||||
|
/* Avoid a "parameter unused" warning. */
|
||||||
|
(void) st;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
|
||||||
|
|| defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \
|
||||||
|
|| defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
|
||||||
|
/* FreeBSD and NetBSD sometimes signal the absence of knowledge by
|
||||||
|
using zero. Attempt to work around this problem. Alas, this can
|
||||||
|
report failure even for valid time stamps. Also, NetBSD
|
||||||
|
sometimes returns junk in the birth time fields; work around this
|
||||||
|
bug if it it is detected. There's no need to detect negative
|
||||||
|
tv_nsec junk as negative tv_nsec already indicates an error. */
|
||||||
|
if (t.tv_sec == 0 || 1000000000 <= t.tv_nsec)
|
||||||
|
t.tv_nsec = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -661,7 +661,7 @@ _GL_FUNCDECL_RPL (printf, int,
|
||||||
(const char *format, ...)
|
(const char *format, ...)
|
||||||
__attribute__ ((__format__ (__printf__, 1, 2)))
|
__attribute__ ((__format__ (__printf__, 1, 2)))
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
_GL_CXXALIAS_RPL (printf, printf, int, (const char *format, ...));
|
_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
|
||||||
# endif
|
# endif
|
||||||
# define GNULIB_overrides_printf 1
|
# define GNULIB_overrides_printf 1
|
||||||
# else
|
# else
|
||||||
|
|
|
@ -74,6 +74,12 @@ struct random_data
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __attribute__
|
||||||
|
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
|
||||||
|
# define __attribute__(Spec) /* empty */
|
||||||
|
# endif
|
||||||
|
#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. */
|
||||||
|
@ -95,6 +101,23 @@ struct random_data
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if @GNULIB__EXIT@
|
||||||
|
/* Terminate the current process with the given return code, without running
|
||||||
|
the 'atexit' handlers. */
|
||||||
|
# if !@HAVE__EXIT@
|
||||||
|
_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__)));
|
||||||
|
# endif
|
||||||
|
_GL_CXXALIAS_SYS (_Exit, void, (int status));
|
||||||
|
_GL_CXXALIASWARN (_Exit);
|
||||||
|
#elif defined GNULIB_POSIXCHECK
|
||||||
|
# undef _Exit
|
||||||
|
# if HAVE_RAW_DECL__EXIT
|
||||||
|
_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
|
||||||
|
"use gnulib module _Exit for portability");
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if @GNULIB_ATOLL@
|
#if @GNULIB_ATOLL@
|
||||||
/* Parse a signed decimal integer.
|
/* Parse a signed decimal integer.
|
||||||
Returns the value of the integer. Errors are not detected. */
|
Returns the value of the integer. Errors are not detected. */
|
||||||
|
@ -112,7 +135,7 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if @GNULIB_CALLOC_POSIX@
|
#if @GNULIB_CALLOC_POSIX@
|
||||||
# if !@HAVE_CALLOC_POSIX@
|
# if @REPLACE_CALLOC@
|
||||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||||
# undef calloc
|
# undef calloc
|
||||||
# define calloc rpl_calloc
|
# define calloc rpl_calloc
|
||||||
|
@ -218,7 +241,7 @@ _GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if @GNULIB_MALLOC_POSIX@
|
#if @GNULIB_MALLOC_POSIX@
|
||||||
# if !@HAVE_MALLOC_POSIX@
|
# if @REPLACE_MALLOC@
|
||||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||||
# undef malloc
|
# undef malloc
|
||||||
# define malloc rpl_malloc
|
# define malloc rpl_malloc
|
||||||
|
@ -477,7 +500,7 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
|
||||||
|
|
||||||
|
|
||||||
#if @GNULIB_REALLOC_POSIX@
|
#if @GNULIB_REALLOC_POSIX@
|
||||||
# if !@HAVE_REALLOC_POSIX@
|
# if @REPLACE_REALLOC@
|
||||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||||
# undef realloc
|
# undef realloc
|
||||||
# define realloc rpl_realloc
|
# define realloc rpl_realloc
|
||||||
|
|
|
@ -970,20 +970,24 @@ mem_cd_iconveh_internal (const char *src, size_t srclen,
|
||||||
if (result == tmpbuf)
|
if (result == tmpbuf)
|
||||||
{
|
{
|
||||||
size_t memsize = length + extra_alloc;
|
size_t memsize = length + extra_alloc;
|
||||||
|
|
||||||
|
if (*resultp != NULL && *lengthp >= memsize)
|
||||||
|
result = *resultp;
|
||||||
|
else
|
||||||
|
{
|
||||||
char *memory;
|
char *memory;
|
||||||
|
|
||||||
memory = (char *) malloc (memsize > 0 ? memsize : 1);
|
memory = (char *) malloc (memsize > 0 ? memsize : 1);
|
||||||
if (memory != NULL)
|
if (memory != NULL)
|
||||||
{
|
|
||||||
memcpy (memory, tmpbuf, length);
|
|
||||||
result = memory;
|
result = memory;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
memcpy (result, tmpbuf, length);
|
||||||
|
}
|
||||||
else if (result != *resultp && length + extra_alloc < allocated)
|
else if (result != *resultp && length + extra_alloc < allocated)
|
||||||
{
|
{
|
||||||
/* Shrink the allocated memory if possible. */
|
/* Shrink the allocated memory if possible. */
|
||||||
|
|
|
@ -41,10 +41,12 @@
|
||||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||||
# define __attribute__(Spec) /* empty */
|
# define __attribute__(Spec) /* empty */
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
/* The attribute __pure__ was added in gcc 2.96. */
|
/* The attribute __pure__ was added in gcc 2.96. */
|
||||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||||
# define __pure__ /* empty */
|
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||||
# endif
|
#else
|
||||||
|
# define _GL_ATTRIBUTE_PURE /* empty */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,13 +64,13 @@
|
||||||
# define memchr rpl_memchr
|
# define memchr rpl_memchr
|
||||||
# endif
|
# endif
|
||||||
_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
|
_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
|
_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
|
||||||
# else
|
# else
|
||||||
# if ! @HAVE_MEMCHR@
|
# if ! @HAVE_MEMCHR@
|
||||||
_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
|
_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
# endif
|
# endif
|
||||||
/* On some systems, this function is defined as an overloaded function:
|
/* On some systems, this function is defined as an overloaded function:
|
||||||
|
@ -102,7 +104,8 @@ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
|
||||||
_GL_FUNCDECL_RPL (memmem, void *,
|
_GL_FUNCDECL_RPL (memmem, void *,
|
||||||
(void const *__haystack, size_t __haystack_len,
|
(void const *__haystack, size_t __haystack_len,
|
||||||
void const *__needle, size_t __needle_len)
|
void const *__needle, size_t __needle_len)
|
||||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)));
|
_GL_ATTRIBUTE_PURE
|
||||||
|
_GL_ARG_NONNULL ((1, 3)));
|
||||||
_GL_CXXALIAS_RPL (memmem, void *,
|
_GL_CXXALIAS_RPL (memmem, void *,
|
||||||
(void const *__haystack, size_t __haystack_len,
|
(void const *__haystack, size_t __haystack_len,
|
||||||
void const *__needle, size_t __needle_len));
|
void const *__needle, size_t __needle_len));
|
||||||
|
@ -111,7 +114,8 @@ _GL_CXXALIAS_RPL (memmem, void *,
|
||||||
_GL_FUNCDECL_SYS (memmem, void *,
|
_GL_FUNCDECL_SYS (memmem, void *,
|
||||||
(void const *__haystack, size_t __haystack_len,
|
(void const *__haystack, size_t __haystack_len,
|
||||||
void const *__needle, size_t __needle_len)
|
void const *__needle, size_t __needle_len)
|
||||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)));
|
_GL_ATTRIBUTE_PURE
|
||||||
|
_GL_ARG_NONNULL ((1, 3)));
|
||||||
# endif
|
# endif
|
||||||
_GL_CXXALIAS_SYS (memmem, void *,
|
_GL_CXXALIAS_SYS (memmem, void *,
|
||||||
(void const *__haystack, size_t __haystack_len,
|
(void const *__haystack, size_t __haystack_len,
|
||||||
|
@ -152,7 +156,7 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
|
||||||
#if @GNULIB_MEMRCHR@
|
#if @GNULIB_MEMRCHR@
|
||||||
# if ! @HAVE_DECL_MEMRCHR@
|
# if ! @HAVE_DECL_MEMRCHR@
|
||||||
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
|
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
# endif
|
# endif
|
||||||
/* On some systems, this function is defined as an overloaded function:
|
/* On some systems, this function is defined as an overloaded function:
|
||||||
|
@ -182,7 +186,7 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
|
||||||
#if @GNULIB_RAWMEMCHR@
|
#if @GNULIB_RAWMEMCHR@
|
||||||
# if ! @HAVE_RAWMEMCHR@
|
# if ! @HAVE_RAWMEMCHR@
|
||||||
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
|
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
# endif
|
# endif
|
||||||
/* On some systems, this function is defined as an overloaded function:
|
/* On some systems, this function is defined as an overloaded function:
|
||||||
|
@ -229,6 +233,7 @@ _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
|
||||||
#if @GNULIB_STPNCPY@
|
#if @GNULIB_STPNCPY@
|
||||||
# if @REPLACE_STPNCPY@
|
# if @REPLACE_STPNCPY@
|
||||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||||
|
# undef stpncpy
|
||||||
# define stpncpy rpl_stpncpy
|
# define stpncpy rpl_stpncpy
|
||||||
# endif
|
# endif
|
||||||
_GL_FUNCDECL_RPL (stpncpy, char *,
|
_GL_FUNCDECL_RPL (stpncpy, char *,
|
||||||
|
@ -272,7 +277,7 @@ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
|
||||||
#if @GNULIB_STRCHRNUL@
|
#if @GNULIB_STRCHRNUL@
|
||||||
# if ! @HAVE_STRCHRNUL@
|
# if ! @HAVE_STRCHRNUL@
|
||||||
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
|
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
# endif
|
# endif
|
||||||
/* On some systems, this function is defined as an overloaded function:
|
/* On some systems, this function is defined as an overloaded function:
|
||||||
|
@ -306,6 +311,10 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
|
||||||
_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
||||||
_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
|
_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
|
||||||
# else
|
# else
|
||||||
|
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
|
||||||
|
/* strdup exists as a function and as a macro. Get rid of the macro. */
|
||||||
|
# undef strdup
|
||||||
|
# endif
|
||||||
# if !(@HAVE_DECL_STRDUP@ || defined strdup)
|
# if !(@HAVE_DECL_STRDUP@ || defined strdup)
|
||||||
_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
||||||
# endif
|
# endif
|
||||||
|
@ -378,13 +387,13 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
|
||||||
# define strnlen rpl_strnlen
|
# define strnlen rpl_strnlen
|
||||||
# endif
|
# endif
|
||||||
_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
|
_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
|
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
|
||||||
# else
|
# else
|
||||||
# if ! @HAVE_DECL_STRNLEN@
|
# if ! @HAVE_DECL_STRNLEN@
|
||||||
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
|
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
# endif
|
# endif
|
||||||
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
|
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
|
||||||
|
@ -414,7 +423,7 @@ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
|
||||||
#if @GNULIB_STRPBRK@
|
#if @GNULIB_STRPBRK@
|
||||||
# if ! @HAVE_STRPBRK@
|
# if ! @HAVE_STRPBRK@
|
||||||
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
|
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1, 2)));
|
_GL_ARG_NONNULL ((1, 2)));
|
||||||
# endif
|
# endif
|
||||||
/* On some systems, this function is defined as an overloaded function:
|
/* On some systems, this function is defined as an overloaded function:
|
||||||
|
@ -514,7 +523,7 @@ _GL_WARN_ON_USE (strsep, "strsep is unportable - "
|
||||||
# define strstr rpl_strstr
|
# define strstr rpl_strstr
|
||||||
# endif
|
# endif
|
||||||
_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
|
_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
|
||||||
__attribute__ ((__pure__))
|
_GL_ATTRIBUTE_PURE
|
||||||
_GL_ARG_NONNULL ((1, 2)));
|
_GL_ARG_NONNULL ((1, 2)));
|
||||||
_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
|
_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
|
||||||
# else
|
# else
|
||||||
|
@ -556,14 +565,16 @@ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
|
||||||
# endif
|
# endif
|
||||||
_GL_FUNCDECL_RPL (strcasestr, char *,
|
_GL_FUNCDECL_RPL (strcasestr, char *,
|
||||||
(const char *haystack, const char *needle)
|
(const char *haystack, const char *needle)
|
||||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)));
|
_GL_ATTRIBUTE_PURE
|
||||||
|
_GL_ARG_NONNULL ((1, 2)));
|
||||||
_GL_CXXALIAS_RPL (strcasestr, char *,
|
_GL_CXXALIAS_RPL (strcasestr, char *,
|
||||||
(const char *haystack, const char *needle));
|
(const char *haystack, const char *needle));
|
||||||
# else
|
# else
|
||||||
# if ! @HAVE_STRCASESTR@
|
# if ! @HAVE_STRCASESTR@
|
||||||
_GL_FUNCDECL_SYS (strcasestr, char *,
|
_GL_FUNCDECL_SYS (strcasestr, char *,
|
||||||
(const char *haystack, const char *needle)
|
(const char *haystack, const char *needle)
|
||||||
__attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)));
|
_GL_ATTRIBUTE_PURE
|
||||||
|
_GL_ARG_NONNULL ((1, 2)));
|
||||||
# endif
|
# endif
|
||||||
/* On some systems, this function is defined as an overloaded function:
|
/* On some systems, this function is defined as an overloaded function:
|
||||||
extern "C++" { const char * strcasestr (const char *, const char *); }
|
extern "C++" { const char * strcasestr (const char *, const char *); }
|
||||||
|
@ -764,11 +775,10 @@ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
|
||||||
#if @GNULIB_MBSPCASECMP@
|
#if @GNULIB_MBSPCASECMP@
|
||||||
/* Compare the initial segment of the character string STRING consisting of
|
/* Compare the initial segment of the character string STRING consisting of
|
||||||
at most mbslen (PREFIX) characters with the character string PREFIX,
|
at most mbslen (PREFIX) characters with the character string PREFIX,
|
||||||
ignoring case, returning less than, equal to or greater than zero if this
|
ignoring case. If the two match, return a pointer to the first byte
|
||||||
initial segment is lexicographically less than, equal to or greater than
|
after this prefix in STRING. Otherwise, return NULL.
|
||||||
PREFIX.
|
Note: This function may, in multibyte locales, return non-NULL if STRING
|
||||||
Note: This function may, in multibyte locales, return 0 if STRING is of
|
is of smaller length than PREFIX!
|
||||||
smaller length than PREFIX!
|
|
||||||
Unlike strncasecmp(), this function works correctly in multibyte
|
Unlike strncasecmp(), this function works correctly in multibyte
|
||||||
locales. */
|
locales. */
|
||||||
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
|
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
|
||||||
|
|
|
@ -1097,7 +1097,7 @@ _GL_CXXALIASWARN (readlinkat);
|
||||||
# undef readlinkat
|
# undef readlinkat
|
||||||
# if HAVE_RAW_DECL_READLINKAT
|
# if HAVE_RAW_DECL_READLINKAT
|
||||||
_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
|
_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
|
||||||
"use gnulib module symlinkat for portability");
|
"use gnulib module readlinkat for portability");
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# codeset.m4 serial 4 (gettext-0.18)
|
# codeset.m4 serial 5 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2000-2002, 2006, 2008-2010 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,
|
||||||
|
@ -9,8 +9,10 @@ dnl From Bruno Haible.
|
||||||
AC_DEFUN([AM_LANGINFO_CODESET],
|
AC_DEFUN([AM_LANGINFO_CODESET],
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
|
AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
|
||||||
[AC_TRY_LINK([#include <langinfo.h>],
|
[AC_LINK_IFELSE(
|
||||||
[char* cs = nl_langinfo(CODESET); return !cs;],
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <langinfo.h>]],
|
||||||
|
[[char* cs = nl_langinfo(CODESET); return !cs;]])],
|
||||||
[am_cv_langinfo_codeset=yes],
|
[am_cv_langinfo_codeset=yes],
|
||||||
[am_cv_langinfo_codeset=no])
|
[am_cv_langinfo_codeset=no])
|
||||||
])
|
])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# duplocale.m4 serial 2
|
# duplocale.m4 serial 4
|
||||||
dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2009-2010 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.
|
||||||
|
@ -12,20 +12,29 @@ AC_DEFUN([gl_FUNC_DUPLOCALE],
|
||||||
if test $ac_cv_func_duplocale = yes; then
|
if test $ac_cv_func_duplocale = yes; then
|
||||||
dnl Check against glibc bug where duplocale crashes.
|
dnl Check against glibc bug where duplocale crashes.
|
||||||
dnl See <http://sourceware.org/bugzilla/show_bug.cgi?id=10969>.
|
dnl See <http://sourceware.org/bugzilla/show_bug.cgi?id=10969>.
|
||||||
|
dnl Also, on AIX 7.1, duplocale(LC_GLOBAL_LOCALE) returns (locale_t)0 with
|
||||||
|
dnl errno set to EINVAL.
|
||||||
AC_REQUIRE([gl_LOCALE_H])
|
AC_REQUIRE([gl_LOCALE_H])
|
||||||
AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works],
|
AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works],
|
||||||
[gl_cv_func_duplocale_works],
|
[gl_cv_func_duplocale_works],
|
||||||
[AC_TRY_RUN([
|
[AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#if HAVE_XLOCALE_H
|
#if HAVE_XLOCALE_H
|
||||||
# include <xlocale.h>
|
# include <xlocale.h>
|
||||||
#endif
|
#endif
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
(void) duplocale (LC_GLOBAL_LOCALE);
|
if (duplocale (LC_GLOBAL_LOCALE) == (locale_t)0)
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_duplocale_works=yes], [gl_cv_func_duplocale_works=no],
|
}]])],
|
||||||
[dnl Guess it works except on glibc < 2.12.
|
[gl_cv_func_duplocale_works=yes],
|
||||||
|
[gl_cv_func_duplocale_works=no],
|
||||||
|
[dnl Guess it works except on glibc < 2.12 and AIX.
|
||||||
|
case "$host_os" in
|
||||||
|
aix*) gl_cv_func_duplocale_works="guessing no";;
|
||||||
|
*-gnu*)
|
||||||
AC_EGREP_CPP([Unlucky GNU user], [
|
AC_EGREP_CPP([Unlucky GNU user], [
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#ifdef __GNU_LIBRARY__
|
#ifdef __GNU_LIBRARY__
|
||||||
|
@ -36,6 +45,9 @@ int main ()
|
||||||
],
|
],
|
||||||
[gl_cv_func_duplocale_works="guessing no"],
|
[gl_cv_func_duplocale_works="guessing no"],
|
||||||
[gl_cv_func_duplocale_works="guessing yes"])
|
[gl_cv_func_duplocale_works="guessing yes"])
|
||||||
|
;;
|
||||||
|
*) gl_cv_func_duplocale_works="guessing yes";;
|
||||||
|
esac
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
case "$gl_cv_func_duplocale_works" in
|
case "$gl_cv_func_duplocale_works" in
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# environ.m4 serial 3
|
# environ.m4 serial 5
|
||||||
dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2001-2004, 2006-2010 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,
|
||||||
|
@ -22,14 +22,16 @@ AC_DEFUN([gt_CHECK_VAR_DECL],
|
||||||
define([gt_cv_var], [gt_cv_var_]$2[_declaration])
|
define([gt_cv_var], [gt_cv_var_]$2[_declaration])
|
||||||
AC_MSG_CHECKING([if $2 is properly declared])
|
AC_MSG_CHECKING([if $2 is properly declared])
|
||||||
AC_CACHE_VAL([gt_cv_var], [
|
AC_CACHE_VAL([gt_cv_var], [
|
||||||
AC_TRY_COMPILE([$1
|
AC_COMPILE_IFELSE(
|
||||||
extern struct { int foo; } $2;],
|
[AC_LANG_PROGRAM(
|
||||||
[$2.foo = 1;],
|
[[$1
|
||||||
gt_cv_var=no,
|
extern struct { int foo; } $2;]],
|
||||||
gt_cv_var=yes)])
|
[[$2.foo = 1;]])],
|
||||||
|
[gt_cv_var=no],
|
||||||
|
[gt_cv_var=yes])])
|
||||||
AC_MSG_RESULT([$gt_cv_var])
|
AC_MSG_RESULT([$gt_cv_var])
|
||||||
if test $gt_cv_var = yes; then
|
if test $gt_cv_var = yes; then
|
||||||
AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
|
AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
|
||||||
[Define if you have the declaration of $2.])
|
[Define if you have the declaration of $2.])
|
||||||
fi
|
fi
|
||||||
undefine([gt_cv_var])
|
undefine([gt_cv_var])
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# fcntl-o.m4 serial 1
|
# fcntl-o.m4 serial 2
|
||||||
dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2006, 2009-2010 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,
|
||||||
|
@ -12,7 +12,11 @@ dnl Written by Paul Eggert.
|
||||||
AC_DEFUN([gl_FCNTL_O_FLAGS],
|
AC_DEFUN([gl_FCNTL_O_FLAGS],
|
||||||
[
|
[
|
||||||
dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
|
dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
|
||||||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
|
||||||
|
dnl AC_GNU_SOURCE.
|
||||||
|
m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
|
||||||
|
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
|
||||||
|
[AC_REQUIRE([AC_GNU_SOURCE])])
|
||||||
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
|
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
|
||||||
[AC_RUN_IFELSE(
|
[AC_RUN_IFELSE(
|
||||||
[AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Specification in the form of a command-line invocation:
|
# Specification in the form of a command-line invocation:
|
||||||
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt announce-gen autobuild byteswap canonicalize-lgpl duplocale environ extensions flock fpieee full-read full-write func gendocs getaddrinfo git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring locale maintainer-makefile putenv stat-time stdlib strcase strftime striconveh string sys_stat verify version-etc-fsf vsnprintf warnings
|
||||||
|
|
||||||
# Specification in the form of a few gnulib-tool.m4 macro invocations:
|
# Specification in the form of a few gnulib-tool.m4 macro invocations:
|
||||||
gl_LOCAL_DIR([])
|
gl_LOCAL_DIR([])
|
||||||
|
@ -50,6 +50,7 @@ gl_MODULES([
|
||||||
locale
|
locale
|
||||||
maintainer-makefile
|
maintainer-makefile
|
||||||
putenv
|
putenv
|
||||||
|
stat-time
|
||||||
stdlib
|
stdlib
|
||||||
strcase
|
strcase
|
||||||
strftime
|
strftime
|
||||||
|
|
|
@ -98,6 +98,7 @@ AC_DEFUN([gl_EARLY],
|
||||||
# Code from module socklen:
|
# Code from module socklen:
|
||||||
# Code from module ssize_t:
|
# Code from module ssize_t:
|
||||||
# Code from module stat:
|
# Code from module stat:
|
||||||
|
# Code from module stat-time:
|
||||||
# Code from module stdarg:
|
# Code from module stdarg:
|
||||||
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
|
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
|
||||||
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
|
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
|
||||||
|
@ -308,6 +309,9 @@ AC_DEFUN([gl_INIT],
|
||||||
# Code from module stat:
|
# Code from module stat:
|
||||||
gl_FUNC_STAT
|
gl_FUNC_STAT
|
||||||
gl_SYS_STAT_MODULE_INDICATOR([stat])
|
gl_SYS_STAT_MODULE_INDICATOR([stat])
|
||||||
|
# Code from module stat-time:
|
||||||
|
gl_STAT_TIME
|
||||||
|
gl_STAT_BIRTHTIME
|
||||||
# Code from module stdarg:
|
# Code from module stdarg:
|
||||||
gl_STDARG_H
|
gl_STDARG_H
|
||||||
# Code from module stdbool:
|
# Code from module stdbool:
|
||||||
|
@ -608,6 +612,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||||
lib/safe-write.h
|
lib/safe-write.h
|
||||||
lib/size_max.h
|
lib/size_max.h
|
||||||
lib/snprintf.c
|
lib/snprintf.c
|
||||||
|
lib/stat-time.h
|
||||||
lib/stat.c
|
lib/stat.c
|
||||||
lib/stdarg.in.h
|
lib/stdarg.in.h
|
||||||
lib/stdbool.in.h
|
lib/stdbool.in.h
|
||||||
|
@ -721,6 +726,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||||
m4/socklen.m4
|
m4/socklen.m4
|
||||||
m4/sockpfaf.m4
|
m4/sockpfaf.m4
|
||||||
m4/ssize_t.m4
|
m4/ssize_t.m4
|
||||||
|
m4/stat-time.m4
|
||||||
m4/stat.m4
|
m4/stat.m4
|
||||||
m4/stdarg.m4
|
m4/stdarg.m4
|
||||||
m4/stdbool.m4
|
m4/stdbool.m4
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# hostent.m4 serial 1
|
# hostent.m4 serial 2
|
||||||
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2008, 2010 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.
|
||||||
|
@ -28,12 +28,16 @@ AC_DEFUN([gl_HOSTENT],
|
||||||
[gl_cv_w32_gethostbyname=no
|
[gl_cv_w32_gethostbyname=no
|
||||||
gl_save_LIBS="$LIBS"
|
gl_save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS -lws2_32"
|
LIBS="$LIBS -lws2_32"
|
||||||
AC_TRY_LINK([
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
], [gethostbyname(NULL);], [gl_cv_w32_gethostbyname=yes])
|
]],
|
||||||
|
[[gethostbyname(NULL);]])],
|
||||||
|
[gl_cv_w32_gethostbyname=yes])
|
||||||
LIBS="$gl_save_LIBS"
|
LIBS="$gl_save_LIBS"
|
||||||
])
|
])
|
||||||
if test "$gl_cv_w32_gethostbyname" = "yes"; then
|
if test "$gl_cv_w32_gethostbyname" = "yes"; then
|
||||||
|
|
78
m4/iconv.m4
78
m4/iconv.m4
|
@ -1,4 +1,4 @@
|
||||||
# iconv.m4 serial 11 (gettext-0.18.1)
|
# iconv.m4 serial 15 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2000-2002, 2007-2010 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,
|
||||||
|
@ -30,27 +30,35 @@ AC_DEFUN([AM_ICONV_LINK],
|
||||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||||
dnl because if the user has installed libiconv and not disabled its use
|
dnl because if the user has installed libiconv and not disabled its use
|
||||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
|
||||||
am_save_CPPFLAGS="$CPPFLAGS"
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||||
am_cv_lib_iconv=no
|
am_cv_lib_iconv=no
|
||||||
AC_TRY_LINK([#include <stdlib.h>
|
AC_LINK_IFELSE(
|
||||||
#include <iconv.h>],
|
[AC_LANG_PROGRAM(
|
||||||
[iconv_t cd = iconv_open("","");
|
[[
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
]],
|
||||||
|
[[iconv_t cd = iconv_open("","");
|
||||||
iconv(cd,NULL,NULL,NULL,NULL);
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
iconv_close(cd);],
|
iconv_close(cd);]])],
|
||||||
[am_cv_func_iconv=yes])
|
[am_cv_func_iconv=yes])
|
||||||
if test "$am_cv_func_iconv" != yes; then
|
if test "$am_cv_func_iconv" != yes; then
|
||||||
am_save_LIBS="$LIBS"
|
am_save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $LIBICONV"
|
LIBS="$LIBS $LIBICONV"
|
||||||
AC_TRY_LINK([#include <stdlib.h>
|
AC_LINK_IFELSE(
|
||||||
#include <iconv.h>],
|
[AC_LANG_PROGRAM(
|
||||||
[iconv_t cd = iconv_open("","");
|
[[
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
]],
|
||||||
|
[[iconv_t cd = iconv_open("","");
|
||||||
iconv(cd,NULL,NULL,NULL,NULL);
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
iconv_close(cd);],
|
iconv_close(cd);]])],
|
||||||
[am_cv_lib_iconv=yes]
|
[am_cv_lib_iconv=yes]
|
||||||
[am_cv_func_iconv=yes])
|
[am_cv_func_iconv=yes])
|
||||||
LIBS="$am_save_LIBS"
|
LIBS="$am_save_LIBS"
|
||||||
|
@ -58,12 +66,14 @@ AC_DEFUN([AM_ICONV_LINK],
|
||||||
])
|
])
|
||||||
if test "$am_cv_func_iconv" = yes; then
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||||
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
|
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
|
||||||
|
dnl Solaris 10.
|
||||||
am_save_LIBS="$LIBS"
|
am_save_LIBS="$LIBS"
|
||||||
if test $am_cv_lib_iconv = yes; then
|
if test $am_cv_lib_iconv = yes; then
|
||||||
LIBS="$LIBS $LIBICONV"
|
LIBS="$LIBS $LIBICONV"
|
||||||
fi
|
fi
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
int main ()
|
int main ()
|
||||||
|
@ -106,6 +116,24 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Test against AIX 6.1..7.1 bug: Buffer overrun. */
|
||||||
|
{
|
||||||
|
iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
|
||||||
|
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||||
|
{
|
||||||
|
static const char input[] = "\304";
|
||||||
|
static char buf[2] = { (char)0xDE, (char)0xAD };
|
||||||
|
const char *inptr = input;
|
||||||
|
size_t inbytesleft = 1;
|
||||||
|
char *outptr = buf;
|
||||||
|
size_t outbytesleft = 1;
|
||||||
|
size_t res = iconv (cd_88591_to_utf8,
|
||||||
|
(char **) &inptr, &inbytesleft,
|
||||||
|
&outptr, &outbytesleft);
|
||||||
|
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
#if 0 /* This bug could be worked around by the caller. */
|
#if 0 /* This bug could be worked around by the caller. */
|
||||||
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
||||||
{
|
{
|
||||||
|
@ -138,11 +166,17 @@ int main ()
|
||||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
|
}]])],
|
||||||
[case "$host_os" in
|
[am_cv_func_iconv_works=yes],
|
||||||
|
[am_cv_func_iconv_works=no],
|
||||||
|
[
|
||||||
|
changequote(,)dnl
|
||||||
|
case "$host_os" in
|
||||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||||
esac])
|
esac
|
||||||
|
changequote([,])dnl
|
||||||
|
])
|
||||||
LIBS="$am_save_LIBS"
|
LIBS="$am_save_LIBS"
|
||||||
])
|
])
|
||||||
case "$am_cv_func_iconv_works" in
|
case "$am_cv_func_iconv_works" in
|
||||||
|
@ -181,17 +215,22 @@ dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||||
dnl warnings.
|
dnl warnings.
|
||||||
m4_define([gl_iconv_AC_DEFUN],
|
m4_define([gl_iconv_AC_DEFUN],
|
||||||
m4_version_prereq([2.64],
|
m4_version_prereq([2.64],
|
||||||
|
[[AC_DEFUN_ONCE(
|
||||||
|
[$1], [$2])]],
|
||||||
|
[m4_ifdef([gl_00GNULIB],
|
||||||
[[AC_DEFUN_ONCE(
|
[[AC_DEFUN_ONCE(
|
||||||
[$1], [$2])]],
|
[$1], [$2])]],
|
||||||
[[AC_DEFUN(
|
[[AC_DEFUN(
|
||||||
[$1], [$2])]]))
|
[$1], [$2])]])]))
|
||||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
gl_iconv_AC_DEFUN([AM_ICONV],
|
||||||
[
|
[
|
||||||
AM_ICONV_LINK
|
AM_ICONV_LINK
|
||||||
if test "$am_cv_func_iconv" = yes; then
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
AC_MSG_CHECKING([for iconv declaration])
|
AC_MSG_CHECKING([for iconv declaration])
|
||||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||||
AC_TRY_COMPILE([
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
extern
|
extern
|
||||||
|
@ -203,7 +242,10 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
|
||||||
#else
|
#else
|
||||||
size_t iconv();
|
size_t iconv();
|
||||||
#endif
|
#endif
|
||||||
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
|
]],
|
||||||
|
[[]])],
|
||||||
|
[am_cv_proto_iconv_arg1=""],
|
||||||
|
[am_cv_proto_iconv_arg1="const"])
|
||||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||||
AC_MSG_RESULT([
|
AC_MSG_RESULT([
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# iconv_open.m4 serial 7
|
# iconv_open.m4 serial 8
|
||||||
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2007-2010 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,
|
||||||
|
@ -63,7 +63,8 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN_UTF],
|
||||||
[
|
[
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $LIBICONV"
|
LIBS="$LIBS $LIBICONV"
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -209,7 +210,9 @@ int main ()
|
||||||
ASSERT (iconv_close (cd) == 0);
|
ASSERT (iconv_close (cd) == 0);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_iconv_supports_utf=yes], [gl_cv_func_iconv_supports_utf=no],
|
}]])],
|
||||||
|
[gl_cv_func_iconv_supports_utf=yes],
|
||||||
|
[gl_cv_func_iconv_supports_utf=no],
|
||||||
[
|
[
|
||||||
dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do.
|
dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do.
|
||||||
dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to"
|
dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# include_next.m4 serial 14
|
# include_next.m4 serial 15
|
||||||
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2006-2010 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,
|
||||||
|
@ -68,10 +68,11 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
gl_save_CPPFLAGS="$CPPFLAGS"
|
gl_save_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
|
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
|
||||||
AC_COMPILE_IFELSE([#include <conftest.h>],
|
dnl We intentionally avoid using AC_LANG_SOURCE here.
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
|
||||||
[gl_cv_have_include_next=yes],
|
[gl_cv_have_include_next=yes],
|
||||||
[CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
|
[CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
|
||||||
AC_COMPILE_IFELSE([#include <conftest.h>],
|
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
|
||||||
[gl_cv_have_include_next=buggy],
|
[gl_cv_have_include_next=buggy],
|
||||||
[gl_cv_have_include_next=no])
|
[gl_cv_have_include_next=no])
|
||||||
])
|
])
|
||||||
|
@ -185,3 +186,7 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS],
|
||||||
[$gl_next_as_first_directive])
|
[$gl_next_as_first_directive])
|
||||||
AS_VAR_POPDEF([gl_next_header])])
|
AS_VAR_POPDEF([gl_next_header])])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE;
|
||||||
|
# this fallback is safe for all earlier autoconf versions.
|
||||||
|
m4_define_default([AC_LANG_DEFINES_PROVIDED])
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# intmax_t.m4 serial 7
|
# intmax_t.m4 serial 8
|
||||||
dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation,
|
dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 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
|
||||||
|
@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
dnl From Paul Eggert.
|
dnl From Paul Eggert.
|
||||||
|
|
||||||
AC_PREREQ([2.13])
|
AC_PREREQ([2.53])
|
||||||
|
|
||||||
# Define intmax_t to 'long' or 'long long'
|
# Define intmax_t to 'long' or 'long long'
|
||||||
# if it is not already defined in <stdint.h> or <inttypes.h>.
|
# if it is not already defined in <stdint.h> or <inttypes.h>.
|
||||||
|
@ -38,7 +38,9 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
|
||||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||||
AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
|
AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
|
||||||
[AC_TRY_COMPILE([
|
[AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if HAVE_STDINT_H_WITH_UINTMAX
|
#if HAVE_STDINT_H_WITH_UINTMAX
|
||||||
|
@ -47,7 +49,10 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
|
||||||
#if HAVE_INTTYPES_H_WITH_UINTMAX
|
#if HAVE_INTTYPES_H_WITH_UINTMAX
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
|
]],
|
||||||
|
[[intmax_t x = -1; return !x;]])],
|
||||||
|
[gt_cv_c_intmax_t=yes],
|
||||||
|
[gt_cv_c_intmax_t=no])])
|
||||||
if test $gt_cv_c_intmax_t = yes; then
|
if test $gt_cv_c_intmax_t = yes; then
|
||||||
AC_DEFINE([HAVE_INTMAX_T], [1],
|
AC_DEFINE([HAVE_INTMAX_T], [1],
|
||||||
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
|
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# inttypes_h.m4 serial 9
|
# inttypes_h.m4 serial 10
|
||||||
dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 1997-2004, 2006, 2008-2010 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,
|
||||||
|
@ -12,10 +12,13 @@ dnl From Paul Eggert.
|
||||||
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
|
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
|
AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
|
||||||
[AC_TRY_COMPILE(
|
[AC_COMPILE_IFELSE(
|
||||||
[#include <sys/types.h>
|
[AC_LANG_PROGRAM(
|
||||||
#include <inttypes.h>],
|
[[
|
||||||
[uintmax_t i = (uintmax_t) -1; return !i;],
|
#include <sys/types.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
]],
|
||||||
|
[[uintmax_t i = (uintmax_t) -1; return !i;]])],
|
||||||
[gl_cv_header_inttypes_h=yes],
|
[gl_cv_header_inttypes_h=yes],
|
||||||
[gl_cv_header_inttypes_h=no])])
|
[gl_cv_header_inttypes_h=no])])
|
||||||
if test $gl_cv_header_inttypes_h = yes; then
|
if test $gl_cv_header_inttypes_h = yes; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# ld-version-script.m4 serial 1
|
# ld-version-script.m4 serial 2
|
||||||
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2008, 2009, 2010 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,
|
||||||
|
@ -34,7 +34,7 @@ VERS_2 {
|
||||||
global: sym;
|
global: sym;
|
||||||
} VERS_1;
|
} VERS_1;
|
||||||
EOF
|
EOF
|
||||||
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||||
[have_ld_version_script=yes], [have_ld_version_script=no])
|
[have_ld_version_script=yes], [have_ld_version_script=no])
|
||||||
rm -f conftest.map
|
rm -f conftest.map
|
||||||
LDFLAGS="$save_LDFLAGS"
|
LDFLAGS="$save_LDFLAGS"
|
||||||
|
|
17
m4/lib-ld.m4
17
m4/lib-ld.m4
|
@ -1,4 +1,4 @@
|
||||||
# lib-ld.m4 serial 4 (gettext-0.18)
|
# lib-ld.m4 serial 5 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 1996-2003, 2009-2010 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,
|
||||||
|
@ -31,15 +31,14 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
# Prepare PATH_SEPARATOR.
|
# Prepare PATH_SEPARATOR.
|
||||||
# The user is always right.
|
# The user is always right.
|
||||||
if test "${PATH_SEPARATOR+set}" != set; then
|
if test "${PATH_SEPARATOR+set}" != set; then
|
||||||
echo "#! /bin/sh" >conf$$.sh
|
# Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
|
||||||
echo "exit 0" >>conf$$.sh
|
# contains only /bin. Note that ksh looks also at the FPATH variable,
|
||||||
chmod +x conf$$.sh
|
# so we have to set that as well for the test.
|
||||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
|
||||||
PATH_SEPARATOR=';'
|
|
||||||
else
|
|
||||||
PATH_SEPARATOR=:
|
PATH_SEPARATOR=:
|
||||||
fi
|
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||||
rm -f conf$$.sh
|
&& { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||||
|
|| PATH_SEPARATOR=';'
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
ac_prog=ld
|
ac_prog=ld
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# lib-link.m4 serial 21 (gettext-0.18)
|
# lib-link.m4 serial 25 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2001-2010 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,
|
||||||
|
@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||||
[
|
[
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||||
AC_REQUIRE([AC_LIB_RPATH])
|
AC_REQUIRE([AC_LIB_RPATH])
|
||||||
pushdef([Name],[translit([$1],[./-], [___])])
|
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
||||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||||
|
@ -58,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||||
[
|
[
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||||
AC_REQUIRE([AC_LIB_RPATH])
|
AC_REQUIRE([AC_LIB_RPATH])
|
||||||
pushdef([Name],[translit([$1],[./-], [___])])
|
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
||||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||||
|
|
||||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||||
dnl accordingly.
|
dnl accordingly.
|
||||||
|
@ -85,7 +85,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||||
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
||||||
*) LIBS="$LIB[]NAME $LIBS" ;;
|
*) LIBS="$LIB[]NAME $LIBS" ;;
|
||||||
esac
|
esac
|
||||||
AC_TRY_LINK([$3], [$4],
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[$3]], [[$4]])],
|
||||||
[ac_cv_lib[]Name=yes],
|
[ac_cv_lib[]Name=yes],
|
||||||
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
@ -157,15 +158,15 @@ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
||||||
dnl macro call that searches for libname.
|
dnl macro call that searches for libname.
|
||||||
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
||||||
[
|
[
|
||||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||||
define([acl_frompackage_]NAME, [$2])
|
define([acl_frompackage_]NAME, [$2])
|
||||||
popdef([NAME])
|
popdef([NAME])
|
||||||
pushdef([PACK],[$2])
|
pushdef([PACK],[$2])
|
||||||
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||||
define([acl_libsinpackage_]PACKUP,
|
define([acl_libsinpackage_]PACKUP,
|
||||||
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
|
m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
|
||||||
popdef([PACKUP])
|
popdef([PACKUP])
|
||||||
popdef([PACK])
|
popdef([PACK])
|
||||||
])
|
])
|
||||||
|
@ -178,14 +179,14 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||||
[
|
[
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||||
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
||||||
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||||
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
||||||
dnl Autoconf >= 2.61 supports dots in --with options.
|
dnl Autoconf >= 2.61 supports dots in --with options.
|
||||||
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
|
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
|
||||||
dnl By default, look in $includedir and $libdir.
|
dnl By default, look in $includedir and $libdir.
|
||||||
use_additional=yes
|
use_additional=yes
|
||||||
AC_LIB_WITH_FINAL_PREFIX([
|
AC_LIB_WITH_FINAL_PREFIX([
|
||||||
|
@ -242,7 +243,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||||
names_already_handled="$names_already_handled $name"
|
names_already_handled="$names_already_handled $name"
|
||||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
|
||||||
eval value=\"\$HAVE_LIB$uppername\"
|
eval value=\"\$HAVE_LIB$uppername\"
|
||||||
if test -n "$value"; then
|
if test -n "$value"; then
|
||||||
if test "$value" = yes; then
|
if test "$value" = yes; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# libunistring.m4 serial 9
|
# libunistring.m4 serial 11
|
||||||
dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2009-2010 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,
|
||||||
|
@ -23,10 +23,13 @@ dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||||
dnl warnings.
|
dnl warnings.
|
||||||
m4_define([gl_libunistring_AC_DEFUN],
|
m4_define([gl_libunistring_AC_DEFUN],
|
||||||
m4_version_prereq([2.64],
|
m4_version_prereq([2.64],
|
||||||
|
[[AC_DEFUN_ONCE(
|
||||||
|
[$1], [$2])]],
|
||||||
|
[m4_ifdef([gl_00GNULIB],
|
||||||
[[AC_DEFUN_ONCE(
|
[[AC_DEFUN_ONCE(
|
||||||
[$1], [$2])]],
|
[$1], [$2])]],
|
||||||
[[AC_DEFUN(
|
[[AC_DEFUN(
|
||||||
[$1], [$2])]]))
|
[$1], [$2])]])]))
|
||||||
gl_libunistring_AC_DEFUN([gl_LIBUNISTRING],
|
gl_libunistring_AC_DEFUN([gl_LIBUNISTRING],
|
||||||
[
|
[
|
||||||
AC_BEFORE([$0], [gl_LIBUNISTRING_MODULE])
|
AC_BEFORE([$0], [gl_LIBUNISTRING_MODULE])
|
||||||
|
@ -103,9 +106,10 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
|
||||||
dnl Use other tests to distinguish them.
|
dnl Use other tests to distinguish them.
|
||||||
if test $gl_libunistring_hexversion = 9; then
|
if test $gl_libunistring_hexversion = 9; then
|
||||||
dnl Version 0.9.2 introduced the header <unistring/cdefs.h>.
|
dnl Version 0.9.2 introduced the header <unistring/cdefs.h>.
|
||||||
AC_TRY_COMPILE([#include <unistring/cdefs.h>], ,
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[#include <unistring/cdefs.h>]], [[]])],
|
||||||
[gl_cv_libunistring_version092=true],
|
[gl_cv_libunistring_version092=true],
|
||||||
[gl_cv_libunistring_version092=false]);
|
[gl_cv_libunistring_version092=false])
|
||||||
if $gl_cv_libunistring_version092; then
|
if $gl_cv_libunistring_version092; then
|
||||||
dnl Version 0.9.3 changed a comment in <unistr.h>.
|
dnl Version 0.9.3 changed a comment in <unistr.h>.
|
||||||
gl_ABSOLUTE_HEADER_ONE([unistr.h])
|
gl_ABSOLUTE_HEADER_ONE([unistr.h])
|
||||||
|
@ -119,8 +123,11 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dnl Version 0.9.1 introduced the type casing_suffix_context_t.
|
dnl Version 0.9.1 introduced the type casing_suffix_context_t.
|
||||||
AC_TRY_COMPILE([#include <unicase.h>
|
AC_COMPILE_IFELSE(
|
||||||
casing_suffix_context_t ct;], ,
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <unicase.h>
|
||||||
|
casing_suffix_context_t ct;]],
|
||||||
|
[[]])],
|
||||||
[gl_cv_libunistring_version091=true],
|
[gl_cv_libunistring_version091=true],
|
||||||
[gl_cv_libunistring_version091=false])
|
[gl_cv_libunistring_version091=false])
|
||||||
if $gl_cv_libunistring_version091; then
|
if $gl_cv_libunistring_version091; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# locale_h.m4 serial 10
|
# locale_h.m4 serial 11
|
||||||
dnl Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2007, 2009-2010 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,
|
||||||
|
@ -18,8 +18,11 @@ AC_DEFUN([gl_LOCALE_H],
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
|
AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
|
||||||
[gl_cv_header_locale_h_posix2001],
|
[gl_cv_header_locale_h_posix2001],
|
||||||
[AC_TRY_COMPILE([#include <locale.h>
|
[AC_COMPILE_IFELSE(
|
||||||
int x = LC_MESSAGES;], [],
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <locale.h>
|
||||||
|
int x = LC_MESSAGES;]],
|
||||||
|
[[]])],
|
||||||
[gl_cv_header_locale_h_posix2001=yes],
|
[gl_cv_header_locale_h_posix2001=yes],
|
||||||
[gl_cv_header_locale_h_posix2001=no])])
|
[gl_cv_header_locale_h_posix2001=no])])
|
||||||
|
|
||||||
|
@ -32,8 +35,11 @@ int x = LC_MESSAGES;], [],
|
||||||
dnl itself, we assume that <xlocale.h> will do so.
|
dnl itself, we assume that <xlocale.h> will do so.
|
||||||
AC_CACHE_CHECK([whether locale.h defines locale_t],
|
AC_CACHE_CHECK([whether locale.h defines locale_t],
|
||||||
[gl_cv_header_locale_has_locale_t],
|
[gl_cv_header_locale_has_locale_t],
|
||||||
[AC_TRY_COMPILE([#include <locale.h>
|
[AC_COMPILE_IFELSE(
|
||||||
locale_t x;], [],
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <locale.h>
|
||||||
|
locale_t x;]],
|
||||||
|
[[]])],
|
||||||
[gl_cv_header_locale_has_locale_t=yes],
|
[gl_cv_header_locale_has_locale_t=yes],
|
||||||
[gl_cv_header_locale_has_locale_t=no])
|
[gl_cv_header_locale_has_locale_t=no])
|
||||||
])
|
])
|
||||||
|
|
41
m4/malloc.m4
41
m4/malloc.m4
|
@ -1,25 +1,40 @@
|
||||||
# malloc.m4 serial 9
|
# malloc.m4 serial 12
|
||||||
dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2007, 2009, 2010 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.
|
||||||
|
|
||||||
|
# gl_FUNC_MALLOC_GNU
|
||||||
|
# ------------------
|
||||||
|
# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
|
||||||
|
# it is not.
|
||||||
|
AC_DEFUN([gl_FUNC_MALLOC_GNU],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||||
|
dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
|
||||||
|
_AC_FUNC_MALLOC_IF(
|
||||||
|
[AC_DEFINE([HAVE_MALLOC_GNU], [1],
|
||||||
|
[Define to 1 if your system has a GNU libc compatible 'malloc'
|
||||||
|
function, and to 0 otherwise.])],
|
||||||
|
[AC_DEFINE([HAVE_MALLOC_GNU], [0])
|
||||||
|
gl_REPLACE_MALLOC
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
# gl_FUNC_MALLOC_POSIX
|
# gl_FUNC_MALLOC_POSIX
|
||||||
# --------------------
|
# --------------------
|
||||||
# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
|
# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
|
||||||
# fails), and replace malloc if it is not.
|
# fails), and replace malloc if it is not.
|
||||||
AC_DEFUN([gl_FUNC_MALLOC_POSIX],
|
AC_DEFUN([gl_FUNC_MALLOC_POSIX],
|
||||||
[
|
[
|
||||||
|
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||||
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
|
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
|
||||||
if test $gl_cv_func_malloc_posix = yes; then
|
if test $gl_cv_func_malloc_posix = yes; then
|
||||||
HAVE_MALLOC_POSIX=1
|
|
||||||
AC_DEFINE([HAVE_MALLOC_POSIX], [1],
|
AC_DEFINE([HAVE_MALLOC_POSIX], [1],
|
||||||
[Define if the 'malloc' function is POSIX compliant.])
|
[Define if the 'malloc' function is POSIX compliant.])
|
||||||
else
|
else
|
||||||
AC_LIBOBJ([malloc])
|
gl_REPLACE_MALLOC
|
||||||
HAVE_MALLOC_POSIX=0
|
|
||||||
fi
|
fi
|
||||||
AC_SUBST([HAVE_MALLOC_POSIX])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# Test whether malloc, realloc, calloc are POSIX compliant,
|
# Test whether malloc, realloc, calloc are POSIX compliant,
|
||||||
|
@ -32,10 +47,20 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
|
||||||
dnl It is too dangerous to try to allocate a large amount of memory:
|
dnl It is too dangerous to try to allocate a large amount of memory:
|
||||||
dnl some systems go to their knees when you do that. So assume that
|
dnl some systems go to their knees when you do that. So assume that
|
||||||
dnl all Unix implementations of the function are POSIX compliant.
|
dnl all Unix implementations of the function are POSIX compliant.
|
||||||
AC_TRY_COMPILE([],
|
AC_COMPILE_IFELSE(
|
||||||
[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
[AC_LANG_PROGRAM(
|
||||||
|
[[]],
|
||||||
|
[[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
||||||
choke me
|
choke me
|
||||||
#endif
|
#endif
|
||||||
], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
|
]])],
|
||||||
|
[gl_cv_func_malloc_posix=yes],
|
||||||
|
[gl_cv_func_malloc_posix=no])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([gl_REPLACE_MALLOC],
|
||||||
|
[
|
||||||
|
AC_LIBOBJ([malloc])
|
||||||
|
REPLACE_MALLOC=1
|
||||||
|
])
|
||||||
|
|
21
m4/mbrlen.m4
21
m4/mbrlen.m4
|
@ -1,5 +1,5 @@
|
||||||
# mbrlen.m4 serial 2
|
# mbrlen.m4 serial 3
|
||||||
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2008, 2010 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.
|
||||||
|
@ -46,13 +46,14 @@ AC_DEFUN([gl_MBRLEN_INCOMPLETE_STATE],
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
# Guess no on AIX and OSF/1.
|
# Guess no on AIX and OSF/1.
|
||||||
osf*) gl_cv_func_mbrlen_incomplete_state="guessing no" ;;
|
aix* | osf*) gl_cv_func_mbrlen_incomplete_state="guessing no" ;;
|
||||||
# Guess yes otherwise.
|
# Guess yes otherwise.
|
||||||
*) gl_cv_func_mbrlen_incomplete_state="guessing yes" ;;
|
*) gl_cv_func_mbrlen_incomplete_state="guessing yes" ;;
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_JA != none; then
|
if test $LOCALE_JA != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -69,7 +70,7 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrlen_incomplete_state=yes],
|
[gl_cv_func_mbrlen_incomplete_state=yes],
|
||||||
[gl_cv_func_mbrlen_incomplete_state=no],
|
[gl_cv_func_mbrlen_incomplete_state=no],
|
||||||
[])
|
[])
|
||||||
|
@ -102,7 +103,8 @@ changequote(,)dnl
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
|
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -137,7 +139,7 @@ int main ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrlen_retval=yes],
|
[gl_cv_func_mbrlen_retval=yes],
|
||||||
[gl_cv_func_mbrlen_retval=no],
|
[gl_cv_func_mbrlen_retval=no],
|
||||||
[])
|
[])
|
||||||
|
@ -167,7 +169,8 @@ changequote(,)dnl
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_ZH_CN != none; then
|
if test $LOCALE_ZH_CN != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -183,7 +186,7 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrlen_nul_retval=yes],
|
[gl_cv_func_mbrlen_nul_retval=yes],
|
||||||
[gl_cv_func_mbrlen_nul_retval=no],
|
[gl_cv_func_mbrlen_nul_retval=no],
|
||||||
[])
|
[])
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# mbrtowc.m4 serial 17
|
# mbrtowc.m4 serial 18
|
||||||
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2010 Free Software Foundation,
|
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2010 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
|
||||||
|
@ -102,13 +102,14 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
# Guess no on AIX and OSF/1.
|
# Guess no on AIX and OSF/1.
|
||||||
osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
|
aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
|
||||||
# Guess yes otherwise.
|
# Guess yes otherwise.
|
||||||
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
|
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_JA != none; then
|
if test $LOCALE_JA != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -126,7 +127,7 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrtowc_incomplete_state=yes],
|
[gl_cv_func_mbrtowc_incomplete_state=yes],
|
||||||
[gl_cv_func_mbrtowc_incomplete_state=no],
|
[gl_cv_func_mbrtowc_incomplete_state=no],
|
||||||
[:])
|
[:])
|
||||||
|
@ -156,7 +157,8 @@ changequote(,)dnl
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_ZH_CN != none; then
|
if test $LOCALE_ZH_CN != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -178,7 +180,7 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrtowc_sanitycheck=yes],
|
[gl_cv_func_mbrtowc_sanitycheck=yes],
|
||||||
[gl_cv_func_mbrtowc_sanitycheck=no],
|
[gl_cv_func_mbrtowc_sanitycheck=no],
|
||||||
[:])
|
[:])
|
||||||
|
@ -208,7 +210,8 @@ changequote(,)dnl
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_FR_UTF8 != none; then
|
if test $LOCALE_FR_UTF8 != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -228,7 +231,10 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:])
|
}]])],
|
||||||
|
[gl_cv_func_mbrtowc_null_arg=yes],
|
||||||
|
[gl_cv_func_mbrtowc_null_arg=no],
|
||||||
|
[:])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
@ -258,7 +264,8 @@ changequote(,)dnl
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
|
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -295,7 +302,7 @@ int main ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrtowc_retval=yes],
|
[gl_cv_func_mbrtowc_retval=yes],
|
||||||
[gl_cv_func_mbrtowc_retval=no],
|
[gl_cv_func_mbrtowc_retval=no],
|
||||||
[:])
|
[:])
|
||||||
|
@ -325,7 +332,8 @@ changequote(,)dnl
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
if test $LOCALE_ZH_CN != none; then
|
if test $LOCALE_ZH_CN != none; then
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
@ -342,7 +350,7 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_mbrtowc_nul_retval=yes],
|
[gl_cv_func_mbrtowc_nul_retval=yes],
|
||||||
[gl_cv_func_mbrtowc_nul_retval=no],
|
[gl_cv_func_mbrtowc_nul_retval=no],
|
||||||
[:])
|
[:])
|
||||||
|
|
124
m4/printf.m4
124
m4/printf.m4
|
@ -1,4 +1,4 @@
|
||||||
# printf.m4 serial 33
|
# printf.m4 serial 35
|
||||||
dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2003, 2007-2010 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,
|
||||||
|
@ -17,7 +17,8 @@ AC_DEFUN([gl_PRINTF_SIZES_C99],
|
||||||
AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
|
AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
|
||||||
[gl_cv_func_printf_sizes_c99],
|
[gl_cv_func_printf_sizes_c99],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -50,7 +51,9 @@ int main ()
|
||||||
|| strcmp (buf, "1.5 33") != 0)
|
|| strcmp (buf, "1.5 33") != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_sizes_c99=yes],
|
||||||
|
[gl_cv_func_printf_sizes_c99=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -92,7 +95,8 @@ AC_DEFUN([gl_PRINTF_LONG_DOUBLE],
|
||||||
AC_CACHE_CHECK([whether printf supports 'long double' arguments],
|
AC_CACHE_CHECK([whether printf supports 'long double' arguments],
|
||||||
[gl_cv_func_printf_long_double],
|
[gl_cv_func_printf_long_double],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[10000];
|
static char buf[10000];
|
||||||
|
@ -111,7 +115,9 @@ int main ()
|
||||||
|| strcmp (buf, "1.75 33") != 0)
|
|| strcmp (buf, "1.75 33") != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_long_double=yes],
|
||||||
|
[gl_cv_func_printf_long_double=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -136,7 +142,8 @@ AC_DEFUN([gl_PRINTF_INFINITE],
|
||||||
AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
|
AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
|
||||||
[gl_cv_func_printf_infinite],
|
[gl_cv_func_printf_infinite],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static int
|
static int
|
||||||
|
@ -201,7 +208,9 @@ int main ()
|
||||||
|| strcmp (buf, "-0") != 0)
|
|| strcmp (buf, "-0") != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_infinite=yes],
|
||||||
|
[gl_cv_func_printf_infinite=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -252,7 +261,8 @@ AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
|
||||||
AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments],
|
AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments],
|
||||||
[gl_cv_func_printf_infinite_long_double],
|
[gl_cv_func_printf_infinite_long_double],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
]GL_NOCRASH[
|
]GL_NOCRASH[
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -414,7 +424,7 @@ int main ()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_printf_infinite_long_double=yes],
|
[gl_cv_func_printf_infinite_long_double=yes],
|
||||||
[gl_cv_func_printf_infinite_long_double=no],
|
[gl_cv_func_printf_infinite_long_double=no],
|
||||||
[
|
[
|
||||||
|
@ -466,7 +476,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
|
||||||
AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
|
AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
|
||||||
[gl_cv_func_printf_directive_a],
|
[gl_cv_func_printf_directive_a],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -512,7 +523,9 @@ int main ()
|
||||||
&& strcmp (buf, "0x8.0p-2") != 0))
|
&& strcmp (buf, "0x8.0p-2") != 0))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_directive_a=yes],
|
||||||
|
[gl_cv_func_printf_directive_a=no],
|
||||||
[
|
[
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
# Guess yes on glibc >= 2.5 systems.
|
# Guess yes on glibc >= 2.5 systems.
|
||||||
|
@ -546,7 +559,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_F],
|
||||||
AC_CACHE_CHECK([whether printf supports the 'F' directive],
|
AC_CACHE_CHECK([whether printf supports the 'F' directive],
|
||||||
[gl_cv_func_printf_directive_f],
|
[gl_cv_func_printf_directive_f],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -563,7 +577,9 @@ int main ()
|
||||||
|| strcmp (buf, "1234") != 0)
|
|| strcmp (buf, "1234") != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_directive_f=yes],
|
||||||
|
[gl_cv_func_printf_directive_f=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -597,7 +613,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
|
||||||
AC_CACHE_CHECK([whether printf supports the 'n' directive],
|
AC_CACHE_CHECK([whether printf supports the 'n' directive],
|
||||||
[gl_cv_func_printf_directive_n],
|
[gl_cv_func_printf_directive_n],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char fmtstring[10];
|
static char fmtstring[10];
|
||||||
|
@ -614,7 +631,9 @@ int main ()
|
||||||
|| count != 4)
|
|| count != 4)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_directive_n=yes],
|
||||||
|
[gl_cv_func_printf_directive_n=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -639,7 +658,8 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_LS],
|
||||||
AC_CACHE_CHECK([whether printf supports the 'ls' directive],
|
AC_CACHE_CHECK([whether printf supports the 'ls' directive],
|
||||||
[gl_cv_func_printf_directive_ls],
|
[gl_cv_func_printf_directive_ls],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||||
<wchar.h>.
|
<wchar.h>.
|
||||||
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
||||||
|
@ -687,7 +707,9 @@ int main ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_directive_ls=yes],
|
||||||
|
[gl_cv_func_printf_directive_ls=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -714,7 +736,8 @@ AC_DEFUN([gl_PRINTF_POSITIONS],
|
||||||
AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
|
AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
|
||||||
[gl_cv_func_printf_positions],
|
[gl_cv_func_printf_positions],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
/* The string "%2$d %1$d", with dollar characters protected from the shell's
|
/* The string "%2$d %1$d", with dollar characters protected from the shell's
|
||||||
|
@ -725,7 +748,9 @@ int main ()
|
||||||
{
|
{
|
||||||
sprintf (buf, format, 33, 55);
|
sprintf (buf, format, 33, 55);
|
||||||
return (strcmp (buf, "55 33") != 0);
|
return (strcmp (buf, "55 33") != 0);
|
||||||
}], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_positions=yes],
|
||||||
|
[gl_cv_func_printf_positions=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -751,7 +776,8 @@ AC_DEFUN([gl_PRINTF_FLAG_GROUPING],
|
||||||
AC_CACHE_CHECK([whether printf supports the grouping flag],
|
AC_CACHE_CHECK([whether printf supports the grouping flag],
|
||||||
[gl_cv_func_printf_flag_grouping],
|
[gl_cv_func_printf_flag_grouping],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -761,7 +787,9 @@ int main ()
|
||||||
|| buf[strlen (buf) - 1] != '9')
|
|| buf[strlen (buf) - 1] != '9')
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_flag_grouping=yes],
|
||||||
|
[gl_cv_func_printf_flag_grouping=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -787,7 +815,8 @@ AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST],
|
||||||
AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
|
AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
|
||||||
[gl_cv_func_printf_flag_leftadjust],
|
[gl_cv_func_printf_flag_leftadjust],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -798,7 +827,7 @@ int main ()
|
||||||
|| strcmp (buf, "ab c") != 0)
|
|| strcmp (buf, "ab c") != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_printf_flag_leftadjust=yes],
|
[gl_cv_func_printf_flag_leftadjust=yes],
|
||||||
[gl_cv_func_printf_flag_leftadjust=no],
|
[gl_cv_func_printf_flag_leftadjust=no],
|
||||||
[
|
[
|
||||||
|
@ -828,7 +857,8 @@ AC_DEFUN([gl_PRINTF_FLAG_ZERO],
|
||||||
AC_CACHE_CHECK([whether printf supports the zero flag correctly],
|
AC_CACHE_CHECK([whether printf supports the zero flag correctly],
|
||||||
[gl_cv_func_printf_flag_zero],
|
[gl_cv_func_printf_flag_zero],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -839,7 +869,9 @@ int main ()
|
||||||
&& strcmp (buf, " infinity") != 0))
|
&& strcmp (buf, " infinity") != 0))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_flag_zero=yes],
|
||||||
|
[gl_cv_func_printf_flag_zero=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -868,7 +900,8 @@ AC_DEFUN([gl_PRINTF_PRECISION],
|
||||||
AC_CACHE_CHECK([whether printf supports large precisions],
|
AC_CACHE_CHECK([whether printf supports large precisions],
|
||||||
[gl_cv_func_printf_precision],
|
[gl_cv_func_printf_precision],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[5000];
|
static char buf[5000];
|
||||||
|
@ -881,7 +914,9 @@ int main ()
|
||||||
if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
|
if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no],
|
}]])],
|
||||||
|
[gl_cv_func_printf_precision=yes],
|
||||||
|
[gl_cv_func_printf_precision=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -1031,7 +1066,8 @@ AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
|
||||||
AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
|
AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
|
||||||
[gl_cv_func_snprintf_truncation_c99],
|
[gl_cv_func_snprintf_truncation_c99],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -1042,7 +1078,9 @@ int main ()
|
||||||
if (memcmp (buf, "45\0DEF", 6) != 0)
|
if (memcmp (buf, "45\0DEF", 6) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no],
|
}]])],
|
||||||
|
[gl_cv_func_snprintf_truncation_c99=yes],
|
||||||
|
[gl_cv_func_snprintf_truncation_c99=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -1101,14 +1139,15 @@ dnl }
|
||||||
dnl ---------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------
|
||||||
dnl Result is gl_cv_func_snprintf_retval_c99.
|
dnl Result is gl_cv_func_snprintf_retval_c99.
|
||||||
|
|
||||||
AC_DEFUN([gl_SNPRINTF_RETVAL_C99],
|
AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99],
|
||||||
[
|
[
|
||||||
AC_REQUIRE([AC_PROG_CC])
|
AC_REQUIRE([AC_PROG_CC])
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||||
AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
|
AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
|
||||||
[gl_cv_func_snprintf_retval_c99],
|
[gl_cv_func_snprintf_retval_c99],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
|
@ -1118,7 +1157,9 @@ int main ()
|
||||||
if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
|
if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no],
|
}]])],
|
||||||
|
[gl_cv_func_snprintf_retval_c99=yes],
|
||||||
|
[gl_cv_func_snprintf_retval_c99=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -1165,7 +1206,8 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
|
||||||
AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
|
AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
|
||||||
[gl_cv_func_snprintf_directive_n],
|
[gl_cv_func_snprintf_directive_n],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
static char fmtstring[10];
|
static char fmtstring[10];
|
||||||
|
@ -1181,7 +1223,9 @@ int main ()
|
||||||
if (count != 6)
|
if (count != 6)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no],
|
}]])],
|
||||||
|
[gl_cv_func_snprintf_directive_n=yes],
|
||||||
|
[gl_cv_func_snprintf_directive_n=no],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -1229,14 +1273,15 @@ AC_DEFUN([gl_SNPRINTF_SIZE1],
|
||||||
AC_CACHE_CHECK([whether snprintf respects a size of 1],
|
AC_CACHE_CHECK([whether snprintf respects a size of 1],
|
||||||
[gl_cv_func_snprintf_size1],
|
[gl_cv_func_snprintf_size1],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
|
static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
|
||||||
snprintf (buf, 1, "%d", 12345);
|
snprintf (buf, 1, "%d", 12345);
|
||||||
return buf[1] != 'E';
|
return buf[1] != 'E';
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_snprintf_size1=yes],
|
[gl_cv_func_snprintf_size1=yes],
|
||||||
[gl_cv_func_snprintf_size1=no],
|
[gl_cv_func_snprintf_size1=no],
|
||||||
[gl_cv_func_snprintf_size1="guessing yes"])
|
[gl_cv_func_snprintf_size1="guessing yes"])
|
||||||
|
@ -1286,7 +1331,8 @@ AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99],
|
||||||
AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
|
AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
|
||||||
[gl_cv_func_vsnprintf_zerosize_c99],
|
[gl_cv_func_vsnprintf_zerosize_c99],
|
||||||
[
|
[
|
||||||
AC_TRY_RUN([
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
static int my_snprintf (char *buf, int size, const char *format, ...)
|
static int my_snprintf (char *buf, int size, const char *format, ...)
|
||||||
|
@ -1303,7 +1349,7 @@ int main()
|
||||||
static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
|
static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
|
||||||
my_snprintf (buf, 0, "%d", 12345);
|
my_snprintf (buf, 0, "%d", 12345);
|
||||||
return buf[0] != 'D';
|
return buf[0] != 'D';
|
||||||
}],
|
}]])],
|
||||||
[gl_cv_func_vsnprintf_zerosize_c99=yes],
|
[gl_cv_func_vsnprintf_zerosize_c99=yes],
|
||||||
[gl_cv_func_vsnprintf_zerosize_c99=no],
|
[gl_cv_func_vsnprintf_zerosize_c99=no],
|
||||||
[
|
[
|
||||||
|
@ -1401,7 +1447,7 @@ dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # .
|
||||||
dnl Solaris 10 . . # # # . . # . . . # . . . . . . . .
|
dnl Solaris 10 . . # # # . . # . . . # . . . . . . . .
|
||||||
dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . .
|
dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . .
|
||||||
dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
|
dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
|
||||||
dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . .
|
dnl AIX 5.2, 7.1 . . # # # . . . . . . # . . . . . . . .
|
||||||
dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . . . . .
|
dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . . . . .
|
||||||
dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . .
|
dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . .
|
||||||
dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . #
|
dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . #
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# servent.m4 serial 1
|
# servent.m4 serial 2
|
||||||
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2008, 2010 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.
|
||||||
|
@ -30,12 +30,16 @@ AC_DEFUN([gl_SERVENT],
|
||||||
[gl_cv_w32_getservbyname=no
|
[gl_cv_w32_getservbyname=no
|
||||||
gl_save_LIBS="$LIBS"
|
gl_save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS -lws2_32"
|
LIBS="$LIBS -lws2_32"
|
||||||
AC_TRY_LINK([
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
], [getservbyname(NULL,NULL);], [gl_cv_w32_getservbyname=yes])
|
]],
|
||||||
|
[[getservbyname(NULL,NULL);]])],
|
||||||
|
[gl_cv_w32_getservbyname=yes])
|
||||||
LIBS="$gl_save_LIBS"
|
LIBS="$gl_save_LIBS"
|
||||||
])
|
])
|
||||||
if test "$gl_cv_w32_getservbyname" = "yes"; then
|
if test "$gl_cv_w32_getservbyname" = "yes"; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# size_max.m4 serial 9
|
# size_max.m4 serial 10
|
||||||
dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2003, 2005-2006, 2008-2010 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,
|
||||||
|
@ -34,10 +34,14 @@ Found it
|
||||||
if test $fits_in_uint = 1; then
|
if test $fits_in_uint = 1; then
|
||||||
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
|
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
|
||||||
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
|
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
|
||||||
AC_TRY_COMPILE([#include <stddef.h>
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <stddef.h>
|
||||||
extern size_t foo;
|
extern size_t foo;
|
||||||
extern unsigned long foo;
|
extern unsigned long foo;
|
||||||
], [], [fits_in_uint=0])
|
]],
|
||||||
|
[[]])],
|
||||||
|
[fits_in_uint=0])
|
||||||
fi
|
fi
|
||||||
dnl We cannot use 'expr' to simplify this expression, because 'expr'
|
dnl We cannot use 'expr' to simplify this expression, because 'expr'
|
||||||
dnl works only with 'long' integers in the host environment, while we
|
dnl works only with 'long' integers in the host environment, while we
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# socklen.m4 serial 7
|
# socklen.m4 serial 8
|
||||||
dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 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,
|
||||||
|
@ -8,8 +8,9 @@ dnl From Albert Chin, Windows fixes from Simon Josefsson.
|
||||||
|
|
||||||
dnl Check for socklen_t: historically on BSD it is an int, and in
|
dnl Check for socklen_t: historically on BSD it is an int, and in
|
||||||
dnl POSIX 1g it is a type of its own, but some platforms use different
|
dnl POSIX 1g it is a type of its own, but some platforms use different
|
||||||
dnl types for the argument to getsockopt, getpeername, etc. So we
|
dnl types for the argument to getsockopt, getpeername, etc.:
|
||||||
dnl have to test to find something that will work.
|
dnl HP-UX 10.20, IRIX 6.5, Interix 3.5, BeOS.
|
||||||
|
dnl So we have to test to find something that will work.
|
||||||
|
|
||||||
dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
|
dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
|
||||||
dnl it there first. That file is included by gnulib's sys_socket.in.h, which
|
dnl it there first. That file is included by gnulib's sys_socket.in.h, which
|
||||||
|
|
|
@ -47,6 +47,9 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#endif]],
|
#endif]],
|
||||||
[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
|
[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
|
||||||
if (&x && &y && &z) return 0;]])],
|
if (&x && &y && &z) return 0;]])],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ssize_t.m4 serial 4 (gettext-0.15)
|
# ssize_t.m4 serial 5 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2001-2003, 2006, 2009-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2001-2003, 2006, 2010 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.
|
||||||
|
@ -10,9 +10,11 @@ dnl Test whether ssize_t is defined.
|
||||||
AC_DEFUN([gt_TYPE_SSIZE_T],
|
AC_DEFUN([gt_TYPE_SSIZE_T],
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
|
AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
|
||||||
[AC_TRY_COMPILE([#include <sys/types.h>],
|
[AC_COMPILE_IFELSE(
|
||||||
[int x = sizeof (ssize_t *) + sizeof (ssize_t);
|
[AC_LANG_PROGRAM(
|
||||||
return !x;],
|
[[#include <sys/types.h>]],
|
||||||
|
[[int x = sizeof (ssize_t *) + sizeof (ssize_t);
|
||||||
|
return !x;]])],
|
||||||
[gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
|
[gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
|
||||||
if test $gt_cv_ssize_t = no; then
|
if test $gt_cv_ssize_t = no; then
|
||||||
AC_DEFINE([ssize_t], [int],
|
AC_DEFINE([ssize_t], [int],
|
||||||
|
|
85
m4/stat-time.m4
Normal file
85
m4/stat-time.m4
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# Checks for stat-related time functions.
|
||||||
|
|
||||||
|
# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2010 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.
|
||||||
|
|
||||||
|
dnl From Paul Eggert.
|
||||||
|
|
||||||
|
# st_atim.tv_nsec - Linux, Solaris, Cygwin
|
||||||
|
# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
|
||||||
|
# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
|
||||||
|
# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
|
||||||
|
|
||||||
|
# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
|
||||||
|
# st_birthtim - Cygwin 1.7.0+
|
||||||
|
|
||||||
|
AC_DEFUN([gl_STAT_TIME],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_C_INLINE])
|
||||||
|
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||||
|
AC_CHECK_HEADERS_ONCE([sys/time.h])
|
||||||
|
|
||||||
|
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
|
||||||
|
[AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
|
||||||
|
[ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
|
||||||
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#if HAVE_SYS_TIME_H
|
||||||
|
# include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
#include <time.h>
|
||||||
|
struct timespec ts;
|
||||||
|
struct stat st;
|
||||||
|
]],
|
||||||
|
[[
|
||||||
|
st.st_atim = ts;
|
||||||
|
]])],
|
||||||
|
[ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
|
||||||
|
[ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
|
||||||
|
if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
|
||||||
|
AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
|
||||||
|
[Define to 1 if the type of the st_atim member of a struct stat is
|
||||||
|
struct timespec.])
|
||||||
|
fi],
|
||||||
|
[AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
|
||||||
|
[AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
|
||||||
|
[AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
|
||||||
|
# and NTFS (Cygwin).
|
||||||
|
# There was a time when this field was named st_createtime (21 June
|
||||||
|
# 2002 to 16 July 2002) But that window is very small and applied only
|
||||||
|
# to development code, so systems still using that configuration are
|
||||||
|
# not supported. See revisions 1.10 and 1.11 of FreeBSD's
|
||||||
|
# src/sys/ufs/ufs/dinode.h.
|
||||||
|
#
|
||||||
|
AC_DEFUN([gl_STAT_BIRTHTIME],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_C_INLINE])
|
||||||
|
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||||
|
AC_CHECK_HEADERS_ONCE([sys/time.h])
|
||||||
|
AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
|
||||||
|
[AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
|
||||||
|
[AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])],
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>])
|
||||||
|
])
|
|
@ -1,4 +1,4 @@
|
||||||
# serial 4
|
# serial 5
|
||||||
|
|
||||||
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
|
@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_STAT],
|
||||||
mingw*) gl_cv_func_stat_dir_slash="guessing no";;
|
mingw*) gl_cv_func_stat_dir_slash="guessing no";;
|
||||||
*) gl_cv_func_stat_dir_slash="guessing yes";;
|
*) gl_cv_func_stat_dir_slash="guessing yes";;
|
||||||
esac])])
|
esac])])
|
||||||
dnl Solaris 9 mistakenly succeeds on stat("file/")
|
dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
|
||||||
dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
|
dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
|
||||||
AC_CACHE_CHECK([whether stat handles trailing slashes on files],
|
AC_CACHE_CHECK([whether stat handles trailing slashes on files],
|
||||||
[gl_cv_func_stat_file_slash],
|
[gl_cv_func_stat_file_slash],
|
||||||
|
|
22
m4/stdarg.m4
22
m4/stdarg.m4
|
@ -1,4 +1,4 @@
|
||||||
# stdarg.m4 serial 3
|
# stdarg.m4 serial 4
|
||||||
dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2006, 2008-2010 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,
|
||||||
|
@ -13,12 +13,16 @@ AC_DEFUN([gl_STDARG_H],
|
||||||
NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
|
NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
|
||||||
AC_MSG_CHECKING([for va_copy])
|
AC_MSG_CHECKING([for va_copy])
|
||||||
AC_CACHE_VAL([gl_cv_func_va_copy], [
|
AC_CACHE_VAL([gl_cv_func_va_copy], [
|
||||||
AC_TRY_COMPILE([#include <stdarg.h>], [
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <stdarg.h>]],
|
||||||
|
[[
|
||||||
#ifndef va_copy
|
#ifndef va_copy
|
||||||
void (*func) (va_list, va_list) = va_copy;
|
void (*func) (va_list, va_list) = va_copy;
|
||||||
#endif
|
#endif
|
||||||
],
|
]])],
|
||||||
[gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
|
[gl_cv_func_va_copy=yes],
|
||||||
|
[gl_cv_func_va_copy=no])])
|
||||||
AC_MSG_RESULT([$gl_cv_func_va_copy])
|
AC_MSG_RESULT([$gl_cv_func_va_copy])
|
||||||
if test $gl_cv_func_va_copy = no; then
|
if test $gl_cv_func_va_copy = no; then
|
||||||
dnl Provide a substitute.
|
dnl Provide a substitute.
|
||||||
|
@ -47,12 +51,16 @@ void (*func) (va_list, va_list) = va_copy;
|
||||||
dnl Provide a substitute in <config.h>, either __va_copy or as a simple
|
dnl Provide a substitute in <config.h>, either __va_copy or as a simple
|
||||||
dnl assignment.
|
dnl assignment.
|
||||||
gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
|
gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
|
||||||
AC_TRY_COMPILE([#include <stdarg.h>], [
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <stdarg.h>]],
|
||||||
|
[[
|
||||||
#ifndef __va_copy
|
#ifndef __va_copy
|
||||||
error, bail out
|
error, bail out
|
||||||
#endif
|
#endif
|
||||||
],
|
]])],
|
||||||
[gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
|
[gl_cv_func___va_copy=yes],
|
||||||
|
[gl_cv_func___va_copy=no])])
|
||||||
if test $gl_cv_func___va_copy = yes; then
|
if test $gl_cv_func___va_copy = yes; then
|
||||||
AC_DEFINE([va_copy], [__va_copy],
|
AC_DEFINE([va_copy], [__va_copy],
|
||||||
[Define as a macro for copying va_list variables.])
|
[Define as a macro for copying va_list variables.])
|
||||||
|
|
|
@ -5,6 +5,8 @@ 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.
|
||||||
|
|
||||||
|
#serial 3
|
||||||
|
|
||||||
# Prepare for substituting <stdbool.h> if it is not supported.
|
# Prepare for substituting <stdbool.h> if it is not supported.
|
||||||
|
|
||||||
AC_DEFUN([AM_STDBOOL_H],
|
AC_DEFUN([AM_STDBOOL_H],
|
||||||
|
@ -31,14 +33,16 @@ AC_DEFUN([AM_STDBOOL_H],
|
||||||
# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
|
# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
|
||||||
AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
|
AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
|
||||||
|
|
||||||
# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
|
# This version of the macro is needed in autoconf <= 2.67. Autoconf has
|
||||||
# have this macro built-in.
|
# it built in since 2.60, but we want the tweaks from the 2.68 version
|
||||||
|
# to avoid rejecting xlc and clang due to relying on extensions.
|
||||||
|
|
||||||
AC_DEFUN([AC_HEADER_STDBOOL],
|
AC_DEFUN([AC_HEADER_STDBOOL],
|
||||||
[AC_CACHE_CHECK([for stdbool.h that conforms to C99],
|
[AC_CACHE_CHECK([for stdbool.h that conforms to C99],
|
||||||
[ac_cv_header_stdbool_h],
|
[ac_cv_header_stdbool_h],
|
||||||
[AC_TRY_COMPILE(
|
[AC_COMPILE_IFELSE(
|
||||||
[
|
[AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#ifndef bool
|
#ifndef bool
|
||||||
"error: bool is not defined"
|
"error: bool is not defined"
|
||||||
|
@ -65,48 +69,32 @@ AC_DEFUN([AC_HEADER_STDBOOL],
|
||||||
char b[false == 0 ? 1 : -1];
|
char b[false == 0 ? 1 : -1];
|
||||||
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
|
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
|
||||||
char d[(bool) 0.5 == true ? 1 : -1];
|
char d[(bool) 0.5 == true ? 1 : -1];
|
||||||
bool e = &s;
|
/* See body of main program for 'e'. */
|
||||||
char f[(_Bool) 0.0 == false ? 1 : -1];
|
char f[(_Bool) 0.0 == false ? 1 : -1];
|
||||||
char g[true];
|
char g[true];
|
||||||
char h[sizeof (_Bool)];
|
char h[sizeof (_Bool)];
|
||||||
char i[sizeof s.t];
|
char i[sizeof s.t];
|
||||||
enum { j = false, k = true, l = false * true, m = true * 256 };
|
enum { j = false, k = true, l = false * true, m = true * 256 };
|
||||||
|
/* The following fails for
|
||||||
|
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
|
||||||
_Bool n[m];
|
_Bool n[m];
|
||||||
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
|
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
|
||||||
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
|
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
|
||||||
#if defined __xlc__ || defined __GNUC__
|
|
||||||
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
|
|
||||||
reported by James Lemley on 2005-10-05; see
|
|
||||||
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
|
|
||||||
This test is not quite right, since xlc is allowed to
|
|
||||||
reject this program, as the initializer for xlcbug is
|
|
||||||
not one of the forms that C requires support for.
|
|
||||||
However, doing the test right would require a run-time
|
|
||||||
test, and that would make cross-compilation harder.
|
|
||||||
Let us hope that IBM fixes the xlc bug, and also adds
|
|
||||||
support for this kind of constant expression. In the
|
|
||||||
meantime, this test will reject xlc, which is OK, since
|
|
||||||
our stdbool.h substitute should suffice. We also test
|
|
||||||
this with GCC, where it should work, to detect more
|
|
||||||
quickly whether someone messes up the test in the
|
|
||||||
future. */
|
|
||||||
char digs[] = "0123456789";
|
|
||||||
int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
|
|
||||||
#endif
|
|
||||||
/* Catch a bug in an HP-UX C compiler. See
|
/* Catch a bug in an HP-UX C compiler. See
|
||||||
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
|
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
|
||||||
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
|
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
|
||||||
*/
|
*/
|
||||||
_Bool q = true;
|
_Bool q = true;
|
||||||
_Bool *pq = &q;
|
_Bool *pq = &q;
|
||||||
],
|
]],
|
||||||
[
|
[[
|
||||||
|
bool e = &s;
|
||||||
*pq |= q;
|
*pq |= q;
|
||||||
*pq |= ! q;
|
*pq |= ! q;
|
||||||
/* Refer to every declared value, to avoid compiler optimizations. */
|
/* Refer to every declared value, to avoid compiler optimizations. */
|
||||||
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
|
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
|
||||||
+ !m + !n + !o + !p + !q + !pq);
|
+ !m + !n + !o + !p + !q + !pq);
|
||||||
],
|
]])],
|
||||||
[ac_cv_header_stdbool_h=yes],
|
[ac_cv_header_stdbool_h=yes],
|
||||||
[ac_cv_header_stdbool_h=no])])
|
[ac_cv_header_stdbool_h=no])])
|
||||||
AC_CHECK_TYPES([_Bool])
|
AC_CHECK_TYPES([_Bool])
|
||||||
|
|
14
m4/stdint.m4
14
m4/stdint.m4
|
@ -1,4 +1,4 @@
|
||||||
# stdint.m4 serial 34
|
# stdint.m4 serial 35
|
||||||
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2001-2010 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,
|
||||||
|
@ -309,7 +309,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
|
||||||
dnl config.h.in,
|
dnl config.h.in,
|
||||||
dnl - extra AC_SUBST calls, so that the right substitutions are made.
|
dnl - extra AC_SUBST calls, so that the right substitutions are made.
|
||||||
m4_foreach_w([gltype], [$1],
|
m4_foreach_w([gltype], [$1],
|
||||||
[AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
|
[AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
|
||||||
[Define to the number of bits in type ']gltype['.])])
|
[Define to the number of bits in type ']gltype['.])])
|
||||||
for gltype in $1 ; do
|
for gltype in $1 ; do
|
||||||
AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
|
AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
|
||||||
|
@ -334,7 +334,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
|
||||||
eval BITSIZEOF_${GLTYPE}=\$result
|
eval BITSIZEOF_${GLTYPE}=\$result
|
||||||
done
|
done
|
||||||
m4_foreach_w([gltype], [$1],
|
m4_foreach_w([gltype], [$1],
|
||||||
[AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
|
[AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
|
dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
|
||||||
|
@ -347,7 +347,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
|
||||||
dnl config.h.in,
|
dnl config.h.in,
|
||||||
dnl - extra AC_SUBST calls, so that the right substitutions are made.
|
dnl - extra AC_SUBST calls, so that the right substitutions are made.
|
||||||
m4_foreach_w([gltype], [$1],
|
m4_foreach_w([gltype], [$1],
|
||||||
[AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
|
[AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
|
||||||
[Define to 1 if ']gltype[' is a signed integer type.])])
|
[Define to 1 if ']gltype[' is a signed integer type.])])
|
||||||
for gltype in $1 ; do
|
for gltype in $1 ; do
|
||||||
AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
|
AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
|
||||||
|
@ -367,7 +367,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
m4_foreach_w([gltype], [$1],
|
m4_foreach_w([gltype], [$1],
|
||||||
[AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
|
[AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
|
dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
|
||||||
|
@ -380,7 +380,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
|
||||||
dnl config.h.in,
|
dnl config.h.in,
|
||||||
dnl - extra AC_SUBST calls, so that the right substitutions are made.
|
dnl - extra AC_SUBST calls, so that the right substitutions are made.
|
||||||
m4_foreach_w([gltype], [$1],
|
m4_foreach_w([gltype], [$1],
|
||||||
[AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
|
[AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
|
||||||
[Define to l, ll, u, ul, ull, etc., as suitable for
|
[Define to l, ll, u, ul, ull, etc., as suitable for
|
||||||
constants of type ']gltype['.])])
|
constants of type ']gltype['.])])
|
||||||
for gltype in $1 ; do
|
for gltype in $1 ; do
|
||||||
|
@ -419,7 +419,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
|
||||||
AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
|
AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
|
||||||
done
|
done
|
||||||
m4_foreach_w([gltype], [$1],
|
m4_foreach_w([gltype], [$1],
|
||||||
[AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
|
[AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl gl_STDINT_INCLUDES
|
dnl gl_STDINT_INCLUDES
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# stdint_h.m4 serial 8
|
# stdint_h.m4 serial 9
|
||||||
dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 1997-2004, 2006, 2008-2010 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,
|
||||||
|
@ -12,10 +12,11 @@ dnl From Paul Eggert.
|
||||||
AC_DEFUN([gl_AC_HEADER_STDINT_H],
|
AC_DEFUN([gl_AC_HEADER_STDINT_H],
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
|
AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
|
||||||
[AC_TRY_COMPILE(
|
[AC_COMPILE_IFELSE(
|
||||||
[#include <sys/types.h>
|
[AC_LANG_PROGRAM(
|
||||||
#include <stdint.h>],
|
[[#include <sys/types.h>
|
||||||
[uintmax_t i = (uintmax_t) -1; return !i;],
|
#include <stdint.h>]],
|
||||||
|
[[uintmax_t i = (uintmax_t) -1; return !i;]])],
|
||||||
[gl_cv_header_stdint_h=yes],
|
[gl_cv_header_stdint_h=yes],
|
||||||
[gl_cv_header_stdint_h=no])])
|
[gl_cv_header_stdint_h=no])])
|
||||||
if test $gl_cv_header_stdint_h = yes; then
|
if test $gl_cv_header_stdint_h = yes; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# stdlib_h.m4 serial 28
|
# stdlib_h.m4 serial 30
|
||||||
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2007-2010 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,
|
||||||
|
@ -33,7 +33,7 @@ AC_DEFUN([gl_STDLIB_H],
|
||||||
#if HAVE_RANDOM_H
|
#if HAVE_RANDOM_H
|
||||||
# include <random.h>
|
# include <random.h>
|
||||||
#endif
|
#endif
|
||||||
]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
|
]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
|
||||||
mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
|
mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
|
||||||
setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
|
setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
|
||||||
unsetenv])
|
unsetenv])
|
||||||
|
@ -50,6 +50,7 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
|
||||||
|
|
||||||
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
||||||
[
|
[
|
||||||
|
GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT])
|
||||||
GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
|
GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
|
||||||
GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
|
GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
|
||||||
GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
|
GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
|
||||||
|
@ -75,13 +76,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
||||||
GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
|
GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
|
||||||
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
|
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
|
||||||
dnl Assume proper GNU behavior unless another module says otherwise.
|
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||||
|
HAVE__EXIT=1; AC_SUBST([HAVE__EXIT])
|
||||||
HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
|
HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
|
||||||
HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
|
|
||||||
HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
|
HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
|
||||||
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
|
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
|
||||||
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
|
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
|
||||||
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
|
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
|
||||||
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
|
|
||||||
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
|
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
|
||||||
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
|
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
|
||||||
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
|
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
|
||||||
|
@ -89,7 +89,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
||||||
HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
|
HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
|
||||||
HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
|
HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
|
||||||
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
|
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
|
||||||
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
|
|
||||||
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
|
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
|
||||||
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
|
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
|
||||||
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
|
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
|
||||||
|
@ -100,9 +99,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
||||||
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
|
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
|
||||||
HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
|
HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
|
||||||
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
|
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
|
||||||
|
REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC])
|
||||||
REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
|
REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
|
||||||
|
REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
|
||||||
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
|
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
|
||||||
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
|
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
|
||||||
|
REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
|
||||||
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
|
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
|
||||||
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
|
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
|
||||||
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
|
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# visibility.m4 serial 3 (gettext-0.18)
|
# visibility.m4 serial 4 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2005, 2008, 2010 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.
|
||||||
|
@ -33,7 +33,8 @@ AC_DEFUN([gl_VISIBILITY],
|
||||||
AC_CACHE_VAL([gl_cv_cc_vis_werror], [
|
AC_CACHE_VAL([gl_cv_cc_vis_werror], [
|
||||||
gl_save_CFLAGS="$CFLAGS"
|
gl_save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -Werror"
|
CFLAGS="$CFLAGS -Werror"
|
||||||
AC_TRY_COMPILE([], [],
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[]], [[]])],
|
||||||
[gl_cv_cc_vis_werror=yes],
|
[gl_cv_cc_vis_werror=yes],
|
||||||
[gl_cv_cc_vis_werror=no])
|
[gl_cv_cc_vis_werror=no])
|
||||||
CFLAGS="$gl_save_CFLAGS"])
|
CFLAGS="$gl_save_CFLAGS"])
|
||||||
|
@ -51,13 +52,15 @@ AC_DEFUN([gl_VISIBILITY],
|
||||||
if test $gl_cv_cc_vis_werror = yes; then
|
if test $gl_cv_cc_vis_werror = yes; then
|
||||||
CFLAGS="$CFLAGS -Werror"
|
CFLAGS="$CFLAGS -Werror"
|
||||||
fi
|
fi
|
||||||
AC_TRY_COMPILE(
|
AC_COMPILE_IFELSE(
|
||||||
[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
|
[AC_LANG_PROGRAM(
|
||||||
|
[[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
|
||||||
extern __attribute__((__visibility__("default"))) int exportedvar;
|
extern __attribute__((__visibility__("default"))) int exportedvar;
|
||||||
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
||||||
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
|
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
|
||||||
void dummyfunc (void) {}],
|
void dummyfunc (void) {}
|
||||||
[],
|
]],
|
||||||
|
[[]])],
|
||||||
[gl_cv_cc_visibility=yes],
|
[gl_cv_cc_visibility=yes],
|
||||||
[gl_cv_cc_visibility=no])
|
[gl_cv_cc_visibility=no])
|
||||||
CFLAGS="$gl_save_CFLAGS"])
|
CFLAGS="$gl_save_CFLAGS"])
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# wchar_t.m4 serial 3 (gettext-0.18)
|
# wchar_t.m4 serial 4 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2002-2003, 2008-2010 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,
|
||||||
|
@ -11,9 +11,13 @@ dnl Prerequisite: AC_PROG_CC
|
||||||
AC_DEFUN([gt_TYPE_WCHAR_T],
|
AC_DEFUN([gt_TYPE_WCHAR_T],
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
|
AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
|
||||||
[AC_TRY_COMPILE([#include <stddef.h>
|
[AC_COMPILE_IFELSE(
|
||||||
wchar_t foo = (wchar_t)'\0';], ,
|
[AC_LANG_PROGRAM(
|
||||||
[gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
|
[[#include <stddef.h>
|
||||||
|
wchar_t foo = (wchar_t)'\0';]],
|
||||||
|
[[]])],
|
||||||
|
[gt_cv_c_wchar_t=yes],
|
||||||
|
[gt_cv_c_wchar_t=no])])
|
||||||
if test $gt_cv_c_wchar_t = yes; then
|
if test $gt_cv_c_wchar_t = yes; then
|
||||||
AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
|
AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
|
||||||
fi
|
fi
|
||||||
|
|
12
m4/wint_t.m4
12
m4/wint_t.m4
|
@ -1,4 +1,4 @@
|
||||||
# wint_t.m4 serial 4 (gettext-0.18)
|
# wint_t.m4 serial 5 (gettext-0.18.2)
|
||||||
dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2003, 2007-2010 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,
|
||||||
|
@ -11,7 +11,9 @@ dnl Prerequisite: AC_PROG_CC
|
||||||
AC_DEFUN([gt_TYPE_WINT_T],
|
AC_DEFUN([gt_TYPE_WINT_T],
|
||||||
[
|
[
|
||||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||||
[AC_TRY_COMPILE([
|
[AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[
|
||||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||||
<wchar.h>.
|
<wchar.h>.
|
||||||
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
|
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
|
||||||
|
@ -20,8 +22,10 @@ AC_DEFUN([gt_TYPE_WINT_T],
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
wint_t foo = (wchar_t)'\0';], ,
|
wint_t foo = (wchar_t)'\0';]],
|
||||||
[gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
|
[[]])],
|
||||||
|
[gt_cv_c_wint_t=yes],
|
||||||
|
[gt_cv_c_wint_t=no])])
|
||||||
if test $gt_cv_c_wint_t = yes; then
|
if test $gt_cv_c_wint_t = yes; then
|
||||||
AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
|
AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
|
||||||
fi
|
fi
|
||||||
|
|
10
maint.mk
10
maint.mk
|
@ -103,6 +103,12 @@ endif
|
||||||
# Override this in cfg.mk if you are using a different format in your
|
# Override this in cfg.mk if you are using a different format in your
|
||||||
# NEWS file.
|
# NEWS file.
|
||||||
today = $(shell date +%Y-%m-%d)
|
today = $(shell date +%Y-%m-%d)
|
||||||
|
|
||||||
|
# Select which lines of NEWS are searched for $(news-check-regexp).
|
||||||
|
# This is a sed line number spec. The default says that we search
|
||||||
|
# lines 1..10 of NEWS for $(news-check-regexp).
|
||||||
|
# If you want to search only line 3 or only lines 20-22, use "3" or "20,22".
|
||||||
|
news-check-lines-spec ?= 1,10
|
||||||
news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
|
news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
|
||||||
|
|
||||||
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
||||||
|
@ -874,8 +880,8 @@ sc_makefile_at_at_check:
|
||||||
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
|
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
|
||||||
|
|
||||||
news-check: NEWS
|
news-check: NEWS
|
||||||
if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \
|
if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \
|
||||||
>/dev/null; then \
|
| grep -E $(news-check-regexp) >/dev/null; then \
|
||||||
:; \
|
:; \
|
||||||
else \
|
else \
|
||||||
echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
|
echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue