summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-02-04 11:30:18 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-02-04 11:51:07 (GMT)
commitbc1638138b71adf056f5972b7b1239f4eeffcfec (patch)
tree7e28a62fb3b6014e2176994fdd3692a6752f6d93 /src/gui/text
parent417e269c648fab4ad6e2075014419cc7fad69145 (diff)
downloadQt-bc1638138b71adf056f5972b7b1239f4eeffcfec.zip
Qt-bc1638138b71adf056f5972b7b1239f4eeffcfec.tar.gz
Qt-bc1638138b71adf056f5972b7b1239f4eeffcfec.tar.bz2
Make sure we define S_IFDIR on Windows
Reviewed-by: Thierry Bastian
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qzip.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 2fc1940..d30c996 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -54,10 +54,13 @@
#include <zlib.h>
#if defined(Q_OS_WIN)
-#undef S_IFREG
-#define S_IFREG 0100000
+# undef S_IFREG
+# define S_IFREG 0100000
+# ifndef S_IFDIR
+# define S_IFDIR 0040000
+# endif
# ifndef S_ISDIR
-# define S_ISDIR(x) ((x) & 0040000) > 0
+# define S_ISDIR(x) ((x) & S_IFDIR) > 0
# endif
# ifndef S_ISREG
# define S_ISREG(x) ((x) & 0170000) == S_IFREG