aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2008-07-17 14:37:58 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2008-07-17 14:37:58 +0000
commitdd7ac7164df0afa25a779b8761673e21126bc52c (patch)
treee4650318867251b1d9bcf47a9d866d49593a7eb9
parenta7a46bb2d96c538337c19f5ba9bb55fb7b34c726 (diff)
downloadgcc-dd7ac7164df0afa25a779b8761673e21126bc52c.zip
gcc-dd7ac7164df0afa25a779b8761673e21126bc52c.tar.gz
gcc-dd7ac7164df0afa25a779b8761673e21126bc52c.tar.bz2
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
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/adaint.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 696e9d1..7b0873a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
2008-07-17 Olivier Hainque <hainque@adacore.com>
+ * 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 <hainque@adacore.com>
+
* utils.c (create_var_decl_1): Relax expectations on the PUBLIC_FLAG
argument, to apply to references in addition to definitions. Prevent
setting TREE_STATIC on externals.
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 8ace0a1..8f7bcab 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -85,7 +85,15 @@
#include "mingw32.h"
#include <sys/utime.h>
+
+/* 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 <ctype.h>
+#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