This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Fwd: [patch] Re: cpp leading / vs // bug]


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]