[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strncasecmp dcl
From: |
Akim Demaille |
Subject: |
Re: strncasecmp dcl |
Date: |
03 Jul 2001 19:11:43 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor) |
>>>>> "Werner" == Werner LEMBERG <address@hidden> writes:
>> Now, I took some more time to think about it, and here is my
>> proposal: when $4 is not given (was introduced in 2.50a, did not
>> exist before, so we are free to do whatever we want with it), just
>> do what Autoconf always did: merely check it can be preprocessed
>> --- yuck, how sad CPP was chosen here :-( ---, but when $4 is
>> given, test with the compiler.
Werner> I like this. If it is properly documented (with an example),
Werner> I don't see any problems.
Werner> Will you add a predefined test for string.h/strings.h (which I
Werner> would like to see)?
Nope, I want to keep the interface as simple as possible. Writing
such a macro is really simple if you need it, but I don't want it in
Autoconf.
I expect some side effects on some configure.in with the following
patch. But I think it should go into Autoconf anyway, any other
solution is just useless complication.
The most important thing will be to display how people should use
HAVE_STRINGS_H from now on. NEWS will be extended, and the section
for upgrading too. This patch is here for comments.
Index: ChangeLog
from Akim Demaille <address@hidden>
* acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Include
strings.h if usable with string.h.
Suggested by Paul Eggert.
Index: NEWS
===================================================================
RCS file: /cvs/autoconf/NEWS,v
retrieving revision 1.169
diff -u -u -r1.169 NEWS
--- NEWS 2001/07/01 19:41:20 1.169
+++ NEWS 2001/07/03 17:01:37
@@ -12,6 +12,7 @@
** Default includes
- Now include stdint.h.
- sys/types.h and sys/stat.h are guarded.
+- strings.h is included if available, and not conflicting with string.h.
** Bug fixes
- The test suite is more robust and presents less false failures.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.479
diff -u -u -r1.479 autoconf.texi
--- doc/autoconf.texi 2001/07/03 14:12:40 1.479
+++ doc/autoconf.texi 2001/07/03 17:01:38
@@ -2820,11 +2820,10 @@
# include <memory.h>
# endif
# include <string.h>
-#else
-# if HAVE_STRINGS_H
-# include <strings.h>
-# endif
#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
@@ -2839,8 +2838,14 @@
@end example
If the default includes are used, then Autoconf will automatically check
-for the presence of these headers, i.e., you don't need to run
address@hidden, nor check for @file{stdlib.h} etc.
+for the presence of these headers and their compatibility, i.e., you
+don't need to run @code{AC_HEADERS_STDC}, nor check for @file{stdlib.h}
+etc.
+
+These headers are checked for in the same order as they are included.
+For instance, on some systems @file{string.h} and @file{strings.h} both
+exist, but conflict. Then @code{HAVE_STRING_H} will be defined, but
address@hidden won't.
@node Alternative Programs, Libraries, Common Behavior, Existing Tests
@section Alternative Programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: strncasecmp dcl,
Akim Demaille <=