Francois Gouget : msvcrt: Remove the S_ISXXX() macros as they are not present in the Visual C++ headers.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 22 06:59:55 CDT 2007


Module: wine
Branch: master
Commit: 784693bb5a71478de81c6960f51e989a9d35125c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=784693bb5a71478de81c6960f51e989a9d35125c

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon May 21 16:04:12 2007 +0200

msvcrt: Remove the S_ISXXX() macros as they are not present in the Visual C++ headers.

---

 dlls/msvcrt/tests/file.c  |    2 +-
 include/msvcrt/sys/stat.h |    5 -----
 2 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index d7d7676..9b5538f 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -809,7 +809,7 @@ static void test_stat(void)
     {
         if (fstat(fd, &buf) == 0)
         {
-            if (S_ISREG(buf.st_mode))
+            if ((buf.st_mode & _S_IFMT) == _S_IFREG)
             {
                 ok(buf.st_dev == 0, "st_dev is %d, expected 0\n", buf.st_dev);
                 ok(buf.st_dev == buf.st_rdev, "st_dev (%d) and st_rdev (%d) differ\n",
diff --git a/include/msvcrt/sys/stat.h b/include/msvcrt/sys/stat.h
index a81a9ec..9ab0edc 100644
--- a/include/msvcrt/sys/stat.h
+++ b/include/msvcrt/sys/stat.h
@@ -164,11 +164,6 @@ int _wstat64(const wchar_t*,struct _stat64*);
 #define S_IWRITE _S_IWRITE
 #define S_IEXEC  _S_IEXEC
 
-#define	S_ISCHR(m)	(((m)&_S_IFMT) == _S_IFCHR)
-#define	S_ISDIR(m)	(((m)&_S_IFMT) == _S_IFDIR)
-#define	S_ISFIFO(m)	(((m)&_S_IFMT) == _S_IFIFO)
-#define	S_ISREG(m)	(((m)&_S_IFMT) == _S_IFREG)
-
 static inline int fstat(int fd, struct stat* ptr) { return _fstat(fd, (struct _stat*)ptr); }
 static inline int stat(const char* path, struct stat* ptr) { return _stat(path, (struct _stat*)ptr); }
 #ifndef _UMASK_DEFINED




More information about the wine-cvs mailing list