summaryrefslogtreecommitdiffstats
path: root/gcc/protoize.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r--gcc/protoize.c27
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. */
OpenPOWER on IntegriCloud