diff options
author | Earnie Boyd <earnie@users.sf.net> | 2004-09-09 02:05:22 +0000 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2004-09-09 02:05:22 +0000 |
commit | bbb5869af96939fd7696df5e7d7232ad2d249179 (patch) | |
tree | 3a4d8e6c6de0c6b7591f01eb4396259d215caa3d /winsup | |
parent | 57ad1153a6308ac6ec78f17cc44e52b3ee80d55a (diff) | |
download | newlib-bbb5869af96939fd7696df5e7d7232ad2d249179.zip newlib-bbb5869af96939fd7696df5e7d7232ad2d249179.tar.gz newlib-bbb5869af96939fd7696df5e7d7232ad2d249179.tar.bz2 |
* include/sys/stat.h (_S_IFLNK): Add definition.
(S_IFLNK) Ditto.
(_lstat) Ditto.
(lstat) Ditto.
(_S_ISLNK) Recode.
(S_ISLNK) Ditto.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/mingw/ChangeLog | 11 | ||||
-rw-r--r-- | 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 b21d28a..94c6aec 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,7 +1,16 @@ 2004-09-08 Earnie Boyd <earnie@users.sf.net> + * 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 <earnie@users.sf.net> + * include/sys/stat.h (_S_ISLNK): Add definition. - (S_ISLNG): Ditto. + (S_ISLNK): Ditto. 2004-09-05 Earnie Boyd <earnie@users.sf.net> diff --git a/winsup/mingw/include/sys/stat.h b/winsup/mingw/include/sys/stat.h index 07efbb9..4793fdc 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 */ |