Date: Fri, 29 Jul 2005 00:05:20 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 589 ************************************************** Thursday 28 July 2005 Number 589 ************************************************** Subjects for today 1 Re: Drive letters in *nix ports : Dave Yeo" 2 Re: Drive letters in *nix ports : Paul Smedley 3 Re: Drive letters in *nix ports : Paul Smedley 4 Re: Drive letters in *nix ports : Dave Yeo" 5 Re: Drive letters in *nix ports : Paul Smedley 6 Re: Drive letters in *nix ports : illya at vaeshiep.demon.nl 7 Re: Drive letters in *nix ports : Paul Smedley 8 Re: Drive letters in *nix ports : illya at vaeshiep.demon.nl **= Email 1 ==========================** Date: Wed, 27 Jul 2005 07:46:15 -0800 From: "Dave Yeo" Subject: Re: Drive letters in *nix ports On Wed, 27 Jul 2005 20:18:13 +0930, Paul Smedley wrote: >Hi All, >Last night I compiled latest tar for OS/2 with Innotek GCC and it now >works without the at longlink at errors with the last tar on hobbes :) > >However, it chokes on drive letters, eg: >[M:\]tar -xvf e:\file.tar >tar: e\:\\file.tar: Cannot open: I/O error >tar: Error is not recoverable: exiting now > >Any hints on what to look for? Did you try the EMX solution? These may be slightly different under Innotek_libc and the code will most likely still need tweeking, see the EMX Developers Guide. #define getcwd _getcwd2 #define chdir _chdir2 Dave **= Email 2 ==========================** Date: Thu, 28 Jul 2005 05:54:34 +0930 From: Paul Smedley Subject: Re: Drive letters in *nix ports Hi John, John Poltorak wrote: > On Wed, Jul 27, 2005 at 08:18:13PM +0930, Paul Smedley wrote: >> Hi All, >> Last night I compiled latest tar for OS/2 with Innotek GCC and it now >> works without the at longlink at errors with the last tar on hobbes :) >> >> However, it chokes on drive letters, eg: >> [M:\]tar -xvf e:\file.tar >> tar: e\:\\file.tar: Cannot open: I/O error >> tar: Error is not recoverable: exiting now >> >> Any hints on what to look for? > > Did you try e:/file.tar ? Yep - same/similar thing > I managed to compile it some time ago but it always created a core dump > whenever it ran. What did you need to do to make it build? Or did it build > straight out of the box? Out of the box with innotek gcc 3.3.5r1 + moztools. No core dumps / or \ work - just no drive letters Cheers, Paul. **= Email 3 ==========================** Date: Thu, 28 Jul 2005 05:57:03 +0930 From: Paul Smedley Subject: Re: Drive letters in *nix ports Hi Dave, Dave Yeo wrote: > On Wed, 27 Jul 2005 20:18:13 +0930, Paul Smedley wrote: > >> Hi All, >> Last night I compiled latest tar for OS/2 with Innotek GCC and it now >> works without the at longlink at errors with the last tar on hobbes :) >> >> However, it chokes on drive letters, eg: >> [M:\]tar -xvf e:\file.tar >> tar: e\:\\file.tar: Cannot open: I/O error >> tar: Error is not recoverable: exiting now >> >> Any hints on what to look for? > > Did you try the EMX solution? These may be slightly different under Innotek_libc and the code will most likely still need tweeking, see the EMX Developers Guide. > #define getcwd _getcwd2 > #define chdir _chdir2 Yeah I tried adding them to config.h - and got an error as follows: U:/USR/include/stdlib.h:443: error: conflicting types for `_getcwd2' U:/USR/include/stdlib.h:381: error: previous declaration of `_getcwd2' Cheers, Paul. **= Email 4 ==========================** Date: Wed, 27 Jul 2005 18:58:04 -0800 From: "Dave Yeo" Subject: Re: Drive letters in *nix ports On Thu, 28 Jul 2005 05:57:03 +0930, Paul Smedley wrote: >Hi Dave, > >Dave Yeo wrote: >> On Wed, 27 Jul 2005 20:18:13 +0930, Paul Smedley wrote: >> >>> Hi All, >>> Last night I compiled latest tar for OS/2 with Innotek GCC and it now >>> works without the at longlink at errors with the last tar on hobbes :) >>> >>> However, it chokes on drive letters, eg: >>> [M:\]tar -xvf e:\file.tar >>> tar: e\:\\file.tar: Cannot open: I/O error >>> tar: Error is not recoverable: exiting now >>> >>> Any hints on what to look for? >> >> Did you try the EMX solution? These may be slightly different under Innotek_libc and the code will most likely still need tweeking, see the EMX Developers Guide. >> #define getcwd _getcwd2 >> #define chdir _chdir2 > >Yeah I tried adding them to config.h - and got an error as follows: >U:/USR/include/stdlib.h:443: error: conflicting types for `_getcwd2' >U:/USR/include/stdlib.h:381: error: previous declaration of `_getcwd2' According to the release notes getcwd() will now return the driveletter too (as VAC does) when not inside the unix compartement. _getcwdux() has been provided for porters which requires behaviour like the old getcwd() implementation. So perhaps you just need _chdir2. Other then that I'm not sure, good chance something needs to defined or undef Dave **= Email 5 ==========================** Date: Thu, 28 Jul 2005 18:35:46 +0930 From: Paul Smedley Subject: Re: Drive letters in *nix ports Hi Dave, Dave Yeo wrote: > On Thu, 28 Jul 2005 05:57:03 +0930, Paul Smedley wrote: > >> Hi Dave, >> >> Dave Yeo wrote: >>> On Wed, 27 Jul 2005 20:18:13 +0930, Paul Smedley wrote: >>> >>>> Hi All, >>>> Last night I compiled latest tar for OS/2 with Innotek GCC and it now >>>> works without the at longlink at errors with the last tar on hobbes :) >>>> >>>> However, it chokes on drive letters, eg: >>>> [M:\]tar -xvf e:\file.tar >>>> tar: e\:\\file.tar: Cannot open: I/O error >>>> tar: Error is not recoverable: exiting now >>>> >>>> Any hints on what to look for? >>> Did you try the EMX solution? These may be slightly different under Innotek_libc and the code will most likely still need tweeking, see the EMX Developers Guide. >>> #define getcwd _getcwd2 >>> #define chdir _chdir2 >> Yeah I tried adding them to config.h - and got an error as follows: >> U:/USR/include/stdlib.h:443: error: conflicting types for `_getcwd2' >> U:/USR/include/stdlib.h:381: error: previous declaration of `_getcwd2' > > According to the release notes > getcwd() will now return the driveletter too (as VAC does) > when not inside the unix compartement. > _getcwdux() has been provided for porters which requires > behaviour like the old getcwd() implementation. > > So perhaps you just need _chdir2. Other then that I'm not sure, good chance something needs to defined or undef I tried adding: #define chdir _chdir2 to config.h and also modified the following statments in config.h based on things that are set for dos/windows: /* Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon. */ #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 /* Define if the backslash character may also serve as a file name component separator. */ #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1 No change :( Cheers, Paul. **= Email 6 ==========================** Date: Thu, 28 Jul 2005 11:16:48 +0200 From: illya at vaeshiep.demon.nl Subject: Re: Drive letters in *nix ports Quoting Paul Smedley : > I tried adding: #define chdir _chdir2 to config.h and also modified > the following statments in config.h based on things that are set for > dos/windows: > /* Define on systems for which file names may have a so-called `drive letter' > prefix, define this to compute the length of that prefix, including the > colon. */ > #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 Then the length should be _2_ ('C' AND the colon ':'). **= Email 7 ==========================** Date: Thu, 28 Jul 2005 19:16:54 +0930 From: Paul Smedley Subject: Re: Drive letters in *nix ports Hi Ilya, illya at vaeshiep.demon.nl wrote: > Quoting Paul Smedley : >> I tried adding: #define chdir _chdir2 to config.h and also modified >> the following statments in config.h based on things that are set for >> dos/windows: >> /* Define on systems for which file names may have a so-called `drive >> letter' >> prefix, define this to compute the length of that prefix, including the >> colon. */ >> #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 > > Then the length should be _2_ ('C' AND the colon ':'). I thought the same thing at first - but checked configure for dos/windows - and it's set to 1 on those playforms. The full code from config.h is: /* Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon. */ #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 /* Define if the backslash character may also serve as a file name component separator. */ #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1 #if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX # define FILE_SYSTEM_PREFIX_LEN(Filename) \ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0) #else # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 #endif Which should take care of the 2 chars drive letter + colon prefix.. Cheers, Paul. **= Email 8 ==========================** Date: Thu, 28 Jul 2005 11:57:21 +0200 From: illya at vaeshiep.demon.nl Subject: Re: Drive letters in *nix ports Quoting Paul Smedley : >>> /* Define on systems for which file names may have a so-called >>> `drive letter' >>> prefix, define this to compute the length of that prefix, including the >>> colon. */ >>> #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 >> Then the length should be _2_ ('C' AND the colon ':'). > I thought the same thing at first - but checked configure for > dos/windows - and it's set to 1 on those playforms. In that case the comment is broken :-)