From: Akim Demaille Date: Fri, 11 Jan 2002 13:31:33 +0000 (+0000) Subject: * configure.in: Use AC_FUNC_STRNLEN. X-Git-Tag: BISON-1_30k~2 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/ac5ff6a9087c8b9abedef53e34ec58a41192b3b5?ds=inline * configure.in: Use AC_FUNC_STRNLEN. --- diff --git a/ChangeLog b/ChangeLog index e0687545..c24efb45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-01-11 Akim Demaille + + * configure.in: Use AC_FUNC_STRNLEN. + 2002-01-09 Akim Demaille Version 1.30j. diff --git a/config.hin b/config.hin index 00959174..351d8fd1 100644 --- a/config.hin +++ b/config.hin @@ -201,9 +201,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strnlen' function. */ -#undef HAVE_STRNLEN - /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN diff --git a/configure b/configure index 537f22a7..acc2dae7 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.52g for GNU Bison 1.30j. +# Generated by GNU Autoconf 2.52g for GNU Bison 1.30k. # # Report bugs to . # @@ -256,8 +256,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GNU Bison' PACKAGE_TARNAME='bison' -PACKAGE_VERSION='1.30j' -PACKAGE_STRING='GNU Bison 1.30j' +PACKAGE_VERSION='1.30k' +PACKAGE_STRING='GNU Bison 1.30k' PACKAGE_BUGREPORT='bug-bison@gnu.org' # Factoring default headers for most tests. @@ -760,7 +760,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Bison 1.30j to adapt to many kinds of systems. +\`configure' configures GNU Bison 1.30k to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -826,7 +826,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Bison 1.30j:";; + short | recursive ) echo "Configuration of GNU Bison 1.30k:";; esac cat <<\_ACEOF @@ -921,7 +921,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -GNU Bison configure 1.30j +GNU Bison configure 1.30k generated by GNU Autoconf 2.52g Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -936,7 +936,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Bison $as_me 1.30j, which was +It was created by GNU Bison $as_me 1.30k, which was generated by GNU Autoconf 2.52g. Invocation command line was $ $0 $@ @@ -1500,7 +1500,7 @@ fi # Define the identity of the package. PACKAGE=bison -VERSION=1.30j +VERSION=1.30k cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" @@ -5019,6 +5019,73 @@ if test $ac_cv_lib_error_at_line = no; then LIBOBJS="$LIBOBJS error.$ac_objext" fi +echo "$as_me:$LINENO: checking for working strnlen" >&5 +echo $ECHO_N "checking for working strnlen... $ECHO_C" >&6 +if test "${ac_cv_func_strnlen_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_strnlen_working=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + +#define S "foobar" +#define S_LEN (sizeof S - 1) + + /* At least one implementation is buggy: that of AIX 4.3 would + give strnlen (S, 1) == 3. */ + + int i; + for (i = 0; i < S_LEN + 1; ++i) + { + int expected = i <= S_LEN ? i : S_LEN; + if (strnlen (S, i) != expected) + exit (1); + } + exit (0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strnlen_working=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_strnlen_working=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5 +echo "${ECHO_T}$ac_cv_func_strnlen_working" >&6 +test $ac_cv_func_strnlen_working = no && LIBOBJS="$LIBOBJS strnlen.$ac_objext" + for ac_func in mkstemp setlocale @@ -5475,8 +5542,7 @@ fi - -for ac_func in stpcpy strchr strnlen strspn memchr memrchr +for ac_func in stpcpy strchr strspn memchr memrchr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -9311,7 +9377,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by GNU Bison $as_me 1.30j, which was +This file was extended by GNU Bison $as_me 1.30k, which was generated by GNU Autoconf 2.52g. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9373,7 +9439,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU Bison config.status 1.30j +GNU Bison config.status 1.30k configured by $0, generated by GNU Autoconf 2.52g, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.in b/configure.in index 6e407d41..5d8c03bd 100644 --- a/configure.in +++ b/configure.in @@ -20,10 +20,10 @@ # We need a recent Autoconf to run a recent Autotest. AC_PREREQ(2.52g) -AC_INIT([GNU Bison], [1.30j], [bug-bison@gnu.org]) +AC_INIT([GNU Bison], [1.30k], [bug-bison@gnu.org]) AC_CONFIG_AUX_DIR(config) -AM_INIT_AUTOMAKE([bison], [1.30j]) +AM_INIT_AUTOMAKE([bison], [1.30k]) AM_CONFIG_HEADER(config.h:config.hin) # Initialize the test suite. @@ -86,9 +86,10 @@ AM_C_PROTOTYPES AC_FUNC_ALLOCA AC_FUNC_OBSTACK AC_FUNC_ERROR_AT_LINE +AC_FUNC_STRNLEN AC_CHECK_FUNCS(mkstemp setlocale) AC_CHECK_DECLS([stpcpy, strchr, strspn, strnlen, memchr, memrchr]) -AC_REPLACE_FUNCS(stpcpy strchr strnlen strspn memchr memrchr) +AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr) jm_FUNC_MALLOC jm_FUNC_REALLOC jm_PREREQ_QUOTEARG diff --git a/doc/version.texi b/doc/version.texi index fc6a3001..639f98ac 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ @set UPDATED 5 January 2002 @set UPDATED-MONTH January 2002 -@set EDITION 1.30j -@set VERSION 1.30j +@set EDITION 1.30k +@set VERSION 1.30k diff --git a/lib/Makefile.in b/lib/Makefile.in index 61180ffa..12af92e7 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -150,9 +150,9 @@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp @AMDEP_TRUE@ $(DEPDIR)/memrchr.Po $(DEPDIR)/obstack.Po \ @AMDEP_TRUE@ $(DEPDIR)/quote$U.Po $(DEPDIR)/quotearg$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \ -@AMDEP_TRUE@ $(DEPDIR)/strchr.Po $(DEPDIR)/strnlen.Po \ -@AMDEP_TRUE@ $(DEPDIR)/strspn.Po $(DEPDIR)/xmalloc$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/xstrdup$U.Po $(DEPDIR)/xstrndup$U.Po +@AMDEP_TRUE@ $(DEPDIR)/strchr.Po $(DEPDIR)/strspn.Po \ +@AMDEP_TRUE@ $(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/xstrndup$U.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -160,7 +160,7 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(libbison_a_SOURCES) DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \ error.c error.h malloc.c memchr.c memrchr.c obstack.c obstack.h \ - realloc.c stpcpy.c strchr.c strnlen.c strspn.c + realloc.c stpcpy.c strchr.c strspn.c SOURCES = $(libbison_a_SOURCES) all: all-am @@ -214,7 +214,6 @@ mostlyclean-kr: @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strchr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrdup$U.Po@am__quote@ @@ -265,8 +264,6 @@ stpcpy_.c: stpcpy.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c strchr_.c: strchr.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strchr.c; then echo $(srcdir)/strchr.c; else echo strchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strchr_.c || rm -f strchr_.c -strnlen_.c: strnlen.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c || rm -f strnlen_.c strspn_.c: strspn.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c xmalloc_.c: xmalloc.c $(ANSI2KNR) @@ -279,9 +276,8 @@ alloca_.$(OBJEXT) basename_.$(OBJEXT) dirname_.$(OBJEXT) \ error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) malloc_.$(OBJEXT) \ memchr_.$(OBJEXT) memrchr_.$(OBJEXT) obstack_.$(OBJEXT) \ quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \ -stpcpy_.$(OBJEXT) strchr_.$(OBJEXT) strnlen_.$(OBJEXT) \ -strspn_.$(OBJEXT) xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) \ -xstrndup_.$(OBJEXT) : $(ANSI2KNR) +stpcpy_.$(OBJEXT) strchr_.$(OBJEXT) strspn_.$(OBJEXT) \ +xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) xstrndup_.$(OBJEXT) : $(ANSI2KNR) uninstall-info-am: tags: TAGS diff --git a/po/de.po b/po/de.po index e119f3a4..2572efcc 100644 --- a/po/de.po +++ b/po/de.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.25\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 1996-10-10 17:54 MET DST\n" "Last-Translator: Ulrich Drepper \n" "Language-Team: German \n" diff --git a/po/es.po b/po/es.po index fc14007c..4446b2f7 100644 --- a/po/es.po +++ b/po/es.po @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU bison 1.25\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 1998-09-21 10:19+0200\n" "Last-Translator: Nicolás García-Pedrajas \n" "Language-Team: Spanish \n" diff --git a/po/et.po b/po/et.po index f02fac7b..c8f4dac0 100644 --- a/po/et.po +++ b/po/et.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.30f\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 2001-12-05 20:35+0200\n" "Last-Translator: Toomas Soome \n" "Language-Team: Estonian \n" diff --git a/po/fr.po b/po/fr.po index 664f1e80..3157f23a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU bison 1.30f\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 2001-12-05 13:00-0500\n" "Last-Translator: Michel Robitaille \n" "Language-Team: French \n" diff --git a/po/ja.po b/po/ja.po index 46f2f0a8..93db149c 100644 --- a/po/ja.po +++ b/po/ja.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU bison 1.30f\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 2001-12-10 15:59+0900\n" "Last-Translator: Daisuke Yamashita \n" "Language-Team: Japanese \n" diff --git a/po/nl.po b/po/nl.po index 38e2c792..0f770741 100644 --- a/po/nl.po +++ b/po/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.25\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 1996-08-27 15:34 MET DST\n" "Last-Translator: Erick Branderhorst \n" "Language-Team: Dutch \n" diff --git a/po/ru.po b/po/ru.po index 1f98460e..296e8488 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.29\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 2001-09-09 13:49+04:00\n" "Last-Translator: Dmitry S. Sivachenko \n" "Language-Team: Russian \n" diff --git a/po/sv.po b/po/sv.po index b0e6d81e..69648224 100644 --- a/po/sv.po +++ b/po/sv.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.30f\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 2001-12-06 22:33+0100\n" "Last-Translator: Göran Uddeborg \n" "Language-Team: Swedish \n" diff --git a/po/tr.po b/po/tr.po index 926e1fd8..6c6cb5a8 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.30f\n" -"POT-Creation-Date: 2002-01-08 18:44+0100\n" +"POT-Creation-Date: 2002-01-09 16:33+0100\n" "PO-Revision-Date: 2001-12-06 12:09+300\n" "Last-Translator: Altug Bayram \n" "Language-Team: Turkish \n"