[omniORB] omkdepend.exe not liked by latest Cygwin

Carl Thompson cet@carlthompson.net
Fri, 19 Oct 2001 21:42:59 -0700


This is a multi-part message in MIME format.
--------------090802080008050402070103
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

The latest Cygwin does not like omkdepend.exe because Cygwin no longer 
allows drives to be referenced using the "//X" prefix (where "X" is the 
drive letter).  You must now use "/cygdrive/X" instead.  Sigh.  I have 
attached a patch for "src/tool/omkdepend/gnuwin32.c" to fix the problem. 
  The file "src/tool/dir.mk" also needs to modified to build the tool 
under Windows.  This should work under older versions of Cygwin too but 
I haven't tested it.

Thanks,
Carl Thompson

--------------090802080008050402070103
Content-Type: text/plain;
 name="gnuwin32.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gnuwin32.c.diff"

*** gnuwin32.c.old	Tue Jul  4 08:22:48 2000
--- gnuwin32.c	Fri Oct 19 18:32:30 2001
***************
*** 74,87 ****
      }
    }
  
!   /* Any residue dos drive, i.e. [A-Za-z]:, convert to //[A-Za-z]
     */
    if (strlen(out) >= 2 && out[1] == ':') {
!     char* newout = malloc(strlen(out) + 2);
!     newout[0] = '/';
!     newout[1] = '/';
!     newout[2] = out[0];
!     newout[3] = '\0';
      strcat(newout,out+2);
      out = newout;
    }
--- 74,84 ----
      }
    }
  
!   /* Any residue dos drive, i.e. [A-Za-z]:, convert to /cygdrive/[A-Za-z]
     */
    if (strlen(out) >= 2 && out[1] == ':') {
!     char* newout = malloc(strlen(out) + 10);
!     sprintf(newout, "/cygdrive/%c", out[0]);
      strcat(newout,out+2);
      out = newout;
    }
***************
*** 108,114 ****
  
    for (c = 'A'; c <= 'Z'; c++) {
      unix[nmounts] = (char *)malloc(5);
!     sprintf(unix[nmounts], "//%c/", c);
      dos[nmounts] = (char *)malloc(4);
      sprintf(dos[nmounts], "%c:/", c);
      index[nmounts] = nmounts;
--- 105,111 ----
  
    for (c = 'A'; c <= 'Z'; c++) {
      unix[nmounts] = (char *)malloc(5);
!     sprintf(unix[nmounts], "/cygdrive/%c/", c);
      dos[nmounts] = (char *)malloc(4);
      sprintf(dos[nmounts], "%c:/", c);
      index[nmounts] = nmounts;
***************
*** 117,123 ****
  
    for (c = 'a'; c <= 'z'; c++) {
      unix[nmounts] = (char *)malloc(5);
!     sprintf(unix[nmounts], "//%c/", c);
      dos[nmounts] = (char *)malloc(4);
      sprintf(dos[nmounts], "%c:/", c);
      index[nmounts] = nmounts;
--- 114,120 ----
  
    for (c = 'a'; c <= 'z'; c++) {
      unix[nmounts] = (char *)malloc(5);
!     sprintf(unix[nmounts], "/cygdrive/%c/", c);
      dos[nmounts] = (char *)malloc(4);
      sprintf(dos[nmounts], "%c:/", c);
      index[nmounts] = nmounts;

--------------090802080008050402070103--