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: cccp.c fix for VMS


As always, theres still one bug hiding in every piece of code ...
 
egcs cpp on vms fails if an include path is given in vms style
(via -I[dir]) mixed with unix style (via include <dir/file>)
 
Here is a patch
 
 
Tue Jun 30 10:10:42 1998  Klaus Kaempf (kkaempf@rmi.de)
 
    * (hack_vms_include_specification): Honor mixed vms/unix paths

Index: egcs/gcc/cccp.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cccp.c,v
retrieving revision 1.29
diff -c -p -r1.29 cccp.c
*** cccp.c 1998/06/28 06:09:45 1.29
--- cccp.c 1998/06/30 07:58:36
*************** hack_vms_include_specification (fullname
*** 10371,10377 ****
   }
        else if ((first_slash[-1] != '.')  /* keep ':/', './' */
       && (first_slash[-1] != ':')
!      && (first_slash[-1] != ']')) /* or a vms path  */
   {
     *first_slash = ':';
   }
--- 10370,10376 ----
   }
        else if ((first_slash[-1] != '.')  /* keep ':/', './' */
       && (first_slash[-1] != ':')
!      && (index (fullname, ']') == 0)) /* or a vms path  */
   {
     *first_slash = ':';
   }
*************** hack_vms_include_specification (fullname
*** 10438,10444 ****
      with the /include (-I) switch on the command line.  */
 
     basename -= 1; /* Strip "]" */
-    unixname--;  /* backspace */
   }
        else
   {
--- 10437,10442 ----
*************** hack_vms_include_specification (fullname
*** 10508,10514 ****
        /* As long as there are still subdirectories to add, do them.  */
        while (index (unixname, '/') != 0)
   {
!    /* If this token is "." we can ignore it
          if it's not at the beginning of a path.  */
     if ((unixname[0] == '.') && (unixname[1] == '/'))
       {
--- 10506,10512 ----
        /* As long as there are still subdirectories to add, do them.  */
        while (index (unixname, '/') != 0)
   {
!    /* If this token is "./" we can ignore it
          if it's not at the beginning of a path.  */
     if ((unixname[0] == '.') && (unixname[1] == '/'))
       {
---
Klaus Kaempf   kkaempf@rmi.de
Jakobstr. 181
D-52064 Aachen   Yes, my email account changed.

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