Mail Archives: djgpp/1997/11/05/11:02:05
Hi all!
Just ran into what looks like a bug in libc. Using 2.01, compile
the following C program:
#include <stdio.h>
int main (int argc, char ** argv)
{
int rc;
char * old, * new;
extern int errno;
if (argc != 3)
{
printf ("usage: %s old new\n", argv[0]);
exit (0);
}
old = argv[1];
new = argv[2];
rc = rename (old, new);
printf ("old=%s\nnew=%s\nrc=%d\nerrno=%d\n", old, new, rc, errno);
}
e.g.:
gcc tst.c -o tst.exe
and run it under Windoze95:
tst foo bar
Run it once with LFN=Y and once with LFN=N, and note that when LFN=Y it
fails with ERRNO 22.
It must be either a bug in _chmod() (which knows about LFN stuff) or
a real Windoze bug, I'm not good enough to determine which! :^(
Fred
PS
If any of you send a reply directly to me, please send it to my
home address (below).... Thanks!
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.---- Fred Smith / Home: fredex AT fcshome DOT stoneham DOT ma DOT us
( /__ ,__. __ __ / Office: fred AT computrition DOT com (external)
/ / / /__) / / cibos!fred (internal)
/ / (__ (___ (__(_
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Raw text -