Skip to content

Commit 77bdbf0

Browse files
c-nixonfatso83
authored andcommitted
Add cygwin64 support to wrap_python.hpp
This patch adds 64 bit support.
1 parent 359b7f0 commit 77bdbf0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

include/boost/python/detail/wrap_python.hpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,22 @@
8585
#if defined(_WIN32) || defined(__CYGWIN__)
8686
# if defined(__GNUC__) && defined(__CYGWIN__)
8787

88-
# define SIZEOF_LONG 4
88+
# if defined(__LP64__)
89+
# define SIZEOF_LONG 8
90+
# else
91+
# define SIZEOF_LONG 4
92+
# endif
93+
8994

9095
# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 2
9196

9297
typedef int pid_t;
9398

94-
# define WORD_BIT 32
99+
# if defined(__LP64__)
100+
# define WORD_BIT 64
101+
# else
102+
# define WORD_BIT 32
103+
# endif
95104
# define hypot _hypot
96105
# include <stdio.h>
97106

0 commit comments

Comments
 (0)