Commit a12b5bd9 by Zack Weinberg Committed by Zack Weinberg

configure.in: Check for system-provided 'uchar' type.

	* configure.in: Check for system-provided 'uchar' type.
	* configure, config.in: Regenerate.
	* cpphash.h: Only typedef 'uchar' if the system doesn't.

From-SVN: r61516
parent da8a6064
2003-01-20 Zack Weinberg <zack@codesourcery.com> 2003-01-20 Zack Weinberg <zack@codesourcery.com>
* configure.in: Check for system-provided 'uchar' type. * configure.in: Check for system-provided 'uchar' type.
* configure: Regenerate. * configure, config.in: Regenerate.
* cpphash.h: Only typedef 'uchar' if the system doesn't. * cpphash.h: Only typedef 'uchar' if the system doesn't.
2003-01-20 Richard Henderson <rth@redhat.com> 2003-01-20 Richard Henderson <rth@redhat.com>
......
/* config.in. Generated automatically from configure.in by autoheader. */ /* config.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if using alloca.c. */ /* Define if using alloca.c. */
#undef C_ALLOCA #undef C_ALLOCA
...@@ -498,6 +498,9 @@ ...@@ -498,6 +498,9 @@
/* Define if <time.h> defines clock_t. */ /* Define if <time.h> defines clock_t. */
#undef HAVE_CLOCK_T #undef HAVE_CLOCK_T
/* Define if <sys/types.h> defines `uchar'. */
#undef HAVE_UCHAR
/* Define .init_array/.fini_array sections are available and working. */ /* Define .init_array/.fini_array sections are available and working. */
#undef HAVE_INITFINI_ARRAY #undef HAVE_INITFINI_ARRAY
......
...@@ -792,6 +792,19 @@ if test $gcc_cv_type_clock_t = yes; then ...@@ -792,6 +792,19 @@ if test $gcc_cv_type_clock_t = yes; then
[Define if <time.h> defines clock_t.]) [Define if <time.h> defines clock_t.])
fi fi
AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
[AC_TRY_COMPILE([
#include "ansidecl.h"
#include "system.h"
],
[if ((uchar *)0) return 0;
if (sizeof(uchar)) return 0;],
ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
if test $ac_cv_type_uchar = yes; then
AC_DEFINE(HAVE_UCHAR, 1,
[Define if <sys/types.h> defines \`uchar'.])
fi
# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
......
...@@ -29,7 +29,9 @@ struct directive; /* Deliberately incomplete. */ ...@@ -29,7 +29,9 @@ struct directive; /* Deliberately incomplete. */
struct pending_option; struct pending_option;
struct op; struct op;
#ifndef HAVE_UCHAR
typedef unsigned char uchar; typedef unsigned char uchar;
#endif
#define U (const uchar *) /* Intended use: U"string" */ #define U (const uchar *) /* Intended use: U"string" */
#define BITS_PER_CPPCHAR_T (CHAR_BIT * sizeof (cppchar_t)) #define BITS_PER_CPPCHAR_T (CHAR_BIT * sizeof (cppchar_t))
......
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