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/java | |
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/java')
-rw-r--r-- | gcc/java/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/java/jcf-path.c | 15 | ||||
-rw-r--r-- | gcc/java/jcf-write.c | 4 | ||||
-rw-r--r-- | gcc/java/jcf.h | 9 |
4 files changed, 11 insertions, 25 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 3cdbf8c..db3a7b0 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2003-07-02 Zack Weinberg <zack@codesourcery.com> + + * 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. + 2003-07-02 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_init_options): Update prototype. diff --git a/gcc/java/jcf-path.c b/gcc/java/jcf-path.c index 8771e6f..eae44c0 100644 --- a/gcc/java/jcf-path.c +++ b/gcc/java/jcf-path.c @@ -34,15 +34,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "jcf.h" -/* By default, colon separates directories in a path. */ -#ifndef PATH_SEPARATOR -#define PATH_SEPARATOR ':' -#endif - -#ifndef DIR_SEPARATOR -#define DIR_SEPARATOR '/' -#endif - #ifndef DIR_UP #define DIR_UP ".." #endif @@ -147,15 +138,15 @@ add_entry (struct entry **entp, const char *filename, int is_system) len = strlen (filename); - if (len > 4 && (COMPARE_FILENAMES (filename + len - 4, ".zip") == 0 - || COMPARE_FILENAMES (filename + len - 4, ".jar") == 0)) + if (len > 4 && (FILENAME_CMP (filename + len - 4, ".zip") == 0 + || FILENAME_CMP (filename + len - 4, ".jar") == 0)) { n->flags |= FLAG_ZIP; /* If the user uses -classpath then he'll have to include libgcj.jar in the value. We check for this in a simplistic way. Symlinks will fool this test. This is only used for -MM and -MMD, so it probably isn't terribly important. */ - if (! COMPARE_FILENAMES (filename, LIBGCJ_ZIP_FILE)) + if (! FILENAME_CMP (filename, LIBGCJ_ZIP_FILE)) n->flags |= FLAG_SYSTEM; } diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 36f009b..fcdd424 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -40,10 +40,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "ggc.h" #include "tm_p.h" -#ifndef DIR_SEPARATOR -#define DIR_SEPARATOR '/' -#endif - extern struct obstack temporary_obstack; /* Base directory in which `.class' files should be written. diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h index 962db12..9706567 100644 --- a/gcc/java/jcf.h +++ b/gcc/java/jcf.h @@ -54,15 +54,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #define JCF_USE_SCANDIR 0 #endif -/* On case-insensitive file systems, file name components must be - compared using "strcasecmp", if available, instead of "strcmp". - Assumes "config.h" has already been included. */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) && defined (HAVE_STRCASECMP) -#define COMPARE_FILENAMES(X, Y) strcasecmp ((X), (Y)) -#else -#define COMPARE_FILENAMES(X, Y) strcmp ((X), (Y)) -#endif - /* On case-insensitive file systems, we need to ensure that a request to open a .java or .class file is honored only if the file to be opened is of the exact case we are asking for. In other words, we |