/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/python-compat.h

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-23 17:59:52 UTC
  • mfrom: (3788.1.5 msvc_python24)
  • Revision ID: pqm@pqm.ubuntu.com-20081023175952-0gr8np56nf6ab5yn
(jam) Allow extensions to compile for python2.4 and using msvc

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#endif
36
36
 
37
37
#if defined(_WIN32) || defined(WIN32)
38
 
    /* Needed for htonl */
39
 
    #include "Winsock.h"
40
 
 
41
38
    /* Defining WIN32_LEAN_AND_MEAN makes including windows quite a bit
42
39
     * lighter weight.
43
40
     */
44
41
    #define WIN32_LEAN_AND_MEAN
45
42
    #include <windows.h>
46
43
 
 
44
    /* Needed for htonl */
 
45
    #include "Winsock.h"
 
46
 
 
47
    /* sys/stat.h doesn't have any of these macro definitions for MSVC, so
 
48
     * we'll define whatever is missing that we actually use.
 
49
     */
 
50
    #if !defined(S_ISDIR)
 
51
        #define S_ISDIR(m) (((m) & 0170000) == 0040000)
 
52
    #endif
 
53
    #if !defined(S_ISREG)
 
54
        #define S_ISREG(m) (((m) & 0170000) == 0100000)
 
55
    #endif
 
56
    #if !defined(S_IXUSR)
 
57
        #define S_IXUSR 0000100/* execute/search permission, owner */
 
58
    #endif
47
59
    /* sys/stat.h doesn't have S_ISLNK on win32, so we fake it by just always
48
60
     * returning False
49
61
     */
50
 
    #define S_ISLNK(mode) (0)
 
62
    #if !defined(S_ISLNK)
 
63
        #define S_ISLNK(mode) (0)
 
64
    #endif
51
65
#else /* Not win32 */
52
66
    /* For htonl */
53
67
    #include "arpa/inet.h"