Subject: rename() bug ?? To: djgpp AT delorie DOT com Date: Wed, 5 Nov 1997 09:59:04 -0500 (EST) From: fred smith Cc: fredex AT fcshome DOT stoneham DOT ma DOT us Reply-to: fred AT computrition DOT com Content-Type: text Message-ID: <9711050959.aa21829@ciifdev.cibos.computrition.com> Precedence: bulk Hi all! Just ran into what looks like a bug in libc. Using 2.01, compile the following C program: #include 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) / / (__ (___ (__(_ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -