mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
121 lines
3.9 KiB
Diff
121 lines
3.9 KiB
Diff
--- gcc-2.95.3/gcc/cccp.c Thu Jan 25 15:03:00 2001
|
|
+++ gcc/gcc/cccp.c Thu Sep 27 19:35:54 2001
|
|
@@ -85,7 +85,7 @@
|
|
|
|
/* Windows does not natively support inodes, and neither does MSDOS. */
|
|
#if (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN)) \
|
|
- || defined (__MSDOS__)
|
|
+ || defined (__MSDOS__) || defined (__amigaos__)
|
|
#define INO_T_EQ(a, b) 0
|
|
#endif
|
|
|
|
@@ -103,6 +103,11 @@
|
|
|
|
/* External declarations. */
|
|
|
|
+#ifndef OPEN_CASE_SENSITIVE
|
|
+/* Default is standard open() */
|
|
+#define OPEN_CASE_SENSITIVE open
|
|
+#endif
|
|
+
|
|
extern char *version_string;
|
|
HOST_WIDEST_INT parse_escape PROTO((char **, HOST_WIDEST_INT));
|
|
HOST_WIDEST_INT parse_c_expression PROTO((char *, int));
|
|
@@ -403,6 +408,10 @@
|
|
/* This is another place that the target system's headers might be. */
|
|
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 0, 0 },
|
|
#endif
|
|
+ /* Some systems have an extra dir of include files. */
|
|
+#ifdef SYSTEM_INCLUDE_DIR
|
|
+ { SYSTEM_INCLUDE_DIR, 0, 0, 0, 0 },
|
|
+#endif
|
|
#else /* not CROSS_COMPILE */
|
|
#ifdef LOCAL_INCLUDE_DIR
|
|
/* This should be /usr/local/include and should come before
|
|
@@ -1124,7 +1133,7 @@
|
|
printf ("Usage: %s [switches] input output\n", progname);
|
|
printf ("Switches:\n");
|
|
printf (" -include <file> Include the contents of <file> before other files\n");
|
|
- printf (" -imacros <file> Accept definition of marcos in <file>\n");
|
|
+ printf (" -imacros <file> Accept definition of macros in <file>\n");
|
|
printf (" -iprefix <path> Specify <path> as a prefix for next two options\n");
|
|
printf (" -iwithprefix <dir> Add <dir> to the end of the system include paths\n");
|
|
printf (" -iwithprefixbefore <dir> Add <dir> to the end of the main include paths\n");
|
|
@@ -1918,7 +1927,12 @@
|
|
notice ("#include <...> search starts here:\n");
|
|
if (!p->fname[0])
|
|
fprintf (stderr, " .\n");
|
|
- else if (!strcmp (p->fname, "/") || !strcmp (p->fname, "//"))
|
|
+ else if (!strcmp (p->fname, "/") || !strcmp (p->fname, "//")
|
|
+#ifdef VOL_SEPARATOR
|
|
+ /* Don't omit the last character if it's not a '/'. */
|
|
+ || p->fname[strlen (p->fname) - 1] != '/'
|
|
+#endif
|
|
+ )
|
|
fprintf (stderr, " %s\n", p->fname);
|
|
else
|
|
/* Omit trailing '/'. */
|
|
@@ -4785,6 +4799,9 @@
|
|
#ifdef DIR_SEPARATOR
|
|
if ((p = rindex (s, DIR_SEPARATOR))) s = p + 1;
|
|
#endif
|
|
+#ifdef VOL_SEPARATOR
|
|
+ if ((p = rindex (s, VOL_SEPARATOR))) s = p + 1;
|
|
+#endif
|
|
return s;
|
|
}
|
|
|
|
@@ -4794,6 +4811,7 @@
|
|
absolute_filename (filename)
|
|
char *filename;
|
|
{
|
|
+#ifndef FILE_NAME_ABSOLUTE_P
|
|
#if defined (__MSDOS__) \
|
|
|| (defined (_WIN32) && !defined (__CYGWIN__) && !defined (_UWIN))
|
|
if (ISALPHA (filename[0]) && filename[1] == ':') filename += 2;
|
|
@@ -4810,6 +4828,9 @@
|
|
if (filename[0] == DIR_SEPARATOR) return 1;
|
|
#endif
|
|
return 0;
|
|
+#else /* FILE_NAME_ABSOLUTE_P */
|
|
+ return FILE_NAME_ABSOLUTE_P (filename);
|
|
+#endif /* FILE_NAME_ABSOLUTE_P */
|
|
}
|
|
|
|
/* Returns whether or not a given character is a directory separator.
|
|
@@ -4888,10 +4909,12 @@
|
|
return to - filename;
|
|
}
|
|
}
|
|
+#if !defined (__amigaos__) /* Don't convert ':' on Amiga! */
|
|
#if defined(DIR_SEPARATOR_2)
|
|
/* Simplify to one directory separator. */
|
|
to[-1] = DIR_SEPARATOR;
|
|
#endif
|
|
+#endif
|
|
}
|
|
|
|
/* Skip /s after a /. */
|
|
@@ -5072,7 +5095,7 @@
|
|
|| ! inc->control_macro
|
|
|| (inc->control_macro[0] && ! lookup (inc->control_macro, -1, -1))) {
|
|
|
|
- fd = open (fname, O_RDONLY, 0);
|
|
+ fd = OPEN_CASE_SENSITIVE (fname, O_RDONLY, 0);
|
|
|
|
if (fd < 0)
|
|
{
|
|
@@ -10406,7 +10429,11 @@
|
|
len = simplify_filename (dir->fname);
|
|
|
|
/* Convert directory name to a prefix. */
|
|
- if (len && dir->fname[len - 1] != DIR_SEPARATOR) {
|
|
+ if (len && dir->fname[len - 1] != DIR_SEPARATOR
|
|
+#ifdef VOL_SEPARATOR
|
|
+ && dir->fname[len - 1] != VOL_SEPARATOR
|
|
+#endif
|
|
+ ) {
|
|
if (len == 1 && dir->fname[len - 1] == '.')
|
|
len = 0;
|
|
else
|