Mail Archives: djgpp/2001/06/06/13:45:46
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 -