Mail Archives: djgpp-workers/1999/06/14/09:24:31
--Message-Boundary-14463
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
Hi!
Rename returns invalid value in errno under Win95 when attempting
to rename already opened file (I got ENOENT, should be
EACCES). Test example included in attachment.
I used libc.a from CVS version (updated in June 12th) compiled
with gcc-2.95 19990608 (prerelease)
Andris
--Message-Boundary-14463
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: ren_test.cc
Date: 14 Jun 1999, 16:17
Size: 406 bytes.
Type: Text
--Message-Boundary-14463
Content-type: Application/Octet-stream; name="ren_test.cc"; type=Text
Content-disposition: attachment; filename="ren_test.cc"
#include <stdio.h>
#include <errno.h>
#include <fstream>
void mkTestFile (void)
{
ofstream output ("test.dat");
output << "test.dat";
}
int main (void)
{
mkTestFile ();
FILE * test = fopen ("test.dat","r");
int rc = rename ("test.dat","foo.dat");
if (rc) perror ("rename(\"test.dat\",\"foo.dat\")");
fclose (test);
return 0;
}
--Message-Boundary-14463--
- Raw text -