This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Directory separator patches part 3
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Directory separator patches part 3
- From: "Mark E." <snowball3 at usa dot net>
- Date: Wed, 31 Mar 1999 11:46:05 -0500
- References: Your message of Sat, 27 Mar 1999 12:27:33 EST. <199903271727.RAA16808@out5.ibm.net>
> Don't you also need to update cppfiles.c since it groks paths in a manner
> simlar to cccp.
cppfiles.c doesn't use DIR_SEPARATOR, so my search never turned
up that file. cppinit.c also needed an adjustment.
* gcc/cppinit.c (base_name): Use HAVE_DOS_BASED_FILE_SYSTEM
in place of __MSDOS__ and _WIN32.
* gcc/cppfiles.c (simplify_pathname): Likewise.
I could have altered simplify_pathname the same way I altered its
cousin in cccp.c and eliminate the extra for loop for win32 & dos. Jeff, if
you strongly prefer this, I'll redo the patch to do that.
*** gcc/cppinit.c.orig Tue Mar 16 13:10:12 1999
--- gcc/cppinit.c Wed Mar 31 11:29:34 1999
*************** base_name (fname)
*** 434,440 ****
{
char *s = (char *)fname;
char *p;
! #if defined (__MSDOS__) || defined (_WIN32)
if (ISALPHA (s[0]) && s[1] == ':') s += 2;
if ((p = rindex (s, '\\'))) s = p + 1;
#elif defined VMS
--- 434,440 ----
{
char *s = (char *)fname;
char *p;
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
if (ISALPHA (s[0]) && s[1] == ':') s += 2;
if ((p = rindex (s, '\\'))) s = p + 1;
#elif defined VMS
*** gcc/cppfiles.c.orig Fri Mar 19 12:43:44 1999
--- gcc/cppfiles.c Wed Mar 31 11:28:18 1999
*************** simplify_pathname (path)
*** 1167,1173 ****
char *base;
int absolute = 0;
! #if defined _WIN32 || defined __MSDOS__
/* Convert all backslashes to slashes. */
for (from = path; *from; from++)
if (*from == '\\') *from = '/';
--- 1167,1173 ----
char *base;
int absolute = 0;
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Convert all backslashes to slashes. */
for (from = path; *from; from++)
if (*from == '\\') *from = '/';
---
Mark Elbrecht, snowball3@usa.net
http://snowball.digitalspace.net/