From e1b7f5b95d7d5e079224aadf0e9ab27537a83145 Mon Sep 17 00:00:00 2001 From: Thorsten Engel Date: Tue, 12 Jul 2005 16:03:32 +0000 Subject: [PATCH] S_ISBLK for Win32 + small bugfix of S_ISREG and S_ISDIR git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2192 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/compat/compat.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bacula/src/win32/compat/compat.h b/bacula/src/win32/compat/compat.h index 7a2eb7de43..abf97b796a 100644 --- a/bacula/src/win32/compat/compat.h +++ b/bacula/src/win32/compat/compat.h @@ -193,6 +193,7 @@ struct stat #undef S_IFDIR #define S_IFDIR 0040000 /* directory */ #define S_IFCHR 0020000 /* character special */ +#define S_IFBLK 0060000 /* block special */ #define S_IFIFO 0010000 /* pipe */ #undef S_IFREG #define S_IFREG 0100000 /* regular */ @@ -203,10 +204,10 @@ struct stat #define S_IRUSR S_IREAD #define S_IWUSR S_IWRITE #define S_IXUSR S_IEXEC -#define S_ISREG(x) (((x) & S_IFREG) == S_IFREG) -#define S_ISDIR(x) (((x) & S_IFDIR) == S_IFDIR) +#define S_ISREG(x) (((x) & S_IFMT) == S_IFREG) +#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR) #define S_ISCHR(x) 0 -#define S_ISBLK(x) 0 +#define S_ISBLK(x) (((x) & S_IFMT) == S_IFBLK) #define S_ISFIFO(x) 0 #endif //HAVE_MINGW -- 2.39.5