[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_FUNC_MBRTOWC
From: |
Akim Demaille |
Subject: |
AC_FUNC_MBRTOWC |
Date: |
27 Sep 2002 11:25:17 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
Given that it is used by quotearg, which is sort of widespread, I
apply the following patch (which obsoletes its jm_ coutnerpart).
BTW, we should decide what to do wrt macros that were jm_FOO and are
now AC_FOO: should we declare the jm_FOO obsolete?
If this patch is not good, I can reverse it.
Index: ChangeLog
from Akim Demaille <address@hidden>
* lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): New, stolen from
jm_FUNC_MBRTOWC, by Paul Eggert, from the Coreutils 4.5.1.
* lib/autoscan/functions: Adjust.
* doc/autoconf.texi (Particular Functions): Adjust.
Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.260
diff -u -u -r1.260 NEWS
--- NEWS 27 Sep 2002 08:20:26 -0000 1.260
+++ NEWS 27 Sep 2002 09:23:51 -0000
@@ -1,6 +1,11 @@
* Major changes in Autoconf 2.54a -*- outline -*-
+** Macros
+
+- New macros
+ AC_FUNC_MBRTOWC
+
** Bug Fixes
- Portability of the Autoconf package to Solaris.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.682
diff -u -u -r1.682 autoconf.texi
--- doc/autoconf.texi 27 Sep 2002 08:20:27 -0000 1.682
+++ doc/autoconf.texi 27 Sep 2002 09:24:07 -0000
@@ -3842,6 +3842,15 @@
@code{AC_LIBOBJ} replacement for @samp{memcmp}.
@end defmac
address@hidden AC_FUNC_MBRTOWC
address@hidden FUNC_MBRTOWC
address@hidden HAVE_MBRTOWC
address@hidden @fuindex mbrtowc
address@hidden @code{mbrtowc}
+Define @code{HAVE_MBRTOWC} to 1 if the function @code{mbrtowc} and the
+type @code{mbstate_t} are properly declared.
address@hidden defmac
+
@defmac AC_FUNC_MKTIME
@acindex FUNC_MKTIME
@ovindex LIBOBJS
Index: lib/autoconf/functions.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/functions.m4,v
retrieving revision 1.69
diff -u -u -r1.69 functions.m4
--- lib/autoconf/functions.m4 9 Sep 2002 15:43:38 -0000 1.69
+++ lib/autoconf/functions.m4 27 Sep 2002 09:24:10 -0000
@@ -753,6 +753,25 @@
])# AC_FUNC_MALLOC
+# AC_FUNC_MBRTOWC
+# ---------------
+AC_DEFUN([AC_FUNC_MBRTOWC],
+[
+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+ ac_cv_func_mbrtowc,
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ address@hidden:@include <wchar.h>]],
+ [[mbstate_t state; return ! (sizeof state && mbrtowc);]])],
+ ac_cv_func_mbrtowc=yes,
+ ac_cv_func_mbrtowc=no)])
+ if test $ac_cv_func_mbrtowc = yes; then
+ AC_DEFINE([HAVE_MBRTOWC], 1,
+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+])
+
+
# AC_FUNC_MEMCMP
# --------------
AC_DEFUN([AC_FUNC_MEMCMP],
Index: lib/autoscan/functions
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoscan/functions,v
retrieving revision 1.20
diff -u -u -r1.20 functions
--- lib/autoscan/functions 27 Sep 2002 08:48:26 -0000 1.20
+++ lib/autoscan/functions 27 Sep 2002 09:24:10 -0000
@@ -40,6 +40,7 @@
major AC_HEADER_MAJOR
makedev AC_HEADER_MAJOR
malloc AC_FUNC_MALLOC
+mbrtowc AC_FUNC_MBRTOWC
memchr AC_CHECK_FUNCS
memchr AC_HEADER_STDC
memcmp AC_FUNC_MEMCMP
@@ -119,7 +120,6 @@
localtime_r
mblen
mbrlen
-mbrtowc
mempcpy
mkdir
mkfifo
- AC_FUNC_MBRTOWC,
Akim Demaille <=