This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fwd: [patch] Re: cpp leading / vs // bug]
- To: khan at xraylith dot wisc dot edu, egcs-patches at cygnus dot com
- Subject: Re: [Fwd: [patch] Re: cpp leading / vs // bug]
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Wed, 21 Apr 1999 12:12:38 -0400
- Organization: Cygnus Solutions Canada Ltd
- References: <371B7B08.43E22A73@cygnus.com>
I just installed this.
Dave
Dave Brolley wrote:
> Hi Mumit,
>
> Looks OK. Can you install it, or do you need me to do it?
>
> Dave
>
> >Ah, sure enough. The following makes the corresponding change in
> cccp.c.
> >
> >This patchlet preserves leading double-slash (or whatever the
> directory
> >separator is) for all platforms. This is also consistent with
> behaviour
> >currently in the cppfiles version.
> >
> >Mon Apr 19 13:10:28 1999 Mumit Khan <khan@xraylith.wisc.edu>
> >
> > * cccp.c (simplify_filename): Always preserve leading double
> slash.
> >
> >Index: cccp.c
> >===================================================================
> >RCS file: /cvs/egcs/egcs/gcc/cccp.c,v
> >retrieving revision 1.68
> >diff -u -3 -p -r1.68 cccp.c
> >--- cccp.c 1999/04/17 07:16:26 1.68
> >+++ cccp.c 1999/04/19 18:10:21
> >@@ -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;
> > }
> > }
> > }
> >
> >Regards,
> >Mumit