[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using system.h in configure
From: |
Akim Demaille |
Subject: |
Using system.h in configure |
Date: |
30 Oct 2002 09:23:14 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
I'm slowly reaching a goal that does matter to me: exercising the
framework that I'd like to implement in Autoconf some day: something
like autosystem.h, and using system.h when running configure. This
way we have the perfect match, the right check.
To this end, I need the following patch. On my machine, suddenly
locale.h was rejected. That was because of the ifndef HAVE_LOCALE_H
that #defined setlocale(x,y) to nothing, hence locale.h produced
errors, and was rejected.
But I'm also asking the permission to continue the change, i.e.:
- move src/system.h into ./system.h
to avoid having to pass -I lib that results in using our getopt.h
instead of the libc's, and boom.
- change configure.ac to use system.h instead of the default
default (sic) includes.
OK?
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
#if.
Index: src/system.h
===================================================================
RCS file: /cvsroot/bison/bison/src/system.h,v
retrieving revision 1.52
diff -u -u -r1.52 system.h
--- src/system.h 23 Oct 2002 16:30:50 -0000 1.52
+++ src/system.h 30 Oct 2002 08:22:12 -0000
@@ -18,7 +18,7 @@
#ifndef BISON_SYSTEM_H
#define BISON_SYSTEM_H
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -103,27 +103,27 @@
| Missing prototypes. |
`---------------------*/
-#if !HAVE_DECL_STPCPY
+#if defined HAVE_DECL_STPCPY && !HAVE_DECL_STPCPY
char *stpcpy (char *dest, const char *src);
#endif
-#if !HAVE_DECL_STRCHR
+#if defined HAVE_DECL_STRCHR && !HAVE_DECL_STRCHR
char *strchr (const char *s, int c);
#endif
-#if !HAVE_DECL_STRSPN
+#if defined HAVE_DECL_STRSPN && !HAVE_DECL_STRSPN
size_t strspn (const char *s, const char *accept);
#endif
-#if !HAVE_DECL_STRNLEN
+#if defined HAVE_DECL_STRNLEN && !HAVE_DECL_STRNLEN
size_t strnlen (const char *s, size_t maxlen);
#endif
-#if !HAVE_DECL_MEMCHR
+#if defined HAVE_DECL_MEMCHR && !HAVE_DECL_MEMCHR
void *memchr (const void *s, int c, size_t n);
#endif
-#if !HAVE_DECL_MEMRCHR
+#if defined HAVE_DECL_MEMRCHR && !HAVE_DECL_MEMRCHR
void *memrchr (const void *s, int c, size_t n);
#endif
@@ -160,10 +160,10 @@
| NLS. |
`------*/
-#ifdef HAVE_LOCALE_H
+#if HAVE_LOCALE_H
# include <locale.h>
#endif
-#ifndef HAVE_SETLOCALE
+#if !HAVE_SETLOCALE
# define setlocale(Category, Locale)
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Using system.h in configure,
Akim Demaille <=