* libc/include/sys/stat.h: Use special defines for executable stat bits when

compiling for Cygwin.
* libc/include/sys/unistd.h: Use special define for X_OK when compiling for
Cygwin.
This commit is contained in:
Christopher Faylor 2001-03-05 05:13:06 +00:00
parent 306c4b6737
commit 658b5db941
3 changed files with 31 additions and 7 deletions

View File

@ -1,3 +1,10 @@
Sat Mar 3 00:34:14 2001 Christopher Faylor <cgf@cygnus.com>
* libc/include/sys/stat.h: Use special defines for executable stat bits
when compiling for Cygwin.
* libc/include/sys/unistd.h: Use special define for X_OK when compiling
for Cygwin.
2001-03-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/strtok.c: Add #undef of __STRICT_ANSI__ so prototype

View File

@ -68,7 +68,6 @@ struct stat
#define S_IREAD 0000400 /* read permission, owner */
#define S_IWRITE 0000200 /* write permission, owner */
#define S_IEXEC 0000100 /* execute/search permission, owner */
#define S_ENFMT 0002000 /* enforcement-mode locking */
#define S_IFMT _IFMT
@ -94,18 +93,30 @@ struct stat
#define _S_IEXEC 0000100
#endif
#define S_IRWXU 0000700 /* rwx, owner */
#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
#define S_IRUSR 0000400 /* read permission, owner */
#define S_IWUSR 0000200 /* write permission, owner */
#define S_IXUSR 0000100 /* execute/search permission, owner */
#define S_IRWXG 0000070 /* rwx, group */
#define S_IXUSR 0000100/* execute/search permission, owner */
#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
#define S_IRGRP 0000040 /* read permission, group */
#define S_IWGRP 0000020 /* write permission, grougroup */
#define S_IXGRP 0000010 /* execute/search permission, group */
#define S_IRWXO 0000007 /* rwx, other */
#define S_IXGRP 0000010/* execute/search permission, group */
#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
#define S_IROTH 0000004 /* read permission, other */
#define S_IWOTH 0000002 /* write permission, other */
#define S_IXOTH 0000001 /* execute/search permission, other */
#define S_IXOTH 0000001/* execute/search permission, other */
#if defined (__CYGWIN__) && !defined (__INSIDE_CYGWIN__)
extern unsigned const _cygwin_S_IEXEC, _cygwin_S_IXUSR, _cygwin_S_IXGRP, _cygwin_S_IXOTH;
#undef S_IEXEC
#undef S_IXUSR
#undef S_IXGRP
#undef S_IXOTH
#define S_IEXEC _cygwin_S_IEXEC
#define S_IXUSR _cygwin_S_IXUSR
#define S_IXGRP _cygwin_S_IXGRP
#define S_IXOTH _cygwin_S_IXOTH
#endif
#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)

View File

@ -137,6 +137,12 @@ int _EXFUN(symlink, (const char *__name1, const char *__name2));
# define W_OK 2
# define X_OK 1
#if defined (__CYGWIN__) && !defined (__INSIDE_CYGWIN__)
# undef X_OK
# define X_OK _cygwin_X_OK
extern const unsigned _cygwin_X_OK;
#endif
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2