Mail Archives: djgpp/1996/02/22/14:38:11
I am new to GNU and gcc.
I am trying to use gcc under NT 3.51 and I am having problems with LFN
support. Here is a small program example with its output. My main question
is: How do I get stat() to return the expected values?
#include <stdio.h>
#include <sys\stat.h>
#include <libc\dosio.h>
struct stat sbuf;
int main ( int argc, char *argv[] ) {
int retval;
printf( "LFN=%d\n", _use_lfn() );
retval = stat("test.c", &sbuf);
printf( "retval(test.c)=%d\n", retval );
retval = stat("RCS\\test.c,v", &sbuf);
printf( "retval(RCS\\test.c,v)=%d\n", retval );
retval = stat("RCS/test.c,v", &sbuf);
printf( "retval(RCS/test.c,v)=%d\n", retval );
retval = stat("c:\\rcs\\rcs-5.7\\src\\RCS\\test.c,v", &sbuf);
printf( "retval(c:\\rcs\\rcs-5.7\\src\\RCS\\test.c,v)=%d\n", retval );
retval = stat("c:/rcs/rcs-5.7/src/RCS/test.c,v", &sbuf);
printf( "retval(c:/rcs/rcs-5.7/src/RCS/test.c,v)=%d\n", retval );
retval = stat("RCS\\TEST~1.C_V", &sbuf);
printf( "retval(RCS\\TEST~1.C_V)=%d\n", retval );
}
OUTPUT:
LFN=0
retval(test.c)=0
retval(RCS\test.c,v)=-1
retval(RCS/test.c,v)=-1
retval(c:\rcs\rcs-5.7\src\RCS\test.c,v)=-1
retval(c:/rcs/rcs-5.7/src/RCS/test.c,v)=-1
retval(RCS\TEST~1.C_V)=0
=============================================
Joel Gerstein v 510.244.5696
Internet Mobility Corp. f 510.225.1001
joel AT imobility DOT com Sky Page 1907746
- Raw text -