From: Olivier Hainque Date: Thu, 17 Jul 2008 14:37:58 +0000 (+0000) Subject: adaint.c (__MINGW32__ section): Include ctype.h and define a fallback ISALPHA if... X-Git-Tag: releases/gcc-4.4.0~3805 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd7ac7164df0afa25a779b8761673e21126bc52c;p=thirdparty%2Fgcc.git adaint.c (__MINGW32__ section): Include ctype.h and define a fallback ISALPHA if IN_RTS. * adaint.c (__MINGW32__ section): Include ctype.h and define a fallback ISALPHA if IN_RTS. (__gnat_is_absolute_path): Use ISALPHA instead of isalpha. From-SVN: r137924 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 696e9d1423c5..7b0873a86a40 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2008-07-17 Olivier Hainque + + * adaint.c (__MINGW32__ section): Include ctype.h and define + a fallback ISALPHA if IN_RTS. + (__gnat_is_absolute_path): Use ISALPHA instead of isalpha. + 2008-07-17 Olivier Hainque * utils.c (create_var_decl_1): Relax expectations on the PUBLIC_FLAG diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 8ace0a1c8271..8f7bcab516fe 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -85,7 +85,15 @@ #include "mingw32.h" #include + +/* For isalpha-like tests in the compiler, we're expected to resort to + safe-ctype.h/ISALPHA. This isn't available for the runtime library + build, so we fallback on ctype.h/isalpha there. */ + +#ifdef IN_RTS #include +#define ISALPHA isalpha +#endif #elif defined (__Lynx__) @@ -1642,7 +1650,7 @@ __gnat_is_absolute_path (char *name, int length) return (length != 0) && (*name == '/' || *name == DIR_SEPARATOR #if defined (__EMX__) || defined (MSDOS) || defined (WINNT) - || (length > 1 && isalpha (name[0]) && name[1] == ':') + || (length > 1 && ISALPHA (name[0]) && name[1] == ':') #endif ); #endif