Date: Mon, 7 Apr 1997 20:20:11 -0400 Message-Id: <199704080020.UAA14792@delorie.com> From: DJ Delorie To: stockton AT bcm DOT tmc DOT edu CC: djgpp AT delorie DOT com In-reply-to: <199704072228.RAA05085@ginger.imgen.bcm.tmc.edu> (stockton AT bcm DOT tmc DOT edu) Subject: Re: lstat(), S_ISLNK() and S_ISSOCK() DJGPP implements these according to the POSIX.1 spec, which is to say, not at all. POSIX states that these should not be defined if the operating system does not implement the underlying mechanism, so that programs can use #ifdef to determine if the OS really supports the operation. > In porting some software recently I noticed that several defines > and a library function were missing from the djgpp version 2 release. > These have to do with things that are currently not available through > DOS or DJGPP so could be implemented appropriately. > > lstat() - Since there are no symbolic links. Would just return > the same thing as stat() (in fact could be a define in > of "#define lstat(f,sp) stat(f,sp)") > > S_ISLNK(mode) - Should return true if 'mode' is of a symbolic link. > Since these do not exist, should always return 0. > This should be in and could be only > as "#define S_ISLNK(m) 0". > > S_ISSOCK(mode) - Should return true if 'mode' is of a socket. > Same as above.