mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 23:26:49 +08:00
cccp.c (simplify_filename): Always preserve leading double slash.
Wed Apr 21 12:09:38 1999 Mumit Khan <khan@xraylith.wisc.edu> * cccp.c (simplify_filename): Always preserve leading double slash. From-SVN: r26573
This commit is contained in:
parent
c540cf3bc9
commit
4cd4ea9101
@ -1,3 +1,7 @@
|
||||
Wed Apr 21 12:09:38 1999 Mumit Khan <khan@xraylith.wisc.edu>
|
||||
|
||||
* cccp.c (simplify_filename): Always preserve leading double slash.
|
||||
|
||||
Wed Apr 21 18:15:55 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
|
||||
|
||||
* config/c4x/c4x.md: Add new peepholes to remove redundant loads.
|
||||
|
13
gcc/cccp.c
13
gcc/cccp.c
@ -4832,18 +4832,7 @@ simplify_filename (filename)
|
||||
else
|
||||
{
|
||||
/* On some hosts // differs from /; Posix allows this. */
|
||||
static int slashslash_vs_slash;
|
||||
if (slashslash_vs_slash == 0)
|
||||
{
|
||||
struct stat s1, s2;
|
||||
slashslash_vs_slash = ((stat ("/", &s1) == 0
|
||||
&& stat ("//", &s2) == 0
|
||||
&& INO_T_EQ (s1.st_ino, s2.st_ino)
|
||||
&& s1.st_dev == s2.st_dev)
|
||||
? 1 : -1);
|
||||
}
|
||||
if (slashslash_vs_slash < 0)
|
||||
*to++ = DIR_SEPARATOR;
|
||||
*to++ = DIR_SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user