+2001-09-27 Paul Eggert <eggert@twinsun.com>
+
+ Port quotearg fixes from tar 1.13.24.
+
+ * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
+ tm to be declared.
+ (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
+ (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
+
+ * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
+ * m4/mbrtowc.m4: New file.
+ * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
+ Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
+
2001-09-27 Akim Demaille <akim@epita.fr>
Bump to 1.29c.
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/dmalloc.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
+$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/dmalloc.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 m4/mbrtowc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h
@if test ! -f $@; then \
fi
])
-#serial 1
+#serial 2
dnl These are the prerequisite macros for files in the lib/
dnl directories of Bison.
AC_DEFUN([jm_PREREQ_QUOTEARG],
[
- AC_CHECK_FUNCS(isascii iswprint mbrtowc)
- AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
+ AC_CHECK_FUNCS(isascii iswprint mbsinit)
+ jm_FUNC_MBRTOWC
+ AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
AC_HEADER_STDC
AC_C_BACKSLASH_A
AC_MBSTATE_T
AM_C_PROTOTYPES
])
+#serial 4
+
+dnl From Paul Eggert
+
+AC_DEFUN([jm_FUNC_MBRTOWC],
+[
+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+ jm_cv_func_mbrtowc,
+ [AC_TRY_LINK(
+ [#include <wchar.h>],
+ [mbstate_t state; return ! (sizeof state && mbrtowc);],
+ jm_cv_func_mbrtowc=yes,
+ jm_cv_func_mbrtowc=no)])
+ if test $jm_cv_func_mbrtowc = yes; then
+ AC_DEFINE(HAVE_MBRTOWC, 1,
+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+])
+
#serial 3
dnl From Paul Eggert.
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
-/* Define if you have the `mbrtowc' function. */
+/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
#undef HAVE_MBRTOWC
+/* Define if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
/* Define if you have the `memchr' function. */
#undef HAVE_MEMCHR
fi
-for ac_func in isascii iswprint mbrtowc
+for ac_func in isascii iswprint mbsinit
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
fi
done
-for ac_header in limits.h stdlib.h string.h wchar.h wctype.h
+ echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
+echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
+if test "${jm_cv_func_mbrtowc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <wchar.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+mbstate_t state; return ! (sizeof state && mbrtowc);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext 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='test -s 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
+ jm_cv_func_mbrtowc=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+jm_cv_func_mbrtowc=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
+echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
+ if test $jm_cv_func_mbrtowc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRTOWC 1
+_ACEOF
+
+ fi
+
+for ac_header in limits.h stddef.h stdlib.h string.h wchar.h wctype.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
#endif
#if HAVE_WCHAR_H
+
+/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
+# include <stdio.h>
+# include <time.h>
+
# include <wchar.h>
#endif
# undef MB_CUR_MAX
# define MB_CUR_MAX 1
# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
-# define mbsinit(ps) 1
# define iswprint(wc) ISPRINT ((unsigned char) (wc))
+# undef HAVE_MBSINIT
+#endif
+
+#if !defined mbsinit && !HAVE_MBSINIT
+# define mbsinit(ps) 1
#endif
#ifndef iswprint
lcmessage.m4 \
m4.m4 \
malloc.m4 \
+mbrtowc.m4 \
mbstate_t.m4 \
prereq.m4 \
progtest.m4 \
lcmessage.m4 \
m4.m4 \
malloc.m4 \
+mbrtowc.m4 \
mbstate_t.m4 \
prereq.m4 \
progtest.m4 \
-#serial 1
+#serial 2
dnl These are the prerequisite macros for files in the lib/
dnl directories of Bison.
AC_DEFUN([jm_PREREQ_QUOTEARG],
[
- AC_CHECK_FUNCS(isascii iswprint mbrtowc)
- AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
+ AC_CHECK_FUNCS(isascii iswprint mbsinit)
+ jm_FUNC_MBRTOWC
+ AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
AC_HEADER_STDC
AC_C_BACKSLASH_A
AC_MBSTATE_T
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
"Language-Team: German <de@li.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr ""
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.25\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
"Language-Team: Spanish <es@li.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr ""
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28d\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 2001-08-29 17:06+02:00\n"
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr "`"
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr "'"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28d\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 2001-08-29 20:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr "`"
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr "'"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr ""
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr ""
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 2001-09-09 13:49+04:00\n"
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
"Language-Team: Russian <ru@li.org>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr "`"
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr "'"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28c\n"
-"POT-Creation-Date: 2001-09-27 10:55+0200\n"
+"POT-Creation-Date: 2001-09-27 16:21+0200\n"
"PO-Revision-Date: 2001-09-10 10:54GMT\n"
"Last-Translator: Altug Bayram <altugbayram_2000@yahoo.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
#. MARK). A British English Unicode locale should instead
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-#: lib/quotearg.c:259
+#: lib/quotearg.c:268
msgid "`"
msgstr "`"
-#: lib/quotearg.c:260
+#: lib/quotearg.c:269
msgid "'"
msgstr "'"