From bbb5869af96939fd7696df5e7d7232ad2d249179 Mon Sep 17 00:00:00 2001 From: Earnie Boyd Date: Thu, 9 Sep 2004 02:05:22 +0000 Subject: [PATCH] * include/sys/stat.h (_S_IFLNK): Add definition. (S_IFLNK) Ditto. (_lstat) Ditto. (lstat) Ditto. (_S_ISLNK) Recode. (S_ISLNK) Ditto. --- winsup/mingw/ChangeLog | 11 ++++++++++- winsup/mingw/include/sys/stat.h | 8 ++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index b21d28a9f..94c6aec72 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,7 +1,16 @@ +2004-09-08 Earnie Boyd + + * include/sys/stat.h (_S_IFLNK): Add definition. + (S_IFLNK) Ditto. + (_lstat) Ditto. + (lstat) Ditto. + (_S_ISLNK) Recode. + (S_ISLNK) Ditto. + 2004-09-08 Earnie Boyd * include/sys/stat.h (_S_ISLNK): Add definition. - (S_ISLNG): Ditto. + (S_ISLNK): Ditto. 2004-09-05 Earnie Boyd diff --git a/winsup/mingw/include/sys/stat.h b/winsup/mingw/include/sys/stat.h index 07efbb906..4793fdc58 100644 --- a/winsup/mingw/include/sys/stat.h +++ b/winsup/mingw/include/sys/stat.h @@ -26,6 +26,7 @@ /* * Constants for the stat st_mode member. */ +#define _S_IFLNK 0xF000 /* Pretend */ #define _S_IFIFO 0x1000 /* FIFO */ #define _S_IFCHR 0x2000 /* Character */ #define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */ @@ -48,10 +49,11 @@ #define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR) #define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK) #define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) -#define _S_ISLNK(m) (false) +#define _S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK) // Should always be zero. #ifndef _NO_OLDNAMES +#define S_IFLNK _S_IFLNK #define S_IFIFO _S_IFIFO #define S_IFCHR _S_IFCHR #define S_IFBLK _S_IFBLK @@ -71,7 +73,7 @@ #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#define S_ISLNK(m) (false) +#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) // Should always be zero. #endif /* Not _NO_OLDNAMES */ @@ -157,6 +159,7 @@ extern "C" { _CRTIMP int __cdecl _fstat (int, struct _stat*); _CRTIMP int __cdecl _chmod (const char*, int); _CRTIMP int __cdecl _stat (const char*, struct _stat*); +#define _lstat _stat #ifndef _NO_OLDNAMES @@ -164,6 +167,7 @@ _CRTIMP int __cdecl _stat (const char*, struct _stat*); _CRTIMP int __cdecl fstat (int, struct stat*); _CRTIMP int __cdecl chmod (const char*, int); _CRTIMP int __cdecl stat (const char*, struct stat*); +#define lstat stat #endif /* Not _NO_OLDNAMES */