aboutsummaryrefslogtreecommitdiff
path: root/devel/clint/files/patch-lib-python-python.h
blob: e4be9dff23fc1f22b6f6fadb227457e07e3b81b3 (plain) (blame)
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
45
46
47
48
49
50
--- lib/python/python.h.orig	2001-04-16 21:53:21.000000000 +0200
+++ lib/python/python.h	2007-11-03 16:31:32.000000000 +0100
@@ -3,22 +3,42 @@
 
 #pragma interface
 
+#include <ctype.h>
+#undef isalnum
+#undef isalpha
+#undef iscntrl
+#undef isdigit
+#undef isgraph
+#undef islower
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef tolower
+#undef toupper
+#include <iostream>
+
 #include <Python.h>
 #include <string>
 #include <iterator>
 #include <utility>
-#include <strstream>
+#include <sstream>
 #include "exceptions.h"
 #include "debug.h"
 
 // I hate #define macros, seee if I can remove this
-#define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1
+#define STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR 1
 #ifdef MS_WIN32
-#  undef STANDARD_LIBRARY_HAS_ITERATOR_TRAITS
-#  define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0
+#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
+#  define STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR 0
+#endif
+
+#if defined (__GNUG__) && (__GNUG__ >= 3)
+#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
 #endif
 
-#if STANDARD_LIBRARY_HAS_ITERATOR_TRAITS
+#if STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
 #  define random_access_iterator_parent(itemtype) std::random_access_iterator<itemtype, int>
 #else
 #  define random_access_iterator_parent(itemtype) std::iterator<std::random_access_iterator_tag,itemtype,int>