diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-11-28 14:58:08 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-11-28 09:58:08 -0500 |
commit | c5c0b3d96ce12e0d396b0d2181fbed578191de87 (patch) | |
tree | 5f103e128799a70a1832432704583e13f433de18 /gcc/system.h | |
parent | bb92901dc0ff3fbdb21532566a4f46d197fd55e6 (diff) | |
download | gcc-c5c0b3d96ce12e0d396b0d2181fbed578191de87.zip gcc-c5c0b3d96ce12e0d396b0d2181fbed578191de87.tar.gz gcc-c5c0b3d96ce12e0d396b0d2181fbed578191de87.tar.bz2 |
system.h (IS_DIR_SEPARATOR): Use uppercase macro name.
* system.h (IS_DIR_SEPARATOR): Use uppercase macro name.
(IS_ABSOLUTE_PATHNAME): New macro.
* gcc.c (find_a_file, process_command, do_spec_1, main): Use it.
From-SVN: r37818
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/system.h b/gcc/system.h index 20531dd..59caf48 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -538,12 +538,25 @@ extern void abort PARAMS ((void)); /* Define IS_DIR_SEPARATOR. */ #ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +# define IS_DIR_SEPARATOR(CH) ((CH) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +# define IS_DIR_SEPARATOR(CH) \ + (((CH) == DIR_SEPARATOR) || ((CH) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ +/* Say how to test for an absolute pathname. On Unix systems, this is if + it starts with a leading slash or a '$', the latter meaning the value of + an environment variable is to be used. On machien with DOS-based + file systems, it is also absolute if it starts with a drive identifier. */ +#ifdef HAVE_DOS_BASED_FILE_SYSTEM +#define IS_ABSOLUTE_PATHNAME(STR) \ + (IS_DIR_SEPARATOR ((STR)[0]) || (STR)[0] == '$' \ + || ((STR)[0] != '\0' && (STR)[1] == ':' && IS_DIR_SEPARATOR ((STR)[2]))) +#else +#define IS_ABSOLUTE_PATHNAME(STR) \ + (IS_DIR_SEPARATOR ((STR)[0]) || (STR)[0] == '$') +#endif + /* Get libiberty declarations. */ #include "libiberty.h" |