From: Akim Demaille Date: Fri, 27 Sep 2002 09:25:41 +0000 (+0000) Subject: * lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): New, stolen from X-Git-Tag: AUTOCONF-2.54a~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3bf99f5ce0a8b7bd96a8e5f16df6138f1c322272;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index f8dbf43aa..58b1d84c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-09-27 Akim Demaille + + * 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. + 2002-09-27 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools): Some about mv diff --git a/NEWS b/NEWS index bc555e81a..541a2b004 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 4931f8fc0..5c1ab671c 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -3842,6 +3842,15 @@ boundary (such as the one on NeXT x86 OpenStep), require an @code{AC_LIBOBJ} replacement for @samp{memcmp}. @end defmac +@defmac AC_FUNC_MBRTOWC +@acindex FUNC_MBRTOWC +@cvindex HAVE_MBRTOWC +@c @fuindex mbrtowc +@prindex @code{mbrtowc} +Define @code{HAVE_MBRTOWC} to 1 if the function @code{mbrtowc} and the +type @code{mbstate_t} are properly declared. +@end defmac + @defmac AC_FUNC_MKTIME @acindex FUNC_MKTIME @ovindex LIBOBJS diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index e4503b913..06761c0a7 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -753,6 +753,25 @@ AC_DEFUN([AC_FUNC_MALLOC], ])# 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( + [[@%:@include ]], + [[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], diff --git a/lib/autoscan/functions b/lib/autoscan/functions index f167998e4..d793b2e14 100644 --- a/lib/autoscan/functions +++ b/lib/autoscan/functions @@ -18,58 +18,59 @@ # 02111-1307, USA. # Ones that have their own macros. -alloca AC_FUNC_ALLOCA -bcmp AC_HEADER_STDC -bcopy AC_HEADER_STDC -bzero AC_CHECK_FUNCS -bzero AC_HEADER_STDC -chown AC_FUNC_CHOWN +alloca AC_FUNC_ALLOCA +bcmp AC_HEADER_STDC +bcopy AC_HEADER_STDC +bzero AC_CHECK_FUNCS +bzero AC_HEADER_STDC +chown AC_FUNC_CHOWN dcgettext AM_GNU_GETTEXT -error AC_FUNC_ERROR_AT_LINE -error_at_line AC_FUNC_ERROR_AT_LINE -fnmatch AC_FUNC_FNMATCH -fork AC_FUNC_FORK -fseeko AC_FUNC_FSEEKO -ftello AC_FUNC_FSEEKO -getgroups AC_FUNC_GETGROUPS -getloadavg AC_FUNC_GETLOADAVG -getpgrp AC_FUNC_GETPGRP -index AC_HEADER_STDC -ioctl AC_PROG_GCC_TRADITIONAL -lstat AC_FUNC_LSTAT -major AC_HEADER_MAJOR -makedev AC_HEADER_MAJOR -malloc AC_FUNC_MALLOC -memchr AC_CHECK_FUNCS -memchr AC_HEADER_STDC -memcmp AC_FUNC_MEMCMP -memcpy AC_HEADER_STDC -memmove AC_CHECK_FUNCS -memmove AC_HEADER_STDC -memset AC_CHECK_FUNCS -memset AC_HEADER_STDC -minor AC_HEADER_MAJOR -mktime AC_FUNC_MKTIME -mmap AC_FUNC_MMAP -obstack_init AC_FUNC_OBSTACK -realloc AC_FUNC_REALLOC -rindex AC_HEADER_STDC -setpgrp AC_FUNC_SETPGRP -setvbuf AC_FUNC_SETVBUF_REVERSED -signal AC_TYPE_SIGNAL -stat AC_FUNC_STAT -strcoll AC_FUNC_STRCOLL -strerror_r AC_FUNC_STRERROR_R -strftime AC_FUNC_STRFTIME -strnlen AC_FUNC_STRNLEN -strtod AC_FUNC_STRTOD -utime AC_CHECK_FUNCS -utime AC_FUNC_UTIME_NULL -vfork AC_FUNC_FORK -vfprintf AC_FUNC_VPRINTF -vprintf AC_FUNC_VPRINTF -vsprintf AC_FUNC_VPRINTF -wait3 AC_FUNC_WAIT3 +error AC_FUNC_ERROR_AT_LINE +error_at_line AC_FUNC_ERROR_AT_LINE +fnmatch AC_FUNC_FNMATCH +fork AC_FUNC_FORK +fseeko AC_FUNC_FSEEKO +ftello AC_FUNC_FSEEKO +getgroups AC_FUNC_GETGROUPS +getloadavg AC_FUNC_GETLOADAVG +getpgrp AC_FUNC_GETPGRP +index AC_HEADER_STDC +ioctl AC_PROG_GCC_TRADITIONAL +lstat AC_FUNC_LSTAT +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 +memcpy AC_HEADER_STDC +memmove AC_CHECK_FUNCS +memmove AC_HEADER_STDC +memset AC_CHECK_FUNCS +memset AC_HEADER_STDC +minor AC_HEADER_MAJOR +mktime AC_FUNC_MKTIME +mmap AC_FUNC_MMAP +obstack_init AC_FUNC_OBSTACK +realloc AC_FUNC_REALLOC +rindex AC_HEADER_STDC +setpgrp AC_FUNC_SETPGRP +setvbuf AC_FUNC_SETVBUF_REVERSED +signal AC_TYPE_SIGNAL +stat AC_FUNC_STAT +strcoll AC_FUNC_STRCOLL +strerror_r AC_FUNC_STRERROR_R +strftime AC_FUNC_STRFTIME +strnlen AC_FUNC_STRNLEN +strtod AC_FUNC_STRTOD +utime AC_CHECK_FUNCS +utime AC_FUNC_UTIME_NULL +vfork AC_FUNC_FORK +vfprintf AC_FUNC_VPRINTF +vprintf AC_FUNC_VPRINTF +vsprintf AC_FUNC_VPRINTF +wait3 AC_FUNC_WAIT3 # Functions we should no longer use. getwd warn: getwd is deprecated, use getcwd instead @@ -119,7 +120,6 @@ localeconv localtime_r mblen mbrlen -mbrtowc mempcpy mkdir mkfifo diff --git a/tests/acfunctions.at b/tests/acfunctions.at index 120de12db..2d2e46263 100644 --- a/tests/acfunctions.at +++ b/tests/acfunctions.at @@ -14,6 +14,7 @@ AT_CHECK_MACRO([AC_FUNC_GETGROUPS]) AT_CHECK_MACRO([AC_FUNC_GETMNTENT]) AT_CHECK_MACRO([AC_FUNC_GETPGRP]) AT_CHECK_MACRO([AC_FUNC_MALLOC]) +AT_CHECK_MACRO([AC_FUNC_MBRTOWC]) AT_CHECK_MACRO([AC_FUNC_MEMCMP]) AT_CHECK_MACRO([AC_FUNC_MKTIME]) AT_CHECK_MACRO([AC_FUNC_MMAP])