delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/06/13:45:46

From: pavenis AT lanet DOT lv
To: "Alex Oleynikov" <alex AT compuweigh DOT com>, djgpp AT delorie DOT com
Date: Wed, 6 Jun 2001 20:45:30 +0300
MIME-Version: 1.0
Subject: Re: DJGPP on PTS-DOS run problem
Message-ID: <3B1E966A.4769.19AA930@localhost>
In-reply-to: <000e01c0ee93$c79248f0$1400a8c0@alex2000>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 6 Jun 2001, at 10:20, Alex Oleynikov wrote:

> Guys, thank you for the helpful guidance!
> After I upgraded to gcc-2.95.3 everything started to work fine.

I still recommend to find a reason of this problem with simple examples
as this could be a problem with PTS-DOS. Otherwise I'm afraid we'll run
into the same problem with gcc-3.0 when it will be released.

Below is simple example (You could try also to generate absolute path 
instead of relative one)

Andris

#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <sys/stat.h>

int main (int argc, char * argv[])
{
    char  fname [FILENAME_MAX];
    (void) argc;
    mkdir ("foo",0755);
    strcpy (fname, "foo/../");
    strcat (fname, basename(argv[0]));
    assert (access(fname,0)==0);
    rmdir ("foo");	
    return 0;
}



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019