summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-04-03 14:43:15 +0000
committerSimon Josefsson <simon@josefsson.org>2007-04-03 14:43:15 +0000
commit2cb337b1d76b4b9289010de4532906a14a7b0165 (patch)
treec11a03abd2272d8cd26a5b6fc622c672544f284d
parenta251485308ae0a59f405c51298aff83d1139cd65 (diff)
downloadgnutls-2cb337b1d76b4b9289010de4532906a14a7b0165.tar.gz
Update.
-rwxr-xr-xbuild-aux/gendocs.sh30
-rw-r--r--gl/stdbool_.h6
-rw-r--r--lgl/Makefile.am64
-rw-r--r--lgl/alloca_.h8
-rw-r--r--lgl/asprintf.c8
-rw-r--r--lgl/m4/gnulib-cache.m44
-rw-r--r--lgl/m4/gnulib-comp.m42
-rw-r--r--lgl/m4/iconv.m486
-rw-r--r--lgl/m4/intdiv0.m436
-rw-r--r--lgl/stat_.h8
-rw-r--r--lgl/stdbool_.h6
-rw-r--r--lgl/vasprintf.c8
12 files changed, 190 insertions, 76 deletions
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 27c0155e41..cf96b26a58 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,7 +2,7 @@
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2006-07-15.08
+scriptversion=2007-04-02.15
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
@@ -30,19 +30,20 @@ srcdir=`pwd`
scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
: ${DVIPS="dvips"}
-: ${DOCBOOK2TXT="docbook2txt"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
: ${DOCBOOK2PS="docbook2ps"}
+: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
unset CDPATH
version="gendocs.sh $scriptversion
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
@@ -83,9 +84,20 @@ times with different YOURMANUAL values, specifying a different output
directory with -o each time. Then write (by hand) an overall index.html
with links to them all.
+If a manual's texinfo sources are spread across several directories,
+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.)
+
You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
-control where the gendocs_template file is looked for.
+control where the gendocs_template file is looked for. (With --docbook,
+the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and
+DOCBOOK2TXT are also respected.)
+
+By default, makeinfo is run in the default (English) locale, since
+that's the language of most Texinfo manuals. If you happen to have a
+non-English manual and non-English web site, check the SETLANG setting
+in the source.
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
"
@@ -144,7 +156,7 @@ fi
echo Generating output formats for $srcfile
-cmd="${MAKEINFO} -o $PACKAGE.info \"$srcfile\""
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
echo "Generating info files... ($cmd)"
eval "$cmd"
mkdir -p $outdir/
@@ -175,7 +187,7 @@ eval "$cmd"
pdf_size=`calcsize $PACKAGE.pdf`
mv $PACKAGE.pdf $outdir/
-cmd="${MAKEINFO} -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
echo "Generating ASCII... ($cmd)"
eval "$cmd"
ascii_size=`calcsize $PACKAGE.txt`
@@ -183,7 +195,7 @@ gzip -f -9 -c $PACKAGE.txt >$outdir/$PACKAGE.txt.gz
ascii_gz_size=`calcsize $outdir/$PACKAGE.txt.gz`
mv $PACKAGE.txt $outdir/
-cmd="${MAKEINFO} --no-split --html -o $PACKAGE.html $html \"$srcfile\""
+cmd="$SETLANG $MAKEINFO --no-split --html -o $PACKAGE.html $html \"$srcfile\""
echo "Generating monolithic html... ($cmd)"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
@@ -192,7 +204,7 @@ gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
mv $PACKAGE.html $outdir/
-cmd="${MAKEINFO} --html -o $PACKAGE.html $html \"$srcfile\""
+cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $html \"$srcfile\""
echo "Generating html by node... ($cmd)"
eval "$cmd"
split_html_dir=$PACKAGE.html
@@ -212,7 +224,7 @@ tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
if test -n "$docbook"; then
- cmd="${MAKEINFO} -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
+ cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
echo "Generating docbook XML... $(cmd)"
eval "$cmd"
docbook_xml_size=`calcsize $PACKAGE-db.xml`
diff --git a/gl/stdbool_.h b/gl/stdbool_.h
index 8525f0fe87..150a0102e1 100644
--- a/gl/stdbool_.h
+++ b/gl/stdbool_.h
@@ -15,8 +15,8 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
/* ISO C 99 <stdbool.h> for platforms that lack it. */
@@ -115,4 +115,4 @@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
#define true 1
#define __bool_true_false_are_defined 1
-#endif /* _STDBOOL_H */
+#endif /* _GL_STDBOOL_H */
diff --git a/lgl/Makefile.am b/lgl/Makefile.am
index 14d85482af..8a386e2e6f 100644
--- a/lgl/Makefile.am
+++ b/lgl/Makefile.am
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl gc gc-arcfour gc-arctwo gc-des gc-hmac-md5 gc-md2 gc-md4 gc-md5 gc-pbkdf2-sha1 gc-random gc-rijndael gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
AUTOMAKE_OPTIONS = 1.5 gnits
@@ -52,7 +52,7 @@ EXTRA_DIST += alloca_.h
## end gnulib module alloca-opt
-## begin gnulib module gc
+## begin gnulib module crypto/gc
if GL_COND_LIBTOOL
liblgnu_la_LDFLAGS += $(LTLIBGCRYPT)
@@ -62,63 +62,63 @@ EXTRA_DIST += gc-gnulib.c gc-libgcrypt.c gc.h
EXTRA_liblgnu_la_SOURCES += gc-gnulib.c gc-libgcrypt.c
-## end gnulib module gc
+## end gnulib module crypto/gc
-## begin gnulib module gc-arcfour
+## begin gnulib module crypto/gc-arcfour
EXTRA_DIST += arcfour.c arcfour.h
EXTRA_liblgnu_la_SOURCES += arcfour.c
-## end gnulib module gc-arcfour
+## end gnulib module crypto/gc-arcfour
-## begin gnulib module gc-arctwo
+## begin gnulib module crypto/gc-arctwo
EXTRA_DIST += arctwo.c arctwo.h
EXTRA_liblgnu_la_SOURCES += arctwo.c
-## end gnulib module gc-arctwo
+## end gnulib module crypto/gc-arctwo
-## begin gnulib module gc-des
+## begin gnulib module crypto/gc-des
EXTRA_DIST += des.c des.h
EXTRA_liblgnu_la_SOURCES += des.c
-## end gnulib module gc-des
+## end gnulib module crypto/gc-des
-## begin gnulib module gc-hmac-md5
+## begin gnulib module crypto/gc-hmac-md5
EXTRA_DIST += hmac-md5.c hmac.h md5.c md5.h memxor.c memxor.h
EXTRA_liblgnu_la_SOURCES += hmac-md5.c md5.c memxor.c
-## end gnulib module gc-hmac-md5
+## end gnulib module crypto/gc-hmac-md5
-## begin gnulib module gc-hmac-sha1
+## begin gnulib module crypto/gc-hmac-sha1
EXTRA_DIST += hmac-sha1.c hmac.h memxor.c memxor.h sha1.c sha1.h
EXTRA_liblgnu_la_SOURCES += hmac-sha1.c memxor.c sha1.c
-## end gnulib module gc-hmac-sha1
+## end gnulib module crypto/gc-hmac-sha1
-## begin gnulib module gc-md4
+## begin gnulib module crypto/gc-md4
EXTRA_DIST += md4.c md4.h
EXTRA_liblgnu_la_SOURCES += md4.c
-## end gnulib module gc-md4
+## end gnulib module crypto/gc-md4
-## begin gnulib module gc-md5
+## begin gnulib module crypto/gc-md5
liblgnu_la_SOURCES += md5.h
@@ -126,34 +126,43 @@ EXTRA_DIST += md5.c
EXTRA_liblgnu_la_SOURCES += md5.c
-## end gnulib module gc-md5
+## end gnulib module crypto/gc-md5
-## begin gnulib module gc-pbkdf2-sha1
+## begin gnulib module crypto/gc-pbkdf2-sha1
EXTRA_DIST += gc-pbkdf2-sha1.c
EXTRA_liblgnu_la_SOURCES += gc-pbkdf2-sha1.c
-## end gnulib module gc-pbkdf2-sha1
+## end gnulib module crypto/gc-pbkdf2-sha1
-## begin gnulib module gc-rijndael
+## begin gnulib module crypto/gc-rijndael
EXTRA_DIST += rijndael-alg-fst.c rijndael-alg-fst.h rijndael-api-fst.c rijndael-api-fst.h
EXTRA_liblgnu_la_SOURCES += rijndael-alg-fst.c rijndael-api-fst.c
-## end gnulib module gc-rijndael
+## end gnulib module crypto/gc-rijndael
-## begin gnulib module gc-sha1
+## begin gnulib module crypto/gc-sha1
EXTRA_DIST += sha1.c sha1.h
EXTRA_liblgnu_la_SOURCES += sha1.c
-## end gnulib module gc-sha1
+## end gnulib module crypto/gc-sha1
+
+## begin gnulib module crypto/md2
+
+
+EXTRA_DIST += md2.c md2.h
+
+EXTRA_liblgnu_la_SOURCES += md2.c
+
+## end gnulib module crypto/md2
## begin gnulib module gettext
@@ -181,15 +190,6 @@ LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
## end gnulib module link-warning
-## begin gnulib module md2
-
-
-EXTRA_DIST += md2.c md2.h
-
-EXTRA_liblgnu_la_SOURCES += md2.c
-
-## end gnulib module md2
-
## begin gnulib module memmem
diff --git a/lgl/alloca_.h b/lgl/alloca_.h
index e712211311..1c1d9e68ed 100644
--- a/lgl/alloca_.h
+++ b/lgl/alloca_.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2007 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -20,8 +20,8 @@
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
-#ifndef _GNULIB_ALLOCA_H
-# define _GNULIB_ALLOCA_H
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns.
@@ -51,4 +51,4 @@ void *alloca (size_t);
# endif
#endif
-#endif /* _GNULIB_ALLOCA_H */
+#endif /* _GL_ALLOCA_H */
diff --git a/lgl/asprintf.c b/lgl/asprintf.c
index 5d338fca14..2df1d4b0ec 100644
--- a/lgl/asprintf.c
+++ b/lgl/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -18,7 +18,11 @@
#include <config.h>
/* Specification. */
-#include <stdio.h>
+#ifdef IN_LIBASPRINTF
+# include "vasprintf.h"
+#else
+# include <stdio.h>
+#endif
#include <stdarg.h>
diff --git a/lgl/m4/gnulib-cache.m4 b/lgl/m4/gnulib-cache.m4
index 37c66d44d8..d6f13537ba 100644
--- a/lgl/m4/gnulib-cache.m4
+++ b/lgl/m4/gnulib-cache.m4
@@ -15,11 +15,11 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl gc gc-arcfour gc-arctwo gc-des gc-hmac-md5 gc-md2 gc-md4 gc-md5 gc-pbkdf2-sha1 gc-random gc-rijndael gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
-gl_MODULES([gc gc-arcfour gc-arctwo gc-des gc-hmac-md5 gc-md2 gc-md4 gc-md5 gc-pbkdf2-sha1 gc-random gc-rijndael gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
+gl_MODULES([crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
gl_AVOID([])
gl_SOURCE_BASE([lgl])
gl_M4_BASE([lgl/m4])
diff --git a/lgl/m4/gnulib-comp.m4 b/lgl/m4/gnulib-comp.m4
index aa4d828947..282749e409 100644
--- a/lgl/m4/gnulib-comp.m4
+++ b/lgl/m4/gnulib-comp.m4
@@ -68,9 +68,9 @@ AC_DEFUN([lgl_INIT],
gl_MODULE_INDICATOR([gc-rijndael])
gl_GC_SHA1
gl_MODULE_INDICATOR([gc-sha1])
+ gl_MD2
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
AM_GNU_GETTEXT_VERSION([0.16.1])
- gl_MD2
gl_FUNC_MEMMEM
gl_STRING_MODULE_INDICATOR([memmem])
gl_FUNC_MEMMOVE
diff --git a/lgl/m4/iconv.m4 b/lgl/m4/iconv.m4
index 654c415894..32239e31df 100644
--- a/lgl/m4/iconv.m4
+++ b/lgl/m4/iconv.m4
@@ -1,5 +1,5 @@
-# iconv.m4 serial AM4 (gettext-0.11.3)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+# iconv.m4 serial AM5 (gettext-0.16.2)
+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -21,6 +21,7 @@ AC_DEFUN([AM_ICONV_LINK],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
@@ -33,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK],
am_save_CPPFLAGS="$CPPFLAGS"
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_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
@@ -56,7 +57,84 @@ AC_DEFUN([AM_ICONV_LINK],
fi
])
if test "$am_cv_func_iconv" = yes; then
- AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1,
+ [Define if you have the iconv() function and it works.])
fi
if test "$am_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv])
diff --git a/lgl/m4/intdiv0.m4 b/lgl/m4/intdiv0.m4
index b8865bac20..534134ac33 100644
--- a/lgl/m4/intdiv0.m4
+++ b/lgl/m4/intdiv0.m4
@@ -14,7 +14,22 @@ AC_DEFUN([gt_INTDIV0],
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
gt_cv_int_divbyzero_sigfpe,
[
- AC_TRY_RUN([
+ gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+ case "$host_os" in
+ macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+ # On MacOS X 10.2 or newer, just assume the same as when cross-
+ # compiling. If we were to perform the real test, 1 Crash Report
+ # dialog window would pop up.
+ case "$host_cpu" in
+ i[34567]86 | x86_64)
+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+ AC_TRY_RUN([
#include <stdlib.h>
#include <signal.h>
@@ -47,17 +62,18 @@ int main ()
exit (1);
}
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
- [
- # Guess based on the CPU.
+ [
+ # Guess based on the CPU.
changequote(,)dnl
- case "$host_cpu" in
- alpha* | i[34567]86 | m68k | s390*)
- gt_cv_int_divbyzero_sigfpe="guessing yes";;
- *)
- gt_cv_int_divbyzero_sigfpe="guessing no";;
- esac
+ case "$host_cpu" in
+ alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
changequote([,])dnl
- ])
+ ])
+ fi
])
case "$gt_cv_int_divbyzero_sigfpe" in
*yes) value=1;;
diff --git a/lgl/stat_.h b/lgl/stat_.h
index bc1db08d9a..01955f5982 100644
--- a/lgl/stat_.h
+++ b/lgl/stat_.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat header file.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -17,8 +17,8 @@
/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
-#ifndef _gl_SYS_STAT_H
-#define _gl_SYS_STAT_H
+#ifndef _GL_SYS_STAT_H
+#define _GL_SYS_STAT_H
/* This file is supposed to be used on platforms where <sys/stat.h> is
incomplete. It is intended to provide definitions and prototypes
@@ -272,4 +272,4 @@ rpl_mkdir (char const *name, mode_t mode)
# define mkdir rpl_mkdir
#endif
-#endif /* _gl_SYS_STAT_H */
+#endif /* _GL_SYS_STAT_H */
diff --git a/lgl/stdbool_.h b/lgl/stdbool_.h
index 1381b95739..4762a5c301 100644
--- a/lgl/stdbool_.h
+++ b/lgl/stdbool_.h
@@ -15,8 +15,8 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
/* ISO C 99 <stdbool.h> for platforms that lack it. */
@@ -115,4 +115,4 @@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
#define true 1
#define __bool_true_false_are_defined 1
-#endif /* _STDBOOL_H */
+#endif /* _GL_STDBOOL_H */
diff --git a/lgl/vasprintf.c b/lgl/vasprintf.c
index 515722cf71..7b645460ee 100644
--- a/lgl/vasprintf.c
+++ b/lgl/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -18,7 +18,11 @@
#include <config.h>
/* Specification. */
-#include <stdio.h>
+#ifdef IN_LIBASPRINTF
+# include "vasprintf.h"
+#else
+# include <stdio.h>
+#endif
#include <errno.h>
#include <limits.h>