This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

stat() bug?


Greetings,

  I don't know if this is expected behaviour under Unix or not (I'm an NT
kind of guy) but I think this is a bug: stat() with an empty file name
returns 0. This is reproducible with:

#include <sys/stat.h>

int main( void )
{
int rc ;
struct stat	statBuffer ;

  rc = stat( "", &statBuffer ) ;
  return ( 0 ) ;
}

When compiled with gcc 2.7-B19, rc is 0. The same code compiled with Borland
C++ V5.02 returns -1.

Is this a Unix-ism, or did I find an oops?

Regards,

  Dan Haynes


	

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]