Commit 890ad3ea by Kaveh R. Ghazi Committed by Kaveh Ghazi

configure.in (AC_PREREQ): Bump to 2.13.

        * configure.in (AC_PREREQ): Bump to 2.13.
        (AC_C_STRINGIZE): Call this instead of using a custom macro.

        * gansidecl.h (HAVE_STRINGIZE): Define, if stage2 gcc && __STDC__.

        * system.h (HAVE_STRINGIZE): Test this instead of HAVE_CPP_STRINGIFY.

        * acconfig.h (HAVE_CPP_STRINGIFY): Delete.

        * alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Delete.
        (HAVE_STRINGIZE): Define.

From-SVN: r29590
parent 00d33cb2
Wed Sep 22 10:18:56 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in (AC_PREREQ): Bump to 2.13.
(AC_C_STRINGIZE): Call this instead of using a custom macro.
* gansidecl.h (HAVE_STRINGIZE): Define, if stage2 gcc && __STDC__.
* system.h (HAVE_STRINGIZE): Test this instead of HAVE_CPP_STRINGIFY.
* acconfig.h (HAVE_CPP_STRINGIFY): Delete.
* alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Delete.
(HAVE_STRINGIZE): Define.
Wed Sep 22 06:25:15 1999 Jim Kingdon <http://developer.redhat.com> Wed Sep 22 06:25:15 1999 Jim Kingdon <http://developer.redhat.com>
* c-parse.in: save and restore warn_pointer_arith on __extension__ * c-parse.in: save and restore warn_pointer_arith on __extension__
......
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
/* Define as 1 if you have gettext and don't want to use GNU gettext. */ /* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT #undef HAVE_GETTEXT
/* Define if your cpp understands the stringify operator. */
#undef HAVE_CPP_STRINGIFY
/* Define if your compiler understands volatile. */ /* Define if your compiler understands volatile. */
#undef HAVE_VOLATILE #undef HAVE_VOLATILE
......
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
/* Define as 1 if you have gettext and don't want to use GNU gettext. */ /* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT #undef HAVE_GETTEXT
/* Define if your cpp understands the stringify operator. */
#undef HAVE_CPP_STRINGIFY
/* Define if your compiler understands volatile. */ /* Define if your compiler understands volatile. */
#undef HAVE_VOLATILE #undef HAVE_VOLATILE
...@@ -171,6 +168,9 @@ ...@@ -171,6 +168,9 @@
/* Define if you have a working `mmap' system call. */ /* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP #undef HAVE_MMAP
/* Define if you have the ANSI # stringizing operator in cpp. */
#undef HAVE_STRINGIZE
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H #undef HAVE_SYS_WAIT_H
......
...@@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. */
#define HAVE_STDDEF_H 1 #define HAVE_STDDEF_H 1
#define HAVE_TIME_H 1 #define HAVE_TIME_H 1
#define STDC_HEADERS 1 #define STDC_HEADERS 1
#define HAVE_CPP_STRINGIFY 1 #define HAVE_STRINGIZE 1
#if __STDC__ #if __STDC__
extern void *alloca (size_t); extern void *alloca (size_t);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#Boston, MA 02111-1307, USA. #Boston, MA 02111-1307, USA.
# Initialization and defaults # Initialization and defaults
AC_PREREQ(2.12.1) AC_PREREQ(2.13)
AC_INIT(tree.c) AC_INIT(tree.c)
AC_CONFIG_HEADER(auto-host.h:config.in) AC_CONFIG_HEADER(auto-host.h:config.in)
...@@ -346,18 +346,9 @@ AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=]) ...@@ -346,18 +346,9 @@ AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
# See if GNAT has been installed # See if GNAT has been installed
AC_CHECK_PROG(gnat, gnatbind, yes, no) AC_CHECK_PROG(gnat, gnatbind, yes, no)
# See if the system preprocessor understands the ANSI C preprocessor # See if the stage1 system preprocessor understands the ANSI C
# stringification operator. # preprocessor stringification operator.
AC_MSG_CHECKING(whether cpp understands the stringify operator) AC_C_STRINGIZE
AC_CACHE_VAL(gcc_cv_c_have_stringify,
[AC_TRY_COMPILE(,
[#define S(x) #x
char *test = S(foo);],
gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
AC_MSG_RESULT($gcc_cv_c_have_stringify)
if test $gcc_cv_c_have_stringify = yes; then
AC_DEFINE(HAVE_CPP_STRINGIFY)
fi
# Use <inttypes.h> only if it exists, # Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t. # doesn't clash with <sys/types.h>, and declares intmax_t.
......
...@@ -48,6 +48,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -48,6 +48,11 @@ Boston, MA 02111-1307, USA. */
# ifndef HAVE_LONG_DOUBLE # ifndef HAVE_LONG_DOUBLE
# define HAVE_LONG_DOUBLE 1 # define HAVE_LONG_DOUBLE 1
# endif # endif
/* Assume that (non-traditional) gcc used in stage2 or later has the
stringize feature. */
# if !defined (HAVE_STRINGIZE) && __STDC__
# define HAVE_STRINGIZE 1
# endif /* ! HAVE_STRINGIZE && __STDC__ */
#endif /* GCC >= 2.7 */ #endif /* GCC >= 2.7 */
#ifndef NULL_PTR #ifndef NULL_PTR
......
...@@ -438,16 +438,13 @@ extern void abort (); ...@@ -438,16 +438,13 @@ extern void abort ();
#endif #endif
/* Define a STRINGIFY macro that's right for ANSI or traditional C. /* Define a STRINGIFY macro that's right for ANSI or traditional C.
HAVE_CPP_STRINGIFY only refers to the stage1 compiler. Assume that
(non-traditional) gcc used in stage2 or later has this feature.
Note: if the argument passed to STRINGIFY is itself a macro, eg Note: if the argument passed to STRINGIFY is itself a macro, eg
#define foo bar, STRINGIFY(foo) will produce "foo", not "bar". #define foo bar, STRINGIFY(foo) will produce "foo", not "bar".
Although the __STDC__ case could be made to expand this via a layer Although the __STDC__ case could be made to expand this via a layer
of indirection, the traditional C case can not do so. Therefore of indirection, the traditional C case can not do so. Therefore
this behavior is not supported. */ this behavior is not supported. */
#ifndef STRINGIFY #ifndef STRINGIFY
# if defined(HAVE_CPP_STRINGIFY) || (defined(__GNUC__) && defined(__STDC__)) # ifdef HAVE_STRINGIZE
# define STRINGIFY(STRING) #STRING # define STRINGIFY(STRING) #STRING
# else # else
# define STRINGIFY(STRING) "STRING" # define STRINGIFY(STRING) "STRING"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment