mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
Bart 14144: fix compilation problem on current Cygwin 1.3.1 (macros were
changed to external variables and cannot be used to initialize static array). Modified by me __CYGWIN -> __CYGWIN__
This commit is contained in:
parent
bb694bad47
commit
cd5e39ef50
@ -1,3 +1,10 @@
|
||||
2001-04-30 Andrej Borsenkow <bor@zsh.org>
|
||||
|
||||
* Bart: 14144 (modified): Src/Modules/stat.c
|
||||
The S_IXUSR, S_IXGRP, S_IXOTH are made external variables in
|
||||
Cygwin 1.3.1 and cannot be used as static array initializer
|
||||
anymore.
|
||||
|
||||
2001-04-29 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* users/3837: Completion/compinit: Add `NO_kshglob' to
|
||||
|
@ -54,13 +54,33 @@ statmodeprint(mode_t mode, char *outbuf, int flags)
|
||||
}
|
||||
if (flags & STF_STRING) {
|
||||
static const char *modes = "?rwxrwxrwx";
|
||||
static const mode_t mflags[] = { S_IRUSR, S_IWUSR, S_IXUSR,
|
||||
S_IRGRP, S_IWGRP, S_IXGRP,
|
||||
S_IROTH, S_IWOTH, S_IXOTH };
|
||||
static const mode_t mflags[9] = {
|
||||
#ifdef __CYGWIN__
|
||||
0
|
||||
#else
|
||||
S_IRUSR, S_IWUSR, S_IXUSR,
|
||||
S_IRGRP, S_IWGRP, S_IXGRP,
|
||||
S_IROTH, S_IWOTH, S_IXOTH
|
||||
#endif
|
||||
};
|
||||
const mode_t *mfp = mflags;
|
||||
char pm[11];
|
||||
int i;
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
if (mflags[0] == 0) {
|
||||
mflags[0] = S_IRUSR;
|
||||
mflags[1] = S_IWUSR;
|
||||
mflags[2] = S_IXUSR;
|
||||
mflags[3] = S_IRGRP;
|
||||
mflags[4] = S_IWGRP;
|
||||
mflags[5] = S_IXGRP;
|
||||
mflags[6] = S_IROTH;
|
||||
mflags[7] = S_IWOTH;
|
||||
mflags[8] = S_IXOTH;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (S_ISBLK(mode))
|
||||
*pm = 'b';
|
||||
else if (S_ISCHR(mode))
|
||||
|
Loading…
Reference in New Issue
Block a user