My favorites
▼
|
Sign in
pyodbc
Python ODBC library
Project Home
Downloads
Wiki
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
35
attachment: pyodbc.diff
(1.5 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff -u -r /home/psimons/attachments/pyodbc-2.1.4/setup.py pyodbc-2.1.4/setup.py
--- pyodbc-2.1.4.orig/setup.py 2008-12-06 10:34:24.000000000 +0200
+++ pyodbc-2.1.4/setup.py 2009-02-18 18:28:42.000000000 +0200
@@ -19,10 +19,11 @@
extra_link_args = None
if os.name == 'nt':
- # Windows native
- files.append(join('src', 'pyodbc.rc'))
+ if not '--compiler=mingw32' in sys.argv:
+ # Windows native
+ files.append(join('src', 'pyodbc.rc'))
+ extra_compile_args = ['/W4']
libraries.append('odbc32')
- extra_compile_args = ['/W4']
# extra_compile_args = ['/W4', '/Zi', '/Od']
# extra_link_args = ['/DEBUG']
diff -u -r /home/psimons/attachments/pyodbc-2.1.4/src/pyodbc.h pyodbc-2.1.4/src/pyodbc.h
--- pyodbc-2.1.4.orig/src/pyodbc.h 2008-12-30 22:35:14.000000000 +0200
+++ pyodbc-2.1.4/src/pyodbc.h 2009-02-18 18:12:43.000000000 +0200
@@ -27,7 +27,12 @@
typedef long long INT64;
typedef unsigned long long UINT64;
#define _strcmpi strcasecmp
-inline int max(int lhs, int rhs) { return (rhs > lhs) ? rhs : lhs; }
+#ifdef __MINGW32__
+ #include <windef.h>
+ #include <malloc.h>
+#else
+ inline int max(int lhs, int rhs) { return (rhs > lhs) ? rhs : lhs; }
+#endif
#endif
#define PY_SSIZE_T_CLEAN 1
@@ -98,7 +103,7 @@
#include <stdarg.h>
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__MINGW32__)
#define min(X,Y) ((X) < (Y) ? (X) : (Y))
#define max(X,Y) ((X) > (Y) ? (X) : (Y))
#define _alloca alloca
Powered by
Google Project Hosting