adapted directory test for POSIX
This commit is contained in:
parent
57790a926f
commit
df33f1eeff
1 changed files with 4 additions and 1 deletions
|
@ -62,6 +62,9 @@ typedef char BOOL;
|
||||||
#define IO_SIZE (10 * 1024)
|
#define IO_SIZE (10 * 1024)
|
||||||
|
|
||||||
#define equal(str1, str2) (!strncmp((str1), (str2), 14))
|
#define equal(str1, str2) (!strncmp((str1), (str2), 14))
|
||||||
|
#ifndef S_ISDIR
|
||||||
|
#define S_ISDIR(m) (m & S_IFDIR) /* is a directory */
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOL verbose;
|
BOOL verbose;
|
||||||
BOOL app_fl;
|
BOOL app_fl;
|
||||||
|
@ -415,7 +418,7 @@ char *mess;
|
||||||
error(FALSE, "cannot find %s\n", name);
|
error(FALSE, "cannot find %s\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (status.st_mode & S_IFDIR) {
|
else if (S_ISDIR(status.st_mode) {
|
||||||
error(FALSE, "%s is a directory (ignored)\n", name);
|
error(FALSE, "%s is a directory (ignored)\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue