autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_FUNC_FNMATCH jamboree patch


From: Paul Eggert
Subject: Re: AC_FUNC_FNMATCH jamboree patch
Date: Mon, 27 May 2002 21:18:50 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 27 May 2002 17:46:38 +0200
> 
> I can't find AC_MBSTATE_T in Autoconf, but it is required by your
> fnmatch macros.

Oops.  Sorry, I tested the new Autoconf in an environment that had
that macro defined.  I installed the following patch.

2002-05-27  Paul Eggert  <address@hidden>

        * lib/autoconf/types.m4 (AC_TYPE_MBSTATE_T): New macro.
        * NEWS, doc/autoconf.texi (Particular Types): Document it.
        * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): Require it
        instead of AC_MBSTATE_T, which never existed.

--- NEWS        22 May 2002 23:36:20 -0000      1.241
+++ NEWS        28 May 2002 03:48:37 -0000
@@ -20,7 +20,7 @@
 - AC_FUNC_SETVBUF_REVERSED no longer fails when cross-compiling.
 - AC_PROG_CC_STDC is integrated into AC_PROG_CC.
 - AC_PROG_F77 default search no longer includes cf77 and cfg77.
-- New macro: AC_GNU_SOURCE.
+- New macros: AC_GNU_SOURCE, AC_TYPE_MBSTATE_T.
 
 ** Bug fixes
 
--- doc/autoconf.texi   23 May 2002 17:53:10 -0000      1.627
+++ doc/autoconf.texi   28 May 2002 03:48:43 -0000
@@ -4578,6 +4578,14 @@ Define @code{GETGROUPS_T} to be whicheve
 is the base type of the array argument to @code{getgroups}.
 @end defmac
 
address@hidden AC_TYPE_MBSTATE_T
address@hidden TYPE_MBSTATE_T
address@hidden mbstate_t
+Define @code{HAVE_MBSTATE_T} if @code{<wchar.h>} declares the
address@hidden type.  Also, define @code{mbstate_t} to be a type if
address@hidden<wchar.h>} does not declare it.
address@hidden defmac
+
 @defmac AC_TYPE_MODE_T
 @acindex TYPE_MODE_T
 @cvindex mode_t
--- lib/autoconf/functions.m4   17 May 2002 07:08:41 -0000      1.61
+++ lib/autoconf/functions.m4   28 May 2002 03:48:44 -0000
@@ -348,7 +348,7 @@ AC_DEFUN([_AC_FUNC_FNMATCH],
 [m4_ifval([$1],
    [AC_REQUIRE([AC_C_CONST])
     AC_REQUIRE([AC_FUNC_ALLOCA])
-    AC_REQUIRE([AC_MBSTATE_T])])
+    AC_REQUIRE([AC_TYPE_MBSTATE_T])])
  AC_CACHE_CHECK(
    [for working $2 fnmatch],
    [$3],
--- lib/autoconf/types.m4       18 May 2002 00:56:47 -0000      1.16
+++ lib/autoconf/types.m4       28 May 2002 03:48:44 -0000
@@ -289,6 +289,26 @@ AU_DEFUN([AM_TYPE_PTRDIFF_T],
 [AC_CHECK_TYPES(ptrdiff_t)])
 
 
+# AC_TYPE_MBSTATE_T
+# -----------------
+AC_DEFUN([AC_TYPE_MBSTATE_T],
+  [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
+     [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [AC_INCLUDES_DEFAULT
+#          include <wchar.h>],
+          [mbstate_t x; return sizeof x;])],
+       [ac_cv_type_mbstate_t=yes],
+       [ac_cv_type_mbstate_t=no])])
+   if test $ac_cv_type_mbstate_t = yes; then
+     AC_DEFINE([HAVE_MBSTATE_T], 1,
+              [Define to 1 if <wchar.h> declares mbstate_t.])
+   else
+     AC_DEFINE([mbstate_t], int,
+              [Define to a type if <wchar.h> does not define.])
+   fi])
+
+
 # AC_TYPE_UID_T
 # -------------
 # FIXME: Rewrite using AC_CHECK_TYPE.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]