X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Faccess.c;h=6c4df591784a074575d71c1727edd5fde7cd0354;hp=b96898a63532021591666c8037a863e496719076;hb=331f875facea2b7897c1ce0425ce0d111cc4175b;hpb=d1a026123ac051716cdc16278345c1fb5c843b79 diff --git a/ncurses/tinfo/access.c b/ncurses/tinfo/access.c index b96898a6..6c4df591 100644 --- a/ncurses/tinfo/access.c +++ b/ncurses/tinfo/access.c @@ -33,11 +33,10 @@ #include #include -#include #include -MODULE_ID("$Id: access.c,v 1.18 2011/05/28 23:05:12 tom Exp $") +MODULE_ID("$Id: access.c,v 1.20 2011/06/05 00:48:00 tom Exp $") #ifdef __TANDEM #define ROOT_UID 65535 @@ -150,7 +149,7 @@ _nc_is_dir_path(const char *path) struct stat sb; if (stat(path, &sb) == 0 - && (sb.st_mode & S_IFMT) == S_IFDIR) { + && S_ISDIR(sb.st_mode)) { result = TRUE; } return result; @@ -163,7 +162,7 @@ _nc_is_file_path(const char *path) struct stat sb; if (stat(path, &sb) == 0 - && (sb.st_mode & S_IFMT) == S_IFREG) { + && S_ISREG(sb.st_mode)) { result = TRUE; } return result;