diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-03 04:24:01 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-03 04:24:01 +0000 |
commit | a5c088d4e31bf3257217d2f368dca57c18e9d98e (patch) | |
tree | 37ea22037f920e97ce155abc8dd8f4290af8dba6 /gcc/protoize.c | |
parent | eeaf6b144edb90ff6ff95822bab05f1470afb521 (diff) | |
download | gcc-a5c088d4e31bf3257217d2f368dca57c18e9d98e.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r-- | gcc/protoize.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c index e89aa73efec..2f86de7106c 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -48,11 +48,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #endif /* Macro to see if the paths match. */ -#ifdef HAVE_DOS_BASED_FILE_SYSTEM -#define IS_SAME_PATH(a,b) (strcasecmp (a, b) == 0) -#else -#define IS_SAME_PATH(a,b) (strcmp (a, b) == 0) -#endif +#define IS_SAME_PATH(a,b) (FILENAME_CMP (a, b) == 0) /* Suffix for aux-info files. */ #ifdef __MSDOS__ @@ -94,7 +90,6 @@ static int directory_specified_p PARAMS ((const char *)); static int file_excluded_p PARAMS ((const char *)); static char *unexpand_if_needed PARAMS ((const char *)); static char *abspath PARAMS ((const char *, const char *)); -static int is_abspath PARAMS ((const char *)); static void check_aux_info PARAMS ((int)); static const char *find_corresponding_lparen PARAMS ((const char *)); static int referenced_file_is_newer PARAMS ((const char *, time_t)); @@ -694,7 +689,7 @@ in_system_include_dir (path) { const struct default_include *p; - if (! is_abspath (path)) + if (! IS_ABSOLUTE_PATH (path)) abort (); /* Must be an absolutized filename. */ for (p = cpp_include_defaults; p->fname; p++) @@ -1114,20 +1109,6 @@ continue_outer: ; return (got_unexpanded ? savestring (line_buf, copy_p - line_buf) : 0); } -/* Return 1 if pathname is absolute. */ - -static int -is_abspath (path) - const char *path; -{ - return (IS_DIR_SEPARATOR (path[0]) -#ifdef HAVE_DOS_BASED_FILE_SYSTEM - /* Check for disk name on MS-DOS-based systems. */ - || (path[0] && path[1] == ':' && IS_DIR_SEPARATOR (path[2])) -#endif - ); -} - /* Return the absolutized filename for the given relative filename. Note that if that filename is already absolute, it may still be returned in a modified form because this routine also @@ -1156,7 +1137,7 @@ abspath (cwd, rel_filename) { const char *src_p; - if (! is_abspath (rel_filename)) + if (! IS_ABSOLUTE_PATH (rel_filename)) { src_p = cwd2; while ((*endp++ = *src_p++)) @@ -2264,7 +2245,7 @@ start_over: ; continue; aux_info_second_line = p; aux_info_relocated_name = 0; - if (! is_abspath (invocation_filename)) + if (! IS_ABSOLUTE_PATH (invocation_filename)) { /* INVOCATION_FILENAME is relative; append it to BASE_SOURCE_FILENAME's dir. */ |