At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/msvc_python24

------------------------------------------------------------
revno: 3791
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: msvc_python24
timestamp: Tue 2008-10-21 10:49:29 -0500
message:
  Extend the compatibility code for MSVC not having most of the stat macros.
=== modified file 'bzrlib/python-compat.h'
--- a/bzrlib/python-compat.h    2008-09-26 05:14:51 +0000
+++ b/bzrlib/python-compat.h    2008-10-21 15:49:29 +0000
@@ -35,15 +35,27 @@
 #endif
 
 #if defined(_WIN32) || defined(WIN32)
-    /* Needed for htonl */
-    #include "Winsock.h"
-
     /* Defining WIN32_LEAN_AND_MEAN makes including windows quite a bit
      * lighter weight.
      */
     #define WIN32_LEAN_AND_MEAN
     #include <windows.h>
 
+    /* Needed for htonl */
+    #include "Winsock.h"
+
+    /* sys/stat.h doesn't have any of these macro definitions for MSVC, so
+     * we'll define whatever is missing that we actually use.
+     */
+    #if !defined(S_ISDIR)
+        #define S_ISDIR(m) (((m) & 0170000) == 0040000)
+    #endif
+    #if !defined(S_ISREG)
+        #define S_ISREG(m) (((m) & 0170000) == 0100000)
+    #endif
+    #if !defined(S_IXUSR)
+        #define S_IXUSR 0000100/* execute/search permission, owner */
+    #endif
     /* sys/stat.h doesn't have S_ISLNK on win32, so we fake it by just always
      * returning False
      */

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to