diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-07-03 04:24:01 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-07-03 04:24:01 +0000 |
commit | 3dce14083fc35cc2b60906577cf797e0ae49f1b8 (patch) | |
tree | 37ea22037f920e97ce155abc8dd8f4290af8dba6 /gcc/system.h | |
parent | bacb96b24f038ebc8072abfcdb145ff6568a8554 (diff) | |
download | gcc-3dce14083fc35cc2b60906577cf797e0ae49f1b8.zip gcc-3dce14083fc35cc2b60906577cf797e0ae49f1b8.tar.gz gcc-3dce14083fc35cc2b60906577cf797e0ae49f1b8.tar.bz2 |
system.h: Include filenames.h.
* system.h: Include filenames.h.
(IS_DIR_SEPARATOR, IS_ABSOLUTE_PATHNAME): Don't define.
(DIR_SEPARATOR, DIR_SEPARATOR_2): If not already defined,
define based on HAVE_DOS_BASED_FILE_SYSTEM.
* config/i386/xm-cygwin.h, config/i386/xm-djgpp.h
* config/i386/xm-mingw32.h: Don't define
HAVE_DOS_BASED_FILE_SYSTEM,
DIR_SEPARATOR, or DIR_SEPARATOR_2.
* doc/hostconfig.texi: Update to match.
* cppfiles.c, gcc.c, gensupport.c, protoize.c,
config/i386/cygwin.h:
Use IS_ABSOLUTE_PATH throughout.
* gcc.c (DIR_UP): Delete, unused.
* protoize.c (IS_SAME_PATH): Define in terms of
FILENAME_CMP.
(is_abspath): Delete.
java:
* jcf-path.c: Don't default-define PATH_SEPARATOR nor
DIR_SEPARATOR.
Use FILENAME_CMP.
* jcf-write.c: Don't default-define DIR_SEPARATOR.
* jcf.h: Delete COMPARE_FILENAMES definition.
From-SVN: r68863
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/gcc/system.h b/gcc/system.h index 369f566..67ddaff 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -458,29 +458,15 @@ extern void abort (void); #define PATH_SEPARATOR ':' #endif +/* Filename handling macros. */ +#include "filenames.h" + +/* These should be phased out in favor of IS_DIR_SEPARATOR, where possible. */ #ifndef DIR_SEPARATOR -#define DIR_SEPARATOR '/' -#endif - -/* Define IS_DIR_SEPARATOR. */ -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(CH) ((CH) == DIR_SEPARATOR) -#else /* 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 machine 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] == '$') +# define DIR_SEPARATOR '/' +# ifdef HAVE_DOS_BASED_FILE_SYSTEM +# define DIR_SEPARATOR_2 '\\' +# endif #endif /* Get libiberty declarations. */ |