autoconf-patches
[Top][All Lists]
Advanced

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

Re: _AC_CHECK_TYPE_REPLACEMENT_TYPE_P


From: Akim Demaille
Subject: Re: _AC_CHECK_TYPE_REPLACEMENT_TYPE_P
Date: 17 Jul 2001 11:59:50 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor)

>>>>> "Paul" == Paul Eggert <address@hidden> writes:

Paul> So how about if we replace the regular expression with the
Paul> following instead:

Paul> 
^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|[_a-zA-Z][_a-zA-Z0-9]*_t\)\(\([(
 *]\|\[\)\([_a-zA-Z0-9() *]\|\[\|\]\)*\)?$

I can't implement this, because there is a quote left alone in there:

        ^\(BASIC-TYPES\)\(\([( *]\|\[\)\([_a-zA-Z0-9() *]\|\[\|\]\)*\)?$
                                  =====

I can't do this at all.  So I simplified to:

[^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|[_a-zA-Z][_a-zA-Z0-9]*_t\)[][_a-zA-Z0-9()
 *]*$]


i.e.
        ^\(BASIC-TYPES\)[][_a-zA-Z0-9() *]*$

Here is the diff:

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * actypes.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P): `foo_t' is a
        replacement type.
        From Paul Eggert.

Index: NEWS
===================================================================
RCS file: /cvs/autoconf/NEWS,v
retrieving revision 1.173
diff -u -u -r1.173 NEWS
--- NEWS 2001/07/17 07:53:06 1.173
+++ NEWS 2001/07/17 09:59:27
@@ -36,10 +36,13 @@
 
 ** Generic macros
 - AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to
-  specify pre-includes.
+  specify pre-includes.  In this case, the headers are compiler with
+  cc, not merely preprocessed by cpp.  Therefore it is the _usability_
+  of a header which is checked for, not just its availability.
 - AC_ARG_VAR refuses to run configure when precious variables have
   changed.
 - Versions of compilers are dumped in the logs.
+- AC_CHECK_TYPE recognizes use of `foo_t' as a replacement type.
 
 ** Specific Macros
 - AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link.
Index: actypes.m4
===================================================================
RCS file: /cvs/autoconf/actypes.m4,v
retrieving revision 1.7
diff -u -u -r1.7 actypes.m4
--- actypes.m4 2001/06/15 15:53:18 1.7
+++ actypes.m4 2001/07/17 09:59:27
@@ -194,7 +194,7 @@
 # for better common-useward backward compatibility.
 m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
 [m4_if(m4_regexp([$1],
-                 
[^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9()
 *]\|\[\|\]\)*$]),
+                 
[^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|[_a-zA-Z][_a-zA-Z0-9]*_t\)[][_a-zA-Z0-9()
 *]*$]),
        0, 1, 0)dnl
 ])# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P
 
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.491
diff -u -u -r1.491 autoconf.texi
--- doc/autoconf.texi 2001/07/14 16:15:39 1.491
+++ doc/autoconf.texi 2001/07/17 09:59:35
@@ -9858,9 +9858,11 @@
 If there are three or four arguments, the modern version is used.
 
 @item
-If the second argument is a C or C++ @emph{builtin} type, then the
-obsolete version is used.  Because many people have used @samp{off_t}
-and @samp{size_t} as replacement types, they are recognized too.
+If the second argument appears to be a C or C++ type, then the
+obsolete version is used.  This happens if the argument is a C or C++
address@hidden type or a C identifier ending in @samp{_t}, optionally
+followed by one of @samp{[(* } and then by a string of zero or more
+characters taken from the set @samp{[]()* _a-zA-Z0-9}.
 
 @item
 If the second argument is spelled with the alphabet of valid C and C++
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/autoconf/tests/Makefile.in,v
retrieving revision 1.66
diff -u -u -r1.66 Makefile.in
--- tests/Makefile.in 2001/07/17 07:53:06 1.66
+++ tests/Makefile.in 2001/07/17 09:59:35
@@ -88,7 +88,7 @@
 DISTCLEANFILES = atconfig testsuite
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_CLEAN_FILES =  atconfig
-DIST_COMMON =  README Makefile.am Makefile.in atconfig.in
+DIST_COMMON =  README Makefile.am Makefile.in atconfig.in configure.ac
 
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
Index: tests/semantics.at
===================================================================
RCS file: /cvs/autoconf/tests/semantics.at,v
retrieving revision 1.23
diff -u -u -r1.23 semantics.at
--- tests/semantics.at 2001/06/25 18:27:51 1.23
+++ tests/semantics.at 2001/07/17 09:59:35
@@ -203,16 +203,14 @@
 AC_OUTPUT
 ]])
 
-AT_CHECK_AUTOCONF([], 0, [],
-[configure.ac:10: warning: AC_CHECK_TYPE: assuming `uint65536_t' is not a type
-])
+AT_CHECK_AUTOCONF
 AT_CHECK([[sed -e '/^#(cut-from-here/,/^#to-here)/!d' -e '/^#/d' configure]],
          0,
          [NEW
 OLD
 OLD
 OLD
-NEW
+OLD
 NEW
 ])
 



reply via email to

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