Merge lp:~marcustomlinson/ecspython/fix_float_params into lp:ecspython

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 20
Merged at revision: 10
Proposed branch: lp:~marcustomlinson/ecspython/fix_float_params
Merge into: lp:ecspython
Diff against target: 2508 lines (+299/-1667)
14 files modified
CMakeLists.txt (+2/-5)
example/main.cpp (+75/-18)
include/EcsPython.h (+17/-31)
include/dspatch/DspThread.h (+1/-1)
include/dspatch/DspThreadNull.h (+2/-2)
include/dspatch/DspThreadUnix.h (+16/-8)
include/dspatch/DspThreadWin.h (+8/-7)
include/ecspython/EcsMacros.h (+121/-28)
readme_windows.txt (+15/-0)
src/EcsMacros.cpp (+32/-26)
src/EcsPython.cpp (+10/-14)
win_fix/Python27/pyconfig.h (+0/-756)
win_fix/Python33/pyconfig.h (+0/-765)
win_fix/readme.txt (+0/-6)
To merge this branch: bzr merge lp:~marcustomlinson/ecspython/fix_float_params
Reviewer Review Type Date Requested Status
Marcus Tomlinson Pending
Review via email: mp+243568@code.launchpad.net
To post a comment you must log in.
12. By Marcus Tomlinson

Added support for char* and void* return values

13. By Marcus Tomlinson

missing "else"

14. By Marcus Tomlinson

Python class functors return a pointer to the C++ class

15. By Marcus Tomlinson

code formatting

16. By Marcus Tomlinson

Include char* in example

17. By Marcus Tomlinson

Fixed Windows stuff

18. By Marcus Tomlinson

Allow creation of user class types from Python

19. By Marcus Tomlinson

Added readme_windows.txt for Windows users

20. By Marcus Tomlinson

Cleaned up example code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-01-26 11:00:54 +0000
3+++ CMakeLists.txt 2014-12-05 19:42:33 +0000
4@@ -1,11 +1,9 @@
5 cmake_minimum_required(VERSION 2.8)
6
7+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pthread -Wall -Wextra")
8+
9 project(EcsPython)
10
11-add_definitions(
12- -fpermissive
13-)
14-
15 add_subdirectory(example)
16
17 if(UNIX)
18@@ -13,7 +11,6 @@
19 endif(UNIX)
20
21 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
22- add_definitions(-DECS_EXPORT)
23 set(PYTHON_LIBRARIES "C:/Python27/libs/python27.lib")
24 set(PYTHON_INCLUDE_DIRS "C:/Python27/include")
25 endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
26
27=== modified file 'example/main.cpp'
28--- example/main.cpp 2014-01-25 13:13:29 +0000
29+++ example/main.cpp 2014-12-05 19:42:33 +0000
30@@ -1,6 +1,6 @@
31 /************************************************************************
32 ECS:Python - Light-Weight C++ Wrapper For Embedding Python Into C++
33-Copyright (c) 2012-2013 Marcus Tomlinson
34+Copyright (c) 2012-2014 Marcus Tomlinson
35
36 This file is part of EcsPython.
37
38@@ -50,11 +50,17 @@
39 return true;
40 }
41
42- void ShowLots( unsigned long count, std::string message )
43+ float ShowDouble( double message )
44+ {
45+ std::cout << message;
46+ return (float)message;
47+ }
48+
49+ void ShowLots( unsigned long count, char* message )
50 {
51 for( unsigned int i = 0; i < count; i++ )
52 {
53- std::cout << message.c_str();
54+ std::cout << message;
55 }
56 lastMessage = message;
57 }
58@@ -64,16 +70,43 @@
59 return lastMessage;
60 }
61
62+ void ShowPtr( void* thiz )
63+ {
64+ ((Simple*)thiz)->Show("Hey! This is coming from a pointer :)");
65+ }
66+
67 private:
68 std::string lastMessage;
69 };
70
71+// Simple Class Factory
72+// ====================
73+class SimpleFactory
74+{
75+public:
76+ void* NewSimple( std::string firstMessage )
77+ {
78+ return new Simple( firstMessage );
79+ }
80+
81+ void DeleteSimple( void* simple )
82+ {
83+ delete ( ( Simple* )simple );
84+ }
85+};
86+
87 // Register Classes + Methods
88 // ==========================
89-ECS_REGISTER_CLASS( Simple );
90-ECS_REGISTER_METHOD_RETURN( Simple, Show, bool, std::string );
91-ECS_REGISTER_METHOD_VOID( Simple, ShowLots, unsigned long, std::string );
92-ECS_REGISTER_METHOD_RETURN( Simple, GetLastMessage, std::string );
93+ECS_REGISTER_CLASS( Simple )
94+ECS_REGISTER_METHOD_RETURN( Simple, Show, bool, std::string )
95+ECS_REGISTER_METHOD_RETURN( Simple, ShowDouble, float, double )
96+ECS_REGISTER_METHOD_VOID( Simple, ShowLots, unsigned long, char* )
97+ECS_REGISTER_METHOD_RETURN( Simple, GetLastMessage, std::string )
98+ECS_REGISTER_METHOD_VOID( Simple, ShowPtr, void* )
99+
100+ECS_REGISTER_CLASS( SimpleFactory )
101+ECS_REGISTER_METHOD_RETURN( SimpleFactory, NewSimple, void*, std::string )
102+ECS_REGISTER_METHOD_VOID( SimpleFactory, DeleteSimple, void* )
103
104 //=================================================================================================
105
106@@ -85,42 +118,66 @@
107 // ======================
108 Ecs_Init_Simple();
109 Ecs_Init_Simple_Show();
110+ Ecs_Init_Simple_ShowDouble();
111 Ecs_Init_Simple_ShowLots();
112 Ecs_Init_Simple_GetLastMessage();
113+ Ecs_Init_Simple_ShowPtr();
114+
115+ Ecs_Init_SimpleFactory();
116+ Ecs_Init_SimpleFactory_NewSimple();
117+ Ecs_Init_SimpleFactory_DeleteSimple();
118
119 // Initialize EcsPython
120 // ====================
121 Ecs_Initialize();
122
123- // Create New Class Instance
124- // =========================
125- Simple* newSimple = new Simple( "(first message)" );
126
127- // Expose Class Instance To Python
128- // ===============================
129- Ecs_Expose_Object( newSimple, "newSimple" );
130+ // Create And Expose Class Instance To Python
131+ // ==========================================
132+ Simple newSimple( "(first message)" );
133+ Ecs_Expose_Object( &newSimple, "newSimple" );
134
135 // Use Exposed Class Instance From Python
136 // ======================================
137 Ecs_Python_Cmd( "print( newSimple.GetLastMessage() )" );
138
139+ Ecs_Python_Cmd( "newSimple.Show( 'my favorite number is ' )" );
140+ Ecs_Python_Cmd( "newSimple.ShowDouble( 5.9982 )" );
141+ Ecs_Python_Cmd( "print('')" );
142+
143+ Ecs_Python_Cmd( "newSimple.ShowPtr( newSimple() )" );
144+ Ecs_Python_Cmd( "print('')" );
145+
146 Ecs_Python_Cmd( "state = newSimple.Show( 'hello' )" );
147- Ecs_Python_Cmd( "if state == True: \n\t print( ' there,' )" );
148+ Ecs_Python_Cmd( "if state == True:\n\tprint( ' there,' )" );
149
150 Ecs_Python_Cmd( "newSimple.ShowLots( 5, 'again and ' )" );
151
152 Ecs_Python_Cmd( "newSimple.Show( 'once more.' )" );
153 Ecs_Python_Cmd( "print('')" );
154
155- // Use Class Instance From C++
156- // ===========================
157- std::cout << newSimple->GetLastMessage().c_str();
158- getchar();
159+ // Use The Class Instance From C++
160+ // ===============================
161+ std::cout << "Ok, " << newSimple.GetLastMessage().c_str() << std::endl;
162+
163+
164+ // Create And Expose Factory To Python
165+ // ===================================
166+ SimpleFactory simpleFactory;
167+ Ecs_Expose_Object( &simpleFactory, "simpleFactory" );
168+
169+ // Create A New Class Instance From Python
170+ // =======================================
171+ Ecs_Python_Cmd( "anotherSimple = Simple( simpleFactory.NewSimple( '\\'Allo ' ) )" );
172+ Ecs_Python_Cmd( "print( anotherSimple.GetLastMessage() + '\\'Allo!')" );
173+ Ecs_Python_Cmd( "simpleFactory.DeleteSimple( anotherSimple() )" );
174+
175
176 // Finalize EcsPython
177 // ==================
178 Ecs_Finalize();
179
180+ getchar();
181 return 0;
182 }
183
184
185=== modified file 'include/EcsPython.h'
186--- include/EcsPython.h 2014-01-25 13:13:29 +0000
187+++ include/EcsPython.h 2014-12-05 19:42:33 +0000
188@@ -1,6 +1,6 @@
189 /************************************************************************
190 ECS:Python - Light-Weight C++ Wrapper For Embedding Python Into C++
191-Copyright (c) 2012-2013 Marcus Tomlinson
192+Copyright (c) 2012-2014 Marcus Tomlinson
193
194 This file is part of EcsPython.
195
196@@ -32,22 +32,8 @@
197 #ifndef ECSPYTHON_H
198 #define ECSPYTHON_H
199
200-#ifdef _WIN32
201-
202-#ifdef ECS_EXPORT
203- #define DLLPORT __declspec(dllexport)
204-#else
205- #define DLLPORT __declspec(dllimport)
206-#endif
207-
208-#else
209-
210-#define DLLPORT
211-
212-#endif
213-
214+#include <dspatch/DspThread.h>
215 #include <ecspython/EcsMacros.h>
216-#include <dspatch/DspThread.h>
217
218 struct PyMethodDef;
219
220@@ -55,7 +41,7 @@
221 // EcsPython Globals
222 // =================
223
224-struct DLLEXPORT EcsClass
225+struct EcsClass
226 {
227 EcsClass( std::string newPyClassName, const std::type_info& newPyClassType )
228 : pyClassName( newPyClassName ),
229@@ -65,7 +51,7 @@
230 const std::type_info& pyClassType;
231 };
232
233-struct DLLEXPORT EcsObject
234+struct EcsObject
235 {
236 EcsObject( char* newPyObject, std::string newPyClassName, std::string newPyObjectName )
237 : pyObject( newPyObject ),
238@@ -77,54 +63,54 @@
239 std::string pyObjectName;
240 };
241
242-DLLPORT extern DspMutex EcsPythonCmdMutex; // Mutex for thread-safe python calls
243-DLLPORT extern std::vector< EcsClass* > EcsPythonClassesDict; // C++ class dictionary
244-DLLPORT extern std::string EcsPythonClassesDef; // Python definition string for C++ classes
245-DLLPORT extern std::vector< PyMethodDef > EcsPythonMethods; // Methods for EcsPython python module
246-DLLPORT extern std::vector< EcsObject* > EcsExposedObjects; // C++ objects exposed to Python
247+extern DspMutex EcsPythonCmdMutex; // Mutex for thread-safe python calls
248+extern std::vector< EcsClass* > EcsPythonClassesDict; // C++ class dictionary
249+extern std::string EcsPythonClassesDef; // Python definition string for C++ classes
250+extern std::vector< PyMethodDef > EcsPythonMethods; // Methods for EcsPython python module
251+extern std::vector< EcsObject* > EcsExposedObjects; // C++ objects exposed to Python
252
253 #if PY_MAJOR_VERSION >= 3
254-DLLPORT extern struct PyModuleDef EcsPythonModule; // EcsPython python module
255+extern struct PyModuleDef EcsPythonModule; // EcsPython python module
256 #endif
257
258 //=================================================================================================
259 // Initialize EcsPython
260 // ====================
261
262-DLLEXPORT void Ecs_Initialize();
263+void Ecs_Initialize();
264
265 //-------------------------------------------------------------------------------------------------
266 // Finalize EcsPython
267 // ==================
268
269-DLLEXPORT void Ecs_Finalize();
270+void Ecs_Finalize();
271
272 //-------------------------------------------------------------------------------------------------
273 // Execute Python Command
274 // ======================
275
276-DLLEXPORT void Ecs_Python_Cmd( std::string pythonCmdString );
277+void Ecs_Python_Cmd( std::string pythonCmdString );
278
279 //-------------------------------------------------------------------------------------------------
280 // Execute Python File
281 // ===================
282
283-DLLEXPORT void Ecs_Python_File( std::string pythonScriptPath );
284+void Ecs_Python_File( std::string pythonScriptPath );
285
286 //-------------------------------------------------------------------------------------------------
287 // Get Object Value From Python
288 // ============================
289
290-DLLEXPORT std::string Ecs_Get_Value( std::string pyObjectName );
291+std::string Ecs_Get_Value( std::string pyObjectName );
292
293 //-------------------------------------------------------------------------------------------------
294 // Expose Class Instance To Python
295 // ===============================
296
297-DLLEXPORT void _Ecs_Expose_Object( char* pyObject, std::string pyClassName, std::string pyObjectName );
298+void _Ecs_Expose_Object( char* pyObject, std::string pyClassName, std::string pyObjectName );
299
300 template< class ObjectType >
301-DLLEXPORT void Ecs_Expose_Object( ObjectType* object, std::string pyObjectName )
302+void Ecs_Expose_Object( ObjectType* object, std::string pyObjectName )
303 {
304 for( unsigned long i = 0; i < EcsPythonClassesDict.size(); i++ )
305 {
306
307=== modified file 'include/dspatch/DspThread.h'
308--- include/dspatch/DspThread.h 2014-01-25 10:46:21 +0000
309+++ include/dspatch/DspThread.h 2014-12-05 19:42:33 +0000
310@@ -1,6 +1,6 @@
311 /************************************************************************
312 DSPatch - Cross-Platform, Object-Oriented, Flow-Based Programming Library
313-Copyright (c) 2012-2013 Marcus Tomlinson
314+Copyright (c) 2012-2014 Marcus Tomlinson
315
316 This file is part of DSPatch.
317
318
319=== modified file 'include/dspatch/DspThreadNull.h'
320--- include/dspatch/DspThreadNull.h 2014-01-25 10:46:21 +0000
321+++ include/dspatch/DspThreadNull.h 2014-12-05 19:42:33 +0000
322@@ -1,6 +1,6 @@
323 /************************************************************************
324 DSPatch - Cross-Platform, Object-Oriented, Flow-Based Programming Library
325-Copyright (c) 2012-2013 Marcus Tomlinson
326+Copyright (c) 2012-2014 Marcus Tomlinson
327
328 This file is part of DSPatch.
329
330@@ -55,7 +55,7 @@
331 HighPriority,
332 HighestPriority,
333
334- TimeCriticalPriority,
335+ TimeCriticalPriority
336 };
337
338 virtual void Start( Priority priority ) {}
339
340=== modified file 'include/dspatch/DspThreadUnix.h'
341--- include/dspatch/DspThreadUnix.h 2014-01-25 10:46:21 +0000
342+++ include/dspatch/DspThreadUnix.h 2014-12-05 19:42:33 +0000
343@@ -1,6 +1,6 @@
344 /************************************************************************
345 DSPatch - Cross-Platform, Object-Oriented, Flow-Based Programming Library
346-Copyright (c) 2012-2013 Marcus Tomlinson
347+Copyright (c) 2012-2014 Marcus Tomlinson
348
349 This file is part of DSPatch.
350
351@@ -35,7 +35,8 @@
352 class DspThread
353 {
354 public:
355- DspThread() {}
356+ DspThread()
357+ : _threadAttatched( false ) {}
358
359 virtual ~DspThread()
360 {
361@@ -52,19 +53,24 @@
362 HighPriority,
363 HighestPriority,
364
365- TimeCriticalPriority,
366+ TimeCriticalPriority
367 };
368
369 virtual void Start( Priority priority = NormalPriority )
370 {
371 pthread_create( &_thread, NULL, _ThreadFunc, this );
372+ _threadAttatched = true;
373
374 _SetPriority( _thread, priority );
375 }
376
377 virtual void Stop()
378 {
379- pthread_detach( _thread );
380+ if( _threadAttatched )
381+ {
382+ pthread_detach( _thread );
383+ _threadAttatched = false;
384+ }
385 }
386
387 static void SetPriority( Priority priority )
388@@ -78,8 +84,6 @@
389 }
390
391 private:
392- pthread_t _thread;
393-
394 static void* _ThreadFunc( void* pv )
395 {
396 ( reinterpret_cast<DspThread*>( pv ) )->_Run();
397@@ -100,14 +104,16 @@
398
399 pthread_setschedparam( threadID, policy, &param );
400 }
401+
402+private:
403+ pthread_t _thread;
404+ bool _threadAttatched;
405 };
406
407 //=================================================================================================
408
409 class DspMutex
410 {
411- friend class DspWaitCondition;
412-
413 public:
414 DspMutex()
415 {
416@@ -130,6 +136,8 @@
417 }
418
419 private:
420+ friend class DspWaitCondition;
421+
422 pthread_mutex_t _mutex;
423 };
424
425
426=== modified file 'include/dspatch/DspThreadWin.h'
427--- include/dspatch/DspThreadWin.h 2014-01-25 10:46:21 +0000
428+++ include/dspatch/DspThreadWin.h 2014-12-05 19:42:33 +0000
429@@ -1,6 +1,6 @@
430 /************************************************************************
431 DSPatch - Cross-Platform, Object-Oriented, Flow-Based Programming Library
432-Copyright (c) 2012-2013 Marcus Tomlinson
433+Copyright (c) 2012-2014 Marcus Tomlinson
434
435 This file is part of DSPatch.
436
437@@ -35,10 +35,10 @@
438 {
439 public:
440 DspThread()
441- : _threadHandle( NULL ) {}
442+ : _threadHandle( NULL ) {}
443
444- DspThread( const DspThread& )
445- : _threadHandle( NULL ) {}
446+ DspThread( DspThread const& )
447+ : _threadHandle( NULL ) {}
448
449 virtual ~DspThread()
450 {
451@@ -55,7 +55,7 @@
452 HighPriority = 1,
453 HighestPriority = 2,
454
455- TimeCriticalPriority = 15,
456+ TimeCriticalPriority = 15
457 };
458
459 virtual void Start( Priority priority = NormalPriority )
460@@ -91,6 +91,7 @@
461
462 virtual void _Run() = 0;
463
464+private:
465 HANDLE _threadHandle;
466 };
467
468@@ -104,7 +105,7 @@
469 InitializeCriticalSection( &_cs );
470 }
471
472- DspMutex( const DspMutex& )
473+ DspMutex( DspMutex const& )
474 {
475 InitializeCriticalSection( &_cs );
476 }
477@@ -138,7 +139,7 @@
478 _hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
479 }
480
481- DspWaitCondition( const DspWaitCondition& )
482+ DspWaitCondition( DspWaitCondition const& )
483 {
484 _hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
485 }
486
487=== modified file 'include/ecspython/EcsMacros.h'
488--- include/ecspython/EcsMacros.h 2014-01-26 12:29:03 +0000
489+++ include/ecspython/EcsMacros.h 2014-12-05 19:42:33 +0000
490@@ -1,6 +1,6 @@
491 /************************************************************************
492 ECS:Python - Light-Weight C++ Wrapper For Embedding Python Into C++
493-Copyright (c) 2012-2013 Marcus Tomlinson
494+Copyright (c) 2012-2014 Marcus Tomlinson
495
496 This file is part of EcsPython.
497
498@@ -36,27 +36,25 @@
499 #include <typeinfo>
500 #include <string>
501
502-#include <dspatch/DspThread.h>
503-
504 //=================================================================================================
505
506 typedef struct _object PyObject;
507 typedef PyObject* (*PyCFunction)( PyObject *, PyObject * );
508
509-DLLPORT extern int (*_Ecs_ParseTuple)( PyObject *, const char *, ... );
510+extern int (*_Ecs_ParseTuple)( PyObject *, const char *, ... );
511
512 //=================================================================================================
513
514-DLLEXPORT void _EcsAddNewMethod( const char *methodName, PyCFunction methodPointer, int methodFlags );
515+void _EcsAddNewMethod( const char *methodName, PyCFunction methodPointer, int methodFlags );
516
517 //-------------------------------------------------------------------------------------------------
518
519 template< class Type >
520-DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const Type& Value );
521+PyObject* _Ecs_ToPyObject( const Type& Value );
522
523 //-------------------------------------------------------------------------------------------------
524
525-DLLEXPORT PyObject* _Ecs_GetPythonNull();
526+PyObject* _Ecs_GetPythonNull();
527
528 //=================================================================================================
529 // COMMON TOOLS
530@@ -94,15 +92,35 @@
531 else if( typeid( Type ) == typeid( bool ) )
532 append = "i";
533 else if( typeid( Type ) == typeid( double ) )
534- append = "d";
535+ append = "f";
536 else if( typeid( Type ) == typeid( float ) )
537 append = "f";
538+ else if( typeid( Type ) == typeid( void* ) )
539+ append = "k";
540
541 pyTypes.append( append );
542 }
543
544 //-------------------------------------------------------------------------------------------------
545
546+template< class Type >
547+void _Ecs_FromPyObject( char* in, Type& out )
548+{
549+ out = (Type)in;
550+}
551+
552+inline void _Ecs_FromPyObject( char* in, double& out )
553+{
554+ out = *(float*)&in;
555+}
556+
557+inline void _Ecs_FromPyObject( char* in, float& out )
558+{
559+ out = *(float*)&in;
560+}
561+
562+//-------------------------------------------------------------------------------------------------
563+
564 template< class RetT >
565 static std::string _Ecs_MakeMethodArgs()
566 {
567@@ -167,11 +185,11 @@
568 static void Ecs_Init##_##Class()\
569 {\
570 EcsPythonClassesDict.push_back( new EcsClass( #Class, typeid( Class ) ) );\
571- EcsPythonClassesDef.append("class " #Class ": \n\
572-\t def SetEcsPtr( self, i ): \n\
573-\t\t self._self = i \n\
574-\t def GetEcsPtr( self ): \n\
575-\t\t return self._self \n");\
576+ EcsPythonClassesDef.append("class " #Class ":\n\
577+\tdef __init__( self, ecsPtr ):\n\
578+\t\tself._self = ecsPtr\n\
579+\tdef __call__( self ):\n\
580+\t\treturn self._self\n");\
581 }
582
583 //=================================================================================================
584@@ -183,8 +201,8 @@
585 {\
586 std::string methodArgs = _Ecs_MakeMethodArgs< __VA_ARGS__ >();\
587 _EcsAddNewMethod( #Class "_" #Method, Class##_##Method, 0x0001 );\
588- EcsPythonClassesDef.append( "\t def " #Method "( self").append(methodArgs).append(" ): \n\
589-\t\t return EcsPython." #Class "_" #Method "( self._self").append(methodArgs).append(" ) \n" );\
590+ EcsPythonClassesDef.append( "\tdef " #Method "( self").append(methodArgs).append(" ):\n\
591+\t\treturn EcsPython." #Class "_" #Method "( self._self").append(methodArgs).append(" )\n" );\
592 }
593
594 //-------------------------------------------------------------------------------------------------
595@@ -204,7 +222,10 @@
596 success = true; char* objs[2]; std::string pyTypes = "k";\
597 _Ecs_AppendPythonArgType<A1T>( pyTypes );\
598 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1] ) )\
599- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1] );\
600+ {\
601+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
602+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1 );\
603+ }\
604 success = false; return RetT();\
605 }\
606 template< class ObjT, class RetT, class A1T, class A2T >\
607@@ -214,7 +235,11 @@
608 _Ecs_AppendPythonArgType<A1T>( pyTypes );\
609 _Ecs_AppendPythonArgType<A2T>( pyTypes );\
610 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2] ) )\
611- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2] );\
612+ {\
613+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
614+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
615+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2 );\
616+ }\
617 success = false; return RetT();\
618 }\
619 template< class ObjT, class RetT, class A1T, class A2T, class A3T >\
620@@ -225,7 +250,12 @@
621 _Ecs_AppendPythonArgType<A2T>( pyTypes );\
622 _Ecs_AppendPythonArgType<A3T>( pyTypes );\
623 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3] ) )\
624- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3] );\
625+ {\
626+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
627+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
628+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
629+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3 );\
630+ }\
631 success = false; return RetT();\
632 }\
633 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T >\
634@@ -237,7 +267,13 @@
635 _Ecs_AppendPythonArgType<A3T>( pyTypes );\
636 _Ecs_AppendPythonArgType<A4T>( pyTypes );\
637 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4] ) )\
638- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4] );\
639+ {\
640+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
641+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
642+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
643+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
644+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4 );\
645+ }\
646 success = false; return RetT();\
647 }\
648 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T, class A5T >\
649@@ -250,7 +286,14 @@
650 _Ecs_AppendPythonArgType<A4T>( pyTypes );\
651 _Ecs_AppendPythonArgType<A5T>( pyTypes );\
652 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4], &objs[5] ) )\
653- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4], (A5T)objs[5] );\
654+ {\
655+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
656+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
657+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
658+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
659+ A5T a5; _Ecs_FromPyObject(objs[5], a5);\
660+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4, a5 );\
661+ }\
662 success = false; return RetT();\
663 }\
664 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T, class A5T, class A6T >\
665@@ -264,7 +307,15 @@
666 _Ecs_AppendPythonArgType<A5T>( pyTypes );\
667 _Ecs_AppendPythonArgType<A6T>( pyTypes );\
668 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4], &objs[5], &objs[6] ) )\
669- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4], (A5T)objs[5], (A6T)objs[6] );\
670+ {\
671+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
672+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
673+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
674+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
675+ A5T a5; _Ecs_FromPyObject(objs[5], a5);\
676+ A6T a6; _Ecs_FromPyObject(objs[6], a6);\
677+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4, a5, a6 );\
678+ }\
679 success = false; return RetT();\
680 }\
681 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T, class A5T, class A6T, class A7T >\
682@@ -279,7 +330,16 @@
683 _Ecs_AppendPythonArgType<A6T>( pyTypes );\
684 _Ecs_AppendPythonArgType<A7T>( pyTypes );\
685 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4], &objs[5], &objs[6], &objs[7] ) )\
686- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4], (A5T)objs[5], (A6T)objs[6], (A7T)objs[7] );\
687+ {\
688+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
689+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
690+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
691+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
692+ A5T a5; _Ecs_FromPyObject(objs[5], a5);\
693+ A6T a6; _Ecs_FromPyObject(objs[6], a6);\
694+ A7T a7; _Ecs_FromPyObject(objs[7], a7);\
695+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4, a5, a6, a7 );\
696+ }\
697 success = false; return RetT();\
698 }\
699 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T, class A5T, class A6T, class A7T, class A8T >\
700@@ -295,7 +355,17 @@
701 _Ecs_AppendPythonArgType<A7T>( pyTypes );\
702 _Ecs_AppendPythonArgType<A8T>( pyTypes );\
703 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4], &objs[5], &objs[6], &objs[7], &objs[8] ) )\
704- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4], (A5T)objs[5], (A6T)objs[6], (A7T)objs[7], (A8T)objs[8] );\
705+ {\
706+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
707+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
708+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
709+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
710+ A5T a5; _Ecs_FromPyObject(objs[5], a5);\
711+ A6T a6; _Ecs_FromPyObject(objs[6], a6);\
712+ A7T a7; _Ecs_FromPyObject(objs[7], a7);\
713+ A8T a8; _Ecs_FromPyObject(objs[8], a8);\
714+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4, a5, a6, a7, a8 );\
715+ }\
716 success = false; return RetT();\
717 }\
718 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T, class A5T, class A6T, class A7T, class A8T, class A9T >\
719@@ -312,7 +382,18 @@
720 _Ecs_AppendPythonArgType<A8T>( pyTypes );\
721 _Ecs_AppendPythonArgType<A9T>( pyTypes );\
722 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4], &objs[5], &objs[6], &objs[7], &objs[8], &objs[9] ) )\
723- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4], (A5T)objs[5], (A6T)objs[6], (A7T)objs[7], (A8T)objs[8], (A9T)objs[9] );\
724+ {\
725+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
726+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
727+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
728+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
729+ A5T a5; _Ecs_FromPyObject(objs[5], a5);\
730+ A6T a6; _Ecs_FromPyObject(objs[6], a6);\
731+ A7T a7; _Ecs_FromPyObject(objs[7], a7);\
732+ A8T a8; _Ecs_FromPyObject(objs[8], a8);\
733+ A9T a9; _Ecs_FromPyObject(objs[9], a9);\
734+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4, a5, a6, a7, a8, a9 );\
735+ }\
736 success = false; return RetT();\
737 }\
738 template< class ObjT, class RetT, class A1T, class A2T, class A3T, class A4T, class A5T, class A6T, class A7T, class A8T, class A9T, class A10T >\
739@@ -330,7 +411,19 @@
740 _Ecs_AppendPythonArgType<A9T>( pyTypes );\
741 _Ecs_AppendPythonArgType<A10T>( pyTypes );\
742 if( _Ecs_ParseTuple( args, pyTypes.c_str(), &objs[0], &objs[1], &objs[2], &objs[3], &objs[4], &objs[5], &objs[6], &objs[7], &objs[8], &objs[9], &objs[10] ) )\
743- return ( RetT )( ( ObjT* ) objs[0] )->Method( (A1T)objs[1], (A2T)objs[2], (A3T)objs[3], (A4T)objs[4], (A5T)objs[5], (A6T)objs[6], (A7T)objs[7], (A8T)objs[8], (A9T)objs[9], (A10T)objs[10] );\
744+ {\
745+ A1T a1; _Ecs_FromPyObject(objs[1], a1);\
746+ A2T a2; _Ecs_FromPyObject(objs[2], a2);\
747+ A3T a3; _Ecs_FromPyObject(objs[3], a3);\
748+ A4T a4; _Ecs_FromPyObject(objs[4], a4);\
749+ A5T a5; _Ecs_FromPyObject(objs[5], a5);\
750+ A6T a6; _Ecs_FromPyObject(objs[6], a6);\
751+ A7T a7; _Ecs_FromPyObject(objs[7], a7);\
752+ A8T a8; _Ecs_FromPyObject(objs[8], a8);\
753+ A9T a9; _Ecs_FromPyObject(objs[9], a9);\
754+ A10T a10; _Ecs_FromPyObject(objs[10], a10);\
755+ return ( RetT )( ( ObjT* ) objs[0] )->Method( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 );\
756+ }\
757 success = false; return RetT();\
758 }
759
760@@ -338,10 +431,10 @@
761
762 #define ECS_REGISTER_METHOD_RETURN( Class, Method, ReturnType, ... )\
763 _MAKE_METHOD_CALL( Class, Method )\
764-static PyObject* Class##_##Method( PyObject* self, PyObject* args )\
765+static PyObject* Class##_##Method( PyObject*, PyObject* args )\
766 {\
767 bool success;\
768- PyObject* result = _Ecs_GetPythonReturnValue( Class##_##Call##Method< Class, ReturnType, ##__VA_ARGS__ >( args, success ) );\
769+ PyObject* result = _Ecs_ToPyObject( Class##_##Call##Method< Class, ReturnType, ##__VA_ARGS__ >( args, success ) );\
770 if( success )\
771 return result;\
772 else\
773@@ -353,7 +446,7 @@
774
775 #define ECS_REGISTER_METHOD_VOID( Class, Method, ... )\
776 _MAKE_METHOD_CALL( Class, Method )\
777-static PyObject* Class##_##Method( PyObject* self, PyObject* args )\
778+static PyObject* Class##_##Method( PyObject*, PyObject* args )\
779 {\
780 bool success;\
781 Class##_##Call##Method< Class, void, ##__VA_ARGS__ >( args, success );\
782
783=== added file 'readme_windows.txt'
784--- readme_windows.txt 1970-01-01 00:00:00 +0000
785+++ readme_windows.txt 2014-12-05 19:42:33 +0000
786@@ -0,0 +1,15 @@
787+Compiling ECS::Python on Windows:
788+
789+Firstly, you'll need to ensure that the correct version of Python is
790+being referenced in the CMakeLists:
791+
792+ 1. Open CMakeLists.txt
793+ 2. Update the paths under "if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")"
794+
795+Secondly, the Python distro does not come packaged with the debug library:
796+"pythonXX_d.lib". So, in order to get ECS:Python to compile in Debug mode:
797+
798+ 1. Open: "PythonXX\include\pyconfig.h"
799+ 2. Comment out the line "# define Py_DEBUG
800+"
801+ 3. Search and replace "_d.lib" with ".lib"
802\ No newline at end of file
803
804=== modified file 'src/EcsMacros.cpp'
805--- src/EcsMacros.cpp 2014-01-25 10:46:21 +0000
806+++ src/EcsMacros.cpp 2014-12-05 19:42:33 +0000
807@@ -1,6 +1,6 @@
808 /************************************************************************
809 ECS:Python - Light-Weight C++ Wrapper For Embedding Python Into C++
810-Copyright (c) 2012-2013 Marcus Tomlinson
811+Copyright (c) 2012-2014 Marcus Tomlinson
812
813 This file is part of EcsPython.
814
815@@ -37,45 +37,49 @@
816
817 //=================================================================================================
818
819-DLLPORT int (*_Ecs_ParseTuple)( PyObject *, const char *, ... ) = NULL;
820-
821-//template PyObject* _Ecs_GetPythonReturnValue( const char*& );
822-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const std::string& );
823-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const char& );
824-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const unsigned char& );
825-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const short& );
826-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const unsigned short& );
827-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const int& );
828-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const unsigned int& );
829-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const long& );
830-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const unsigned long& );
831-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const long long& );
832-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const unsigned long long& );
833-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const bool& );
834-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const double& );
835-template DLLEXPORT PyObject* _Ecs_GetPythonReturnValue( const float& );
836+int (*_Ecs_ParseTuple)( PyObject *, const char *, ... ) = NULL;
837+
838+typedef char* charptr;
839+typedef void* voidptr;
840+
841+template PyObject* _Ecs_ToPyObject( const charptr& );
842+template PyObject* _Ecs_ToPyObject( const std::string& );
843+template PyObject* _Ecs_ToPyObject( const char& );
844+template PyObject* _Ecs_ToPyObject( const unsigned char& );
845+template PyObject* _Ecs_ToPyObject( const short& );
846+template PyObject* _Ecs_ToPyObject( const unsigned short& );
847+template PyObject* _Ecs_ToPyObject( const int& );
848+template PyObject* _Ecs_ToPyObject( const unsigned int& );
849+template PyObject* _Ecs_ToPyObject( const long& );
850+template PyObject* _Ecs_ToPyObject( const unsigned long& );
851+template PyObject* _Ecs_ToPyObject( const long long& );
852+template PyObject* _Ecs_ToPyObject( const unsigned long long& );
853+template PyObject* _Ecs_ToPyObject( const bool& );
854+template PyObject* _Ecs_ToPyObject( const double& );
855+template PyObject* _Ecs_ToPyObject( const float& );
856+template PyObject* _Ecs_ToPyObject( const voidptr& );
857
858 //=================================================================================================
859
860 void _EcsAddNewMethod( const char *methodName, PyCFunction methodPointer, int methodFlags )
861 {
862-if( _Ecs_ParseTuple == NULL )
863-{
864-_Ecs_ParseTuple = PyArg_ParseTuple;
865-}
866+ if( _Ecs_ParseTuple == NULL )
867+ {
868+ _Ecs_ParseTuple = PyArg_ParseTuple;
869+ }
870
871-PyMethodDef newMethod = { methodName, methodPointer, methodFlags };
872-EcsPythonMethods.push_back( newMethod );
873+ PyMethodDef newMethod = { methodName, methodPointer, methodFlags, NULL };
874+ EcsPythonMethods.push_back( newMethod );
875 }
876
877 //-------------------------------------------------------------------------------------------------
878
879 template< class Type >
880-PyObject* _Ecs_GetPythonReturnValue( const Type& Value )
881+PyObject* _Ecs_ToPyObject( const Type& Value )
882 {
883 if( typeid( Type ) == typeid( char* ) )
884 return PyUnicode_FromFormat( "%s", *((char**)(&Value)) );
885- if( typeid( Type ) == typeid( std::string ) )
886+ else if( typeid( Type ) == typeid( std::string ) )
887 return PyUnicode_FromFormat( "%s", (*((std::string*)(&Value))).c_str() );
888 else if( typeid( Type ) == typeid( char ) )
889 return PyUnicode_FromFormat( "%c", *((char*)(&Value)) );
890@@ -103,6 +107,8 @@
891 return PyFloat_FromDouble( *((double*)(&Value)) );
892 else if( typeid( Type ) == typeid( float ) )
893 return PyFloat_FromDouble( *((float*)(&Value)) );
894+ else if( typeid( Type ) == typeid( void* ) )
895+ return PyLong_FromUnsignedLong( *((unsigned long*)(&Value)) );
896 else
897 return NULL;
898 }
899
900=== modified file 'src/EcsPython.cpp'
901--- src/EcsPython.cpp 2014-01-26 12:29:03 +0000
902+++ src/EcsPython.cpp 2014-12-05 19:42:33 +0000
903@@ -1,6 +1,6 @@
904 /************************************************************************
905 ECS:Python - Light-Weight C++ Wrapper For Embedding Python Into C++
906-Copyright (c) 2012-2013 Marcus Tomlinson
907+Copyright (c) 2012-2014 Marcus Tomlinson
908
909 This file is part of EcsPython.
910
911@@ -43,14 +43,14 @@
912 // EcsPython Globals
913 // =================
914
915-DLLPORT DspMutex EcsPythonCmdMutex; // Mutex for thread-safe python calls
916-DLLPORT std::vector< EcsClass* > EcsPythonClassesDict; // C++ class dictionary
917-DLLPORT std::string EcsPythonClassesDef; // Python definition string for C++ classes
918-DLLPORT std::vector< PyMethodDef > EcsPythonMethods; // Methods for EcsPython python module
919-DLLPORT std::vector< EcsObject* > EcsExposedObjects; // C++ objects exposed to Python
920+DspMutex EcsPythonCmdMutex; // Mutex for thread-safe python calls
921+std::vector< EcsClass* > EcsPythonClassesDict; // C++ class dictionary
922+std::string EcsPythonClassesDef; // Python definition string for C++ classes
923+std::vector< PyMethodDef > EcsPythonMethods; // Methods for EcsPython python module
924+std::vector< EcsObject* > EcsExposedObjects; // C++ objects exposed to Python
925
926 #if PY_MAJOR_VERSION >= 3
927-DLLPORT struct PyModuleDef EcsPythonModule; // EcsPython python module
928+struct PyModuleDef EcsPythonModule; // EcsPython python module
929 #endif
930
931 //=================================================================================================
932@@ -75,7 +75,7 @@
933 _Ecs_Expose_Object( EcsExposedObjects[i]->pyObject, EcsExposedObjects[i]->pyClassName, EcsExposedObjects[i]->pyObjectName );
934 }
935
936- EcsPythonMethods.pop_back(); // pop the NULL off the end of the methods array so that more can be added later
937+ EcsPythonMethods.pop_back(); // pop the NULL off the end of the methods array so that more can be added later
938 }
939
940 //-------------------------------------------------------------------------------------------------
941@@ -171,7 +171,7 @@
942 {
943 PyMethodDef nullMethod =
944 {
945- NULL, NULL, 0
946+ NULL, NULL, 0, NULL
947 };
948 EcsPythonMethods.push_back( nullMethod );
949
950@@ -209,11 +209,7 @@
951 module = PyImport_ImportModule( "__main__" );
952 PyObject_SetAttrString( module, "ecsPtr", newPyObject );
953
954- pythonCall.append( pyObjectName ).append( " = " ).append( pyClassName ).append( "()" );
955- Ecs_Python_Cmd( pythonCall );
956-
957- pythonCall.clear();
958- pythonCall.append( pyObjectName ).append( ".SetEcsPtr(ecsPtr)" );
959+ pythonCall.append( pyObjectName ).append( " = " ).append( pyClassName ).append( "(ecsPtr)" );
960 Ecs_Python_Cmd( pythonCall );
961
962 Ecs_Python_Cmd( "del ecsPtr" );
963
964=== removed directory 'win_fix'
965=== removed directory 'win_fix/Python27'
966=== removed file 'win_fix/Python27/pyconfig.h'
967--- win_fix/Python27/pyconfig.h 2014-01-17 13:26:46 +0000
968+++ win_fix/Python27/pyconfig.h 1970-01-01 00:00:00 +0000
969@@ -1,756 +0,0 @@
970-#ifndef Py_CONFIG_H
971-#define Py_CONFIG_H
972-
973-/* pyconfig.h. NOT Generated automatically by configure.
974-
975-This is a manually maintained version used for the Watcom,
976-Borland and Microsoft Visual C++ compilers. It is a
977-standard part of the Python distribution.
978-
979-WINDOWS DEFINES:
980-The code specific to Windows should be wrapped around one of
981-the following #defines
982-
983-MS_WIN64 - Code specific to the MS Win64 API
984-MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs)
985-MS_WINDOWS - Code specific to Windows, but all versions.
986-MS_WINCE - Code specific to Windows CE
987-Py_ENABLE_SHARED - Code if the Python core is built as a DLL.
988-
989-Also note that neither "_M_IX86" or "_MSC_VER" should be used for
990-any purpose other than "Windows Intel x86 specific" and "Microsoft
991-compiler specific". Therefore, these should be very rare.
992-
993-
994-NOTE: The following symbols are deprecated:
995-NT, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT
996-MS_CORE_DLL.
997-
998-WIN32 is still required for the locale module.
999-
1000-*/
1001-
1002-#ifdef _WIN32_WCE
1003-#define MS_WINCE
1004-#endif
1005-
1006-/* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */
1007-#ifdef USE_DL_EXPORT
1008-# define Py_BUILD_CORE
1009-#endif /* USE_DL_EXPORT */
1010-
1011-/* Visual Studio 2005 introduces deprecation warnings for
1012- "insecure" and POSIX functions. The insecure functions should
1013- be replaced by *_s versions (according to Microsoft); the
1014- POSIX functions by _* versions (which, according to Microsoft,
1015- would be ISO C conforming). Neither renaming is feasible, so
1016- we just silence the warnings. */
1017-
1018-#ifndef _CRT_SECURE_NO_DEPRECATE
1019-#define _CRT_SECURE_NO_DEPRECATE 1
1020-#endif
1021-#ifndef _CRT_NONSTDC_NO_DEPRECATE
1022-#define _CRT_NONSTDC_NO_DEPRECATE 1
1023-#endif
1024-
1025-/* Windows CE does not have these */
1026-#ifndef MS_WINCE
1027-#define HAVE_IO_H
1028-#define HAVE_SYS_UTIME_H
1029-#define HAVE_TEMPNAM
1030-#define HAVE_TMPFILE
1031-#define HAVE_TMPNAM
1032-#define HAVE_CLOCK
1033-#define HAVE_STRERROR
1034-#endif
1035-
1036-#ifdef HAVE_IO_H
1037-#include <io.h>
1038-#endif
1039-
1040-#define HAVE_HYPOT
1041-#define HAVE_STRFTIME
1042-#define DONT_HAVE_SIG_ALARM
1043-#define DONT_HAVE_SIG_PAUSE
1044-#define LONG_BIT 32
1045-#define WORD_BIT 32
1046-#define PREFIX ""
1047-#define EXEC_PREFIX ""
1048-
1049-#define MS_WIN32 /* only support win32 and greater. */
1050-#define MS_WINDOWS
1051-#ifndef PYTHONPATH
1052-# define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
1053-#endif
1054-#define NT_THREADS
1055-#define WITH_THREAD
1056-#ifndef NETSCAPE_PI
1057-#define USE_SOCKET
1058-#endif
1059-
1060-/* CE6 doesn't have strdup() but _strdup(). Assume the same for earlier versions. */
1061-#if defined(MS_WINCE)
1062-# include <stdlib.h>
1063-# define strdup _strdup
1064-#endif
1065-
1066-#ifdef MS_WINCE
1067-/* Windows CE does not support environment variables */
1068-#define getenv(v) (NULL)
1069-#define environ (NULL)
1070-#endif
1071-
1072-/* Compiler specific defines */
1073-
1074-/* ------------------------------------------------------------------------*/
1075-/* Microsoft C defines _MSC_VER */
1076-#ifdef _MSC_VER
1077-
1078-/* We want COMPILER to expand to a string containing _MSC_VER's *value*.
1079- * This is horridly tricky, because the stringization operator only works
1080- * on macro arguments, and doesn't evaluate macros passed *as* arguments.
1081- * Attempts simpler than the following appear doomed to produce "_MSC_VER"
1082- * literally in the string.
1083- */
1084-#define _Py_PASTE_VERSION(SUFFIX) \
1085- ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]")
1086-/* e.g., this produces, after compile-time string catenation,
1087- * ("[MSC v.1200 32 bit (Intel)]")
1088- *
1089- * _Py_STRINGIZE(_MSC_VER) expands to
1090- * _Py_STRINGIZE1((_MSC_VER)) expands to
1091- * _Py_STRINGIZE2(_MSC_VER) but as this call is the result of token-pasting
1092- * it's scanned again for macros and so further expands to (under MSVC 6)
1093- * _Py_STRINGIZE2(1200) which then expands to
1094- * "1200"
1095- */
1096-#define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
1097-#define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
1098-#define _Py_STRINGIZE2(X) #X
1099-
1100-/* MSVC defines _WINxx to differentiate the windows platform types
1101-
1102- Note that for compatibility reasons _WIN32 is defined on Win32
1103- *and* on Win64. For the same reasons, in Python, MS_WIN32 is
1104- defined on Win32 *and* Win64. Win32 only code must therefore be
1105- guarded as follows:
1106- #if defined(MS_WIN32) && !defined(MS_WIN64)
1107- Some modules are disabled on Itanium processors, therefore we
1108- have MS_WINI64 set for those targets, otherwise MS_WINX64
1109-*/
1110-#ifdef _WIN64
1111-#define MS_WIN64
1112-#endif
1113-
1114-/* set the COMPILER */
1115-#ifdef MS_WIN64
1116-#if defined(_M_IA64)
1117-#define COMPILER _Py_PASTE_VERSION("64 bit (Itanium)")
1118-#define MS_WINI64
1119-#elif defined(_M_X64) || defined(_M_AMD64)
1120-#define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
1121-#define MS_WINX64
1122-#else
1123-#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
1124-#endif
1125-#endif /* MS_WIN64 */
1126-
1127-/* set the version macros for the windows headers */
1128-#ifdef MS_WINX64
1129-/* 64 bit only runs on XP or greater */
1130-#define Py_WINVER _WIN32_WINNT_WINXP
1131-#define Py_NTDDI NTDDI_WINXP
1132-#else
1133-/* Python 2.6+ requires Windows 2000 or greater */
1134-#ifdef _WIN32_WINNT_WIN2K
1135-#define Py_WINVER _WIN32_WINNT_WIN2K
1136-#else
1137-#define Py_WINVER 0x0500
1138-#endif
1139-#define Py_NTDDI NTDDI_WIN2KSP4
1140-#endif
1141-
1142-/* We only set these values when building Python - we don't want to force
1143- these values on extensions, as that will affect the prototypes and
1144- structures exposed in the Windows headers. Even when building Python, we
1145- allow a single source file to override this - they may need access to
1146- structures etc so it can optionally use new Windows features if it
1147- determines at runtime they are available.
1148-*/
1149-#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_MODULE)
1150-#ifndef NTDDI_VERSION
1151-#define NTDDI_VERSION Py_NTDDI
1152-#endif
1153-#ifndef WINVER
1154-#define WINVER Py_WINVER
1155-#endif
1156-#ifndef _WIN32_WINNT
1157-#define _WIN32_WINNT Py_WINVER
1158-#endif
1159-#endif
1160-
1161-/* _W64 is not defined for VC6 or eVC4 */
1162-#ifndef _W64
1163-#define _W64
1164-#endif
1165-
1166-/* Define like size_t, omitting the "unsigned" */
1167-#ifdef MS_WIN64
1168-typedef __int64 ssize_t;
1169-#else
1170-typedef _W64 int ssize_t;
1171-#endif
1172-#define HAVE_SSIZE_T 1
1173-
1174-#if defined(MS_WIN32) && !defined(MS_WIN64)
1175-#ifdef _M_IX86
1176-#define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
1177-#else
1178-#define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
1179-#endif
1180-#endif /* MS_WIN32 && !MS_WIN64 */
1181-
1182-typedef int pid_t;
1183-
1184-#include <float.h>
1185-#define Py_IS_NAN _isnan
1186-#define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
1187-#define Py_IS_FINITE(X) _finite(X)
1188-#define copysign _copysign
1189-#define hypot _hypot
1190-
1191-#endif /* _MSC_VER */
1192-
1193-/* define some ANSI types that are not defined in earlier Win headers */
1194-#if defined(_MSC_VER) && _MSC_VER >= 1200
1195-/* This file only exists in VC 6.0 or higher */
1196-#include <basetsd.h>
1197-#endif
1198-
1199-/* ------------------------------------------------------------------------*/
1200-/* The Borland compiler defines __BORLANDC__ */
1201-/* XXX These defines are likely incomplete, but should be easy to fix. */
1202-#ifdef __BORLANDC__
1203-#define COMPILER "[Borland]"
1204-
1205-#ifdef _WIN32
1206-/* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
1207- */
1208-
1209-typedef int pid_t;
1210-/* BCC55 seems to understand __declspec(dllimport), it is used in its
1211- own header files (winnt.h, ...) - so we can do nothing and get the default*/
1212-
1213-#undef HAVE_SYS_UTIME_H
1214-#define HAVE_UTIME_H
1215-#define HAVE_DIRENT_H
1216-
1217-/* rename a few functions for the Borland compiler */
1218-#include <io.h>
1219-#define _chsize chsize
1220-#define _setmode setmode
1221-
1222-#else /* !_WIN32 */
1223-#error "Only Win32 and later are supported"
1224-#endif /* !_WIN32 */
1225-
1226-#endif /* BORLANDC */
1227-
1228-/* ------------------------------------------------------------------------*/
1229-/* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
1230-#if defined(__GNUC__) && defined(_WIN32)
1231-/* XXX These defines are likely incomplete, but should be easy to fix.
1232- They should be complete enough to build extension modules. */
1233-/* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.*
1234- bug that requires structure imports. More recent versions of the
1235- compiler don't exhibit this bug.
1236-*/
1237-#if (__GNUC__==2) && (__GNUC_MINOR__<=91)
1238-#warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
1239-#endif
1240-
1241-#define COMPILER "[gcc]"
1242-#define hypot _hypot
1243-#define PY_LONG_LONG long long
1244-#define PY_LLONG_MIN LLONG_MIN
1245-#define PY_LLONG_MAX LLONG_MAX
1246-#define PY_ULLONG_MAX ULLONG_MAX
1247-#endif /* GNUC */
1248-
1249-/* ------------------------------------------------------------------------*/
1250-/* lcc-win32 defines __LCC__ */
1251-#if defined(__LCC__)
1252-/* XXX These defines are likely incomplete, but should be easy to fix.
1253- They should be complete enough to build extension modules. */
1254-
1255-#define COMPILER "[lcc-win32]"
1256-typedef int pid_t;
1257-/* __declspec() is supported here too - do nothing to get the defaults */
1258-
1259-#endif /* LCC */
1260-
1261-/* ------------------------------------------------------------------------*/
1262-/* End of compilers - finish up */
1263-
1264-#ifndef NO_STDIO_H
1265-# include <stdio.h>
1266-#endif
1267-
1268-/* 64 bit ints are usually spelt __int64 unless compiler has overridden */
1269-#define HAVE_LONG_LONG 1
1270-#ifndef PY_LONG_LONG
1271-# define PY_LONG_LONG __int64
1272-# define PY_LLONG_MAX _I64_MAX
1273-# define PY_LLONG_MIN _I64_MIN
1274-# define PY_ULLONG_MAX _UI64_MAX
1275-#endif
1276-
1277-/* For Windows the Python core is in a DLL by default. Test
1278-Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
1279-#if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
1280-# define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
1281-# define MS_COREDLL /* deprecated old symbol */
1282-#endif /* !MS_NO_COREDLL && ... */
1283-
1284-/* All windows compilers that use this header support __declspec */
1285-#define HAVE_DECLSPEC_DLL
1286-
1287-/* For an MSVC DLL, we can nominate the .lib files used by extensions */
1288-#ifdef MS_COREDLL
1289-# ifndef Py_BUILD_CORE /* not building the core - must be an ext */
1290-# if defined(_MSC_VER)
1291- /* So MSVC users need not specify the .lib file in
1292- their Makefile (other compilers are generally
1293- taken care of by distutils.) */
1294-# ifdef _DEBUG
1295-# pragma comment(lib,"python27.lib")
1296-# else
1297-# pragma comment(lib,"python27.lib")
1298-# endif /* _DEBUG */
1299-# endif /* _MSC_VER */
1300-# endif /* Py_BUILD_CORE */
1301-#endif /* MS_COREDLL */
1302-
1303-#if defined(MS_WIN64)
1304-/* maintain "win32" sys.platform for backward compatibility of Python code,
1305- the Win64 API should be close enough to the Win32 API to make this
1306- preferable */
1307-# define PLATFORM "win32"
1308-# define SIZEOF_VOID_P 8
1309-# define SIZEOF_TIME_T 8
1310-# define SIZEOF_OFF_T 4
1311-# define SIZEOF_FPOS_T 8
1312-# define SIZEOF_HKEY 8
1313-# define SIZEOF_SIZE_T 8
1314-/* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
1315- sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
1316- On Win64 the second condition is not true, but if fpos_t replaces off_t
1317- then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
1318- should define this. */
1319-# define HAVE_LARGEFILE_SUPPORT
1320-#elif defined(MS_WIN32)
1321-# define PLATFORM "win32"
1322-# define HAVE_LARGEFILE_SUPPORT
1323-# define SIZEOF_VOID_P 4
1324-# define SIZEOF_OFF_T 4
1325-# define SIZEOF_FPOS_T 8
1326-# define SIZEOF_HKEY 4
1327-# define SIZEOF_SIZE_T 4
1328- /* MS VS2005 changes time_t to an 64-bit type on all platforms */
1329-# if defined(_MSC_VER) && _MSC_VER >= 1400
1330-# define SIZEOF_TIME_T 8
1331-# else
1332-# define SIZEOF_TIME_T 4
1333-# endif
1334-#endif
1335-
1336-#ifdef _DEBUG
1337-//# define Py_DEBUG
1338-#endif
1339-
1340-
1341-#ifdef MS_WIN32
1342-
1343-#define SIZEOF_SHORT 2
1344-#define SIZEOF_INT 4
1345-#define SIZEOF_LONG 4
1346-#define SIZEOF_LONG_LONG 8
1347-#define SIZEOF_DOUBLE 8
1348-#define SIZEOF_FLOAT 4
1349-
1350-/* VC 7.1 has them and VC 6.0 does not. VC 6.0 has a version number of 1200.
1351- Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't
1352- define these.
1353- If some compiler does not provide them, modify the #if appropriately. */
1354-#if defined(_MSC_VER)
1355-#if _MSC_VER > 1300
1356-#define HAVE_UINTPTR_T 1
1357-#define HAVE_INTPTR_T 1
1358-#else
1359-/* VC6, VS 2002 and eVC4 don't support the C99 LL suffix for 64-bit integer literals */
1360-#define Py_LL(x) x##I64
1361-#endif /* _MSC_VER > 1200 */
1362-#endif /* _MSC_VER */
1363-
1364-#endif
1365-
1366-/* define signed and unsigned exact-width 32-bit and 64-bit types, used in the
1367- implementation of Python long integers. */
1368-#ifndef PY_UINT32_T
1369-#if SIZEOF_INT == 4
1370-#define HAVE_UINT32_T 1
1371-#define PY_UINT32_T unsigned int
1372-#elif SIZEOF_LONG == 4
1373-#define HAVE_UINT32_T 1
1374-#define PY_UINT32_T unsigned long
1375-#endif
1376-#endif
1377-
1378-#ifndef PY_UINT64_T
1379-#if SIZEOF_LONG_LONG == 8
1380-#define HAVE_UINT64_T 1
1381-#define PY_UINT64_T unsigned PY_LONG_LONG
1382-#endif
1383-#endif
1384-
1385-#ifndef PY_INT32_T
1386-#if SIZEOF_INT == 4
1387-#define HAVE_INT32_T 1
1388-#define PY_INT32_T int
1389-#elif SIZEOF_LONG == 4
1390-#define HAVE_INT32_T 1
1391-#define PY_INT32_T long
1392-#endif
1393-#endif
1394-
1395-#ifndef PY_INT64_T
1396-#if SIZEOF_LONG_LONG == 8
1397-#define HAVE_INT64_T 1
1398-#define PY_INT64_T PY_LONG_LONG
1399-#endif
1400-#endif
1401-
1402-/* Fairly standard from here! */
1403-
1404-/* Define to 1 if you have the `copysign' function. */
1405-#define HAVE_COPYSIGN 1
1406-
1407-/* Define to 1 if you have the `isinf' macro. */
1408-#define HAVE_DECL_ISINF 1
1409-
1410-/* Define to 1 if you have the `isnan' function. */
1411-#define HAVE_DECL_ISNAN 1
1412-
1413-/* Define if on AIX 3.
1414- System headers sometimes define this.
1415- We just want to avoid a redefinition error message. */
1416-#ifndef _ALL_SOURCE
1417-/* #undef _ALL_SOURCE */
1418-#endif
1419-
1420-/* Define to empty if the keyword does not work. */
1421-/* #define const */
1422-
1423-/* Define to 1 if you have the <conio.h> header file. */
1424-#ifndef MS_WINCE
1425-#define HAVE_CONIO_H 1
1426-#endif
1427-
1428-/* Define to 1 if you have the <direct.h> header file. */
1429-#ifndef MS_WINCE
1430-#define HAVE_DIRECT_H 1
1431-#endif
1432-
1433-/* Define if you have dirent.h. */
1434-/* #define DIRENT 1 */
1435-
1436-/* Define to the type of elements in the array set by `getgroups'.
1437- Usually this is either `int' or `gid_t'. */
1438-/* #undef GETGROUPS_T */
1439-
1440-/* Define to `int' if <sys/types.h> doesn't define. */
1441-/* #undef gid_t */
1442-
1443-/* Define if your struct tm has tm_zone. */
1444-/* #undef HAVE_TM_ZONE */
1445-
1446-/* Define if you don't have tm_zone but do have the external array
1447- tzname. */
1448-#define HAVE_TZNAME
1449-
1450-/* Define to `int' if <sys/types.h> doesn't define. */
1451-/* #undef mode_t */
1452-
1453-/* Define if you don't have dirent.h, but have ndir.h. */
1454-/* #undef NDIR */
1455-
1456-/* Define to `long' if <sys/types.h> doesn't define. */
1457-/* #undef off_t */
1458-
1459-/* Define to `int' if <sys/types.h> doesn't define. */
1460-/* #undef pid_t */
1461-
1462-/* Define if the system does not provide POSIX.1 features except
1463- with this defined. */
1464-/* #undef _POSIX_1_SOURCE */
1465-
1466-/* Define if you need to in order for stat and other things to work. */
1467-/* #undef _POSIX_SOURCE */
1468-
1469-/* Define as the return type of signal handlers (int or void). */
1470-#define RETSIGTYPE void
1471-
1472-/* Define to `unsigned' if <sys/types.h> doesn't define. */
1473-/* #undef size_t */
1474-
1475-/* Define if you have the ANSI C header files. */
1476-#define STDC_HEADERS 1
1477-
1478-/* Define if you don't have dirent.h, but have sys/dir.h. */
1479-/* #undef SYSDIR */
1480-
1481-/* Define if you don't have dirent.h, but have sys/ndir.h. */
1482-/* #undef SYSNDIR */
1483-
1484-/* Define if you can safely include both <sys/time.h> and <time.h>. */
1485-/* #undef TIME_WITH_SYS_TIME */
1486-
1487-/* Define if your <sys/time.h> declares struct tm. */
1488-/* #define TM_IN_SYS_TIME 1 */
1489-
1490-/* Define to `int' if <sys/types.h> doesn't define. */
1491-/* #undef uid_t */
1492-
1493-/* Define if the closedir function returns void instead of int. */
1494-/* #undef VOID_CLOSEDIR */
1495-
1496-/* Define if getpgrp() must be called as getpgrp(0)
1497- and (consequently) setpgrp() as setpgrp(0, 0). */
1498-/* #undef GETPGRP_HAVE_ARGS */
1499-
1500-/* Define this if your time.h defines altzone */
1501-/* #define HAVE_ALTZONE */
1502-
1503-/* Define if you have the putenv function. */
1504-#ifndef MS_WINCE
1505-#define HAVE_PUTENV
1506-#endif
1507-
1508-/* Define if your compiler supports function prototypes */
1509-#define HAVE_PROTOTYPES
1510-
1511-/* Define if you can safely include both <sys/select.h> and <sys/time.h>
1512- (which you can't on SCO ODT 3.0). */
1513-/* #undef SYS_SELECT_WITH_SYS_TIME */
1514-
1515-/* Define if you want documentation strings in extension modules */
1516-#define WITH_DOC_STRINGS 1
1517-
1518-/* Define if you want to compile in rudimentary thread support */
1519-/* #undef WITH_THREAD */
1520-
1521-/* Define if you want to use the GNU readline library */
1522-/* #define WITH_READLINE 1 */
1523-
1524-/* Define if you want to have a Unicode type. */
1525-#define Py_USING_UNICODE
1526-
1527-/* Define as the size of the unicode type. */
1528-/* This is enough for unicodeobject.h to do the "right thing" on Windows. */
1529-#define Py_UNICODE_SIZE 2
1530-
1531-/* Use Python's own small-block memory-allocator. */
1532-#define WITH_PYMALLOC 1
1533-
1534-/* Define if you have clock. */
1535-/* #define HAVE_CLOCK */
1536-
1537-/* Define when any dynamic module loading is enabled */
1538-#define HAVE_DYNAMIC_LOADING
1539-
1540-/* Define if you have ftime. */
1541-#ifndef MS_WINCE
1542-#define HAVE_FTIME
1543-#endif
1544-
1545-/* Define if you have getpeername. */
1546-#define HAVE_GETPEERNAME
1547-
1548-/* Define if you have getpgrp. */
1549-/* #undef HAVE_GETPGRP */
1550-
1551-/* Define if you have getpid. */
1552-#ifndef MS_WINCE
1553-#define HAVE_GETPID
1554-#endif
1555-
1556-/* Define if you have gettimeofday. */
1557-/* #undef HAVE_GETTIMEOFDAY */
1558-
1559-/* Define if you have getwd. */
1560-/* #undef HAVE_GETWD */
1561-
1562-/* Define if you have lstat. */
1563-/* #undef HAVE_LSTAT */
1564-
1565-/* Define if you have the mktime function. */
1566-#define HAVE_MKTIME
1567-
1568-/* Define if you have nice. */
1569-/* #undef HAVE_NICE */
1570-
1571-/* Define if you have readlink. */
1572-/* #undef HAVE_READLINK */
1573-
1574-/* Define if you have select. */
1575-/* #undef HAVE_SELECT */
1576-
1577-/* Define if you have setpgid. */
1578-/* #undef HAVE_SETPGID */
1579-
1580-/* Define if you have setpgrp. */
1581-/* #undef HAVE_SETPGRP */
1582-
1583-/* Define if you have setsid. */
1584-/* #undef HAVE_SETSID */
1585-
1586-/* Define if you have setvbuf. */
1587-#define HAVE_SETVBUF
1588-
1589-/* Define if you have siginterrupt. */
1590-/* #undef HAVE_SIGINTERRUPT */
1591-
1592-/* Define if you have symlink. */
1593-/* #undef HAVE_SYMLINK */
1594-
1595-/* Define if you have tcgetpgrp. */
1596-/* #undef HAVE_TCGETPGRP */
1597-
1598-/* Define if you have tcsetpgrp. */
1599-/* #undef HAVE_TCSETPGRP */
1600-
1601-/* Define if you have times. */
1602-/* #undef HAVE_TIMES */
1603-
1604-/* Define if you have uname. */
1605-/* #undef HAVE_UNAME */
1606-
1607-/* Define if you have waitpid. */
1608-/* #undef HAVE_WAITPID */
1609-
1610-/* Define to 1 if you have the `wcscoll' function. */
1611-#ifndef MS_WINCE
1612-#define HAVE_WCSCOLL 1
1613-#endif
1614-
1615-/* Define if you have the <dlfcn.h> header file. */
1616-/* #undef HAVE_DLFCN_H */
1617-
1618-/* Define to 1 if you have the <errno.h> header file. */
1619-#ifndef MS_WINCE
1620-#define HAVE_ERRNO_H 1
1621-#endif
1622-
1623-/* Define if you have the <fcntl.h> header file. */
1624-#ifndef MS_WINCE
1625-#define HAVE_FCNTL_H 1
1626-#endif
1627-
1628-/* Define to 1 if you have the <process.h> header file. */
1629-#ifndef MS_WINCE
1630-#define HAVE_PROCESS_H 1
1631-#endif
1632-
1633-/* Define to 1 if you have the <signal.h> header file. */
1634-#ifndef MS_WINCE
1635-#define HAVE_SIGNAL_H 1
1636-#endif
1637-
1638-/* Define if you have the <stdarg.h> prototypes. */
1639-#define HAVE_STDARG_PROTOTYPES
1640-
1641-/* Define if you have the <stddef.h> header file. */
1642-#define HAVE_STDDEF_H 1
1643-
1644-/* Define if you have the <sys/audioio.h> header file. */
1645-/* #undef HAVE_SYS_AUDIOIO_H */
1646-
1647-/* Define if you have the <sys/param.h> header file. */
1648-/* #define HAVE_SYS_PARAM_H 1 */
1649-
1650-/* Define if you have the <sys/select.h> header file. */
1651-/* #define HAVE_SYS_SELECT_H 1 */
1652-
1653-/* Define to 1 if you have the <sys/stat.h> header file. */
1654-#ifndef MS_WINCE
1655-#define HAVE_SYS_STAT_H 1
1656-#endif
1657-
1658-/* Define if you have the <sys/time.h> header file. */
1659-/* #define HAVE_SYS_TIME_H 1 */
1660-
1661-/* Define if you have the <sys/times.h> header file. */
1662-/* #define HAVE_SYS_TIMES_H 1 */
1663-
1664-/* Define to 1 if you have the <sys/types.h> header file. */
1665-#ifndef MS_WINCE
1666-#define HAVE_SYS_TYPES_H 1
1667-#endif
1668-
1669-/* Define if you have the <sys/un.h> header file. */
1670-/* #define HAVE_SYS_UN_H 1 */
1671-
1672-/* Define if you have the <sys/utime.h> header file. */
1673-/* #define HAVE_SYS_UTIME_H 1 */
1674-
1675-/* Define if you have the <sys/utsname.h> header file. */
1676-/* #define HAVE_SYS_UTSNAME_H 1 */
1677-
1678-/* Define if you have the <thread.h> header file. */
1679-/* #undef HAVE_THREAD_H */
1680-
1681-/* Define if you have the <unistd.h> header file. */
1682-/* #define HAVE_UNISTD_H 1 */
1683-
1684-/* Define if you have the <utime.h> header file. */
1685-/* #define HAVE_UTIME_H 1 */
1686-
1687-/* Define if the compiler provides a wchar.h header file. */
1688-#define HAVE_WCHAR_H 1
1689-
1690-/* Define if you have the dl library (-ldl). */
1691-/* #undef HAVE_LIBDL */
1692-
1693-/* Define if you have the mpc library (-lmpc). */
1694-/* #undef HAVE_LIBMPC */
1695-
1696-/* Define if you have the nsl library (-lnsl). */
1697-#define HAVE_LIBNSL 1
1698-
1699-/* Define if you have the seq library (-lseq). */
1700-/* #undef HAVE_LIBSEQ */
1701-
1702-/* Define if you have the socket library (-lsocket). */
1703-#define HAVE_LIBSOCKET 1
1704-
1705-/* Define if you have the sun library (-lsun). */
1706-/* #undef HAVE_LIBSUN */
1707-
1708-/* Define if you have the termcap library (-ltermcap). */
1709-/* #undef HAVE_LIBTERMCAP */
1710-
1711-/* Define if you have the termlib library (-ltermlib). */
1712-/* #undef HAVE_LIBTERMLIB */
1713-
1714-/* Define if you have the thread library (-lthread). */
1715-/* #undef HAVE_LIBTHREAD */
1716-
1717-/* WinSock does not use a bitmask in select, and uses
1718- socket handles greater than FD_SETSIZE */
1719-#define Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
1720-
1721-/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
1722- least significant byte first */
1723-#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
1724-
1725-#endif /* !Py_CONFIG_H */
1726
1727=== removed directory 'win_fix/Python33'
1728=== removed file 'win_fix/Python33/pyconfig.h'
1729--- win_fix/Python33/pyconfig.h 2014-01-17 13:26:46 +0000
1730+++ win_fix/Python33/pyconfig.h 1970-01-01 00:00:00 +0000
1731@@ -1,765 +0,0 @@
1732-#ifndef Py_CONFIG_H
1733-#define Py_CONFIG_H
1734-
1735-/* pyconfig.h. NOT Generated automatically by configure.
1736-
1737-This is a manually maintained version used for the Watcom,
1738-Borland and Microsoft Visual C++ compilers. It is a
1739-standard part of the Python distribution.
1740-
1741-WINDOWS DEFINES:
1742-The code specific to Windows should be wrapped around one of
1743-the following #defines
1744-
1745-MS_WIN64 - Code specific to the MS Win64 API
1746-MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs)
1747-MS_WINDOWS - Code specific to Windows, but all versions.
1748-MS_WINCE - Code specific to Windows CE
1749-Py_ENABLE_SHARED - Code if the Python core is built as a DLL.
1750-
1751-Also note that neither "_M_IX86" or "_MSC_VER" should be used for
1752-any purpose other than "Windows Intel x86 specific" and "Microsoft
1753-compiler specific". Therefore, these should be very rare.
1754-
1755-
1756-NOTE: The following symbols are deprecated:
1757-NT, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT
1758-MS_CORE_DLL.
1759-
1760-WIN32 is still required for the locale module.
1761-
1762-*/
1763-
1764-#ifdef _WIN32_WCE
1765-#define MS_WINCE
1766-#endif
1767-
1768-/* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */
1769-#ifdef USE_DL_EXPORT
1770-# define Py_BUILD_CORE
1771-#endif /* USE_DL_EXPORT */
1772-
1773-/* Visual Studio 2005 introduces deprecation warnings for
1774- "insecure" and POSIX functions. The insecure functions should
1775- be replaced by *_s versions (according to Microsoft); the
1776- POSIX functions by _* versions (which, according to Microsoft,
1777- would be ISO C conforming). Neither renaming is feasible, so
1778- we just silence the warnings. */
1779-
1780-#ifndef _CRT_SECURE_NO_DEPRECATE
1781-#define _CRT_SECURE_NO_DEPRECATE 1
1782-#endif
1783-#ifndef _CRT_NONSTDC_NO_DEPRECATE
1784-#define _CRT_NONSTDC_NO_DEPRECATE 1
1785-#endif
1786-
1787-/* Windows CE does not have these */
1788-#ifndef MS_WINCE
1789-#define HAVE_IO_H
1790-#define HAVE_SYS_UTIME_H
1791-#define HAVE_TEMPNAM
1792-#define HAVE_TMPFILE
1793-#define HAVE_TMPNAM
1794-#define HAVE_CLOCK
1795-#define HAVE_STRERROR
1796-#endif
1797-
1798-#ifdef HAVE_IO_H
1799-#include <io.h>
1800-#endif
1801-
1802-#define HAVE_HYPOT
1803-#define HAVE_STRFTIME
1804-#define DONT_HAVE_SIG_ALARM
1805-#define DONT_HAVE_SIG_PAUSE
1806-#define LONG_BIT 32
1807-#define WORD_BIT 32
1808-#define PREFIX ""
1809-#define EXEC_PREFIX ""
1810-
1811-#define MS_WIN32 /* only support win32 and greater. */
1812-#define MS_WINDOWS
1813-#ifndef PYTHONPATH
1814-# define PYTHONPATH L".\\DLLs;.\\lib"
1815-#endif
1816-#define NT_THREADS
1817-#define WITH_THREAD
1818-#ifndef NETSCAPE_PI
1819-#define USE_SOCKET
1820-#endif
1821-
1822-/* CE6 doesn't have strdup() but _strdup(). Assume the same for earlier versions. */
1823-#if defined(MS_WINCE)
1824-# include <stdlib.h>
1825-# define strdup _strdup
1826-#endif
1827-
1828-#ifdef MS_WINCE
1829-/* Windows CE does not support environment variables */
1830-#define getenv(v) (NULL)
1831-#define environ (NULL)
1832-#endif
1833-
1834-/* Compiler specific defines */
1835-
1836-/* ------------------------------------------------------------------------*/
1837-/* Microsoft C defines _MSC_VER */
1838-#ifdef _MSC_VER
1839-
1840-/* We want COMPILER to expand to a string containing _MSC_VER's *value*.
1841- * This is horridly tricky, because the stringization operator only works
1842- * on macro arguments, and doesn't evaluate macros passed *as* arguments.
1843- * Attempts simpler than the following appear doomed to produce "_MSC_VER"
1844- * literally in the string.
1845- */
1846-#define _Py_PASTE_VERSION(SUFFIX) \
1847- ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]")
1848-/* e.g., this produces, after compile-time string catenation,
1849- * ("[MSC v.1200 32 bit (Intel)]")
1850- *
1851- * _Py_STRINGIZE(_MSC_VER) expands to
1852- * _Py_STRINGIZE1((_MSC_VER)) expands to
1853- * _Py_STRINGIZE2(_MSC_VER) but as this call is the result of token-pasting
1854- * it's scanned again for macros and so further expands to (under MSVC 6)
1855- * _Py_STRINGIZE2(1200) which then expands to
1856- * "1200"
1857- */
1858-#define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
1859-#define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
1860-#define _Py_STRINGIZE2(X) #X
1861-
1862-/* MSVC defines _WINxx to differentiate the windows platform types
1863-
1864- Note that for compatibility reasons _WIN32 is defined on Win32
1865- *and* on Win64. For the same reasons, in Python, MS_WIN32 is
1866- defined on Win32 *and* Win64. Win32 only code must therefore be
1867- guarded as follows:
1868- #if defined(MS_WIN32) && !defined(MS_WIN64)
1869- Some modules are disabled on Itanium processors, therefore we
1870- have MS_WINI64 set for those targets, otherwise MS_WINX64
1871-*/
1872-#ifdef _WIN64
1873-#define MS_WIN64
1874-#endif
1875-
1876-/* set the COMPILER */
1877-#ifdef MS_WIN64
1878-#if defined(_M_IA64)
1879-#define COMPILER _Py_PASTE_VERSION("64 bit (Itanium)")
1880-#define MS_WINI64
1881-#elif defined(_M_X64) || defined(_M_AMD64)
1882-#define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
1883-#define MS_WINX64
1884-#else
1885-#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
1886-#endif
1887-#endif /* MS_WIN64 */
1888-
1889-/* set the version macros for the windows headers */
1890-#ifdef MS_WINX64
1891-/* 64 bit only runs on XP or greater */
1892-#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */
1893-#define Py_NTDDI NTDDI_WINXP
1894-#else
1895-/* Python 2.6+ requires Windows 2000 or greater */
1896-#define Py_WINVER 0x0500 /* _WIN32_WINNT_WIN2K */
1897-#define Py_NTDDI NTDDI_WIN2KSP4
1898-#endif
1899-
1900-/* We only set these values when building Python - we don't want to force
1901- these values on extensions, as that will affect the prototypes and
1902- structures exposed in the Windows headers. Even when building Python, we
1903- allow a single source file to override this - they may need access to
1904- structures etc so it can optionally use new Windows features if it
1905- determines at runtime they are available.
1906-*/
1907-#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_MODULE)
1908-#ifndef NTDDI_VERSION
1909-#define NTDDI_VERSION Py_NTDDI
1910-#endif
1911-#ifndef WINVER
1912-#define WINVER Py_WINVER
1913-#endif
1914-#ifndef _WIN32_WINNT
1915-#define _WIN32_WINNT Py_WINVER
1916-#endif
1917-#endif
1918-
1919-/* _W64 is not defined for VC6 or eVC4 */
1920-#ifndef _W64
1921-#define _W64
1922-#endif
1923-
1924-/* Define like size_t, omitting the "unsigned" */
1925-#ifdef MS_WIN64
1926-typedef __int64 ssize_t;
1927-#else
1928-typedef _W64 int ssize_t;
1929-#endif
1930-#define HAVE_SSIZE_T 1
1931-
1932-#if defined(MS_WIN32) && !defined(MS_WIN64)
1933-#ifdef _M_IX86
1934-#define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
1935-#else
1936-#define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
1937-#endif
1938-#endif /* MS_WIN32 && !MS_WIN64 */
1939-
1940-typedef int pid_t;
1941-
1942-#include <float.h>
1943-#define Py_IS_NAN _isnan
1944-#define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
1945-#define Py_IS_FINITE(X) _finite(X)
1946-#define copysign _copysign
1947-#define hypot _hypot
1948-
1949-/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/
1950-#if _MSC_VER >= 1400 && _MSC_VER < 1600
1951-#define HAVE_SXS 1
1952-#endif
1953-
1954-/* define some ANSI types that are not defined in earlier Win headers */
1955-#if _MSC_VER >= 1200
1956-/* This file only exists in VC 6.0 or higher */
1957-#include <basetsd.h>
1958-#endif
1959-
1960-#endif /* _MSC_VER */
1961-
1962-/* ------------------------------------------------------------------------*/
1963-/* The Borland compiler defines __BORLANDC__ */
1964-/* XXX These defines are likely incomplete, but should be easy to fix. */
1965-#ifdef __BORLANDC__
1966-#define COMPILER "[Borland]"
1967-
1968-#ifdef _WIN32
1969-/* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
1970- */
1971-
1972-typedef int pid_t;
1973-/* BCC55 seems to understand __declspec(dllimport), it is used in its
1974- own header files (winnt.h, ...) - so we can do nothing and get the default*/
1975-
1976-#undef HAVE_SYS_UTIME_H
1977-#define HAVE_UTIME_H
1978-#define HAVE_DIRENT_H
1979-
1980-/* rename a few functions for the Borland compiler */
1981-#include <io.h>
1982-#define _chsize chsize
1983-#define _setmode setmode
1984-
1985-#else /* !_WIN32 */
1986-#error "Only Win32 and later are supported"
1987-#endif /* !_WIN32 */
1988-
1989-#endif /* BORLANDC */
1990-
1991-/* ------------------------------------------------------------------------*/
1992-/* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
1993-#if defined(__GNUC__) && defined(_WIN32)
1994-/* XXX These defines are likely incomplete, but should be easy to fix.
1995- They should be complete enough to build extension modules. */
1996-/* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.*
1997- bug that requires structure imports. More recent versions of the
1998- compiler don't exhibit this bug.
1999-*/
2000-#if (__GNUC__==2) && (__GNUC_MINOR__<=91)
2001-#warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
2002-#endif
2003-
2004-#define COMPILER "[gcc]"
2005-#define hypot _hypot
2006-#define PY_LONG_LONG long long
2007-#define PY_LLONG_MIN LLONG_MIN
2008-#define PY_LLONG_MAX LLONG_MAX
2009-#define PY_ULLONG_MAX ULLONG_MAX
2010-#endif /* GNUC */
2011-
2012-/* ------------------------------------------------------------------------*/
2013-/* lcc-win32 defines __LCC__ */
2014-#if defined(__LCC__)
2015-/* XXX These defines are likely incomplete, but should be easy to fix.
2016- They should be complete enough to build extension modules. */
2017-
2018-#define COMPILER "[lcc-win32]"
2019-typedef int pid_t;
2020-/* __declspec() is supported here too - do nothing to get the defaults */
2021-
2022-#endif /* LCC */
2023-
2024-/* ------------------------------------------------------------------------*/
2025-/* End of compilers - finish up */
2026-
2027-#ifndef NO_STDIO_H
2028-# include <stdio.h>
2029-#endif
2030-
2031-/* 64 bit ints are usually spelt __int64 unless compiler has overridden */
2032-#define HAVE_LONG_LONG 1
2033-#ifndef PY_LONG_LONG
2034-# define PY_LONG_LONG __int64
2035-# define PY_LLONG_MAX _I64_MAX
2036-# define PY_LLONG_MIN _I64_MIN
2037-# define PY_ULLONG_MAX _UI64_MAX
2038-#endif
2039-
2040-/* For Windows the Python core is in a DLL by default. Test
2041-Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
2042-#if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
2043-# define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
2044-# define MS_COREDLL /* deprecated old symbol */
2045-#endif /* !MS_NO_COREDLL && ... */
2046-
2047-/* All windows compilers that use this header support __declspec */
2048-#define HAVE_DECLSPEC_DLL
2049-
2050-/* For an MSVC DLL, we can nominate the .lib files used by extensions */
2051-#ifdef MS_COREDLL
2052-# ifndef Py_BUILD_CORE /* not building the core - must be an ext */
2053-# if defined(_MSC_VER)
2054- /* So MSVC users need not specify the .lib file in
2055- their Makefile (other compilers are generally
2056- taken care of by distutils.) */
2057-# if defined(_DEBUG)
2058-# pragma comment(lib,"python33.lib")
2059-# elif defined(Py_LIMITED_API)
2060-# pragma comment(lib,"python3.lib")
2061-# else
2062-# pragma comment(lib,"python33.lib")
2063-# endif /* _DEBUG */
2064-# endif /* _MSC_VER */
2065-# endif /* Py_BUILD_CORE */
2066-#endif /* MS_COREDLL */
2067-
2068-#if defined(MS_WIN64)
2069-/* maintain "win32" sys.platform for backward compatibility of Python code,
2070- the Win64 API should be close enough to the Win32 API to make this
2071- preferable */
2072-# define PLATFORM "win32"
2073-# define SIZEOF_VOID_P 8
2074-# define SIZEOF_TIME_T 8
2075-# define SIZEOF_OFF_T 4
2076-# define SIZEOF_FPOS_T 8
2077-# define SIZEOF_HKEY 8
2078-# define SIZEOF_SIZE_T 8
2079-/* configure.ac defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
2080- sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
2081- On Win64 the second condition is not true, but if fpos_t replaces off_t
2082- then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
2083- should define this. */
2084-# define HAVE_LARGEFILE_SUPPORT
2085-#elif defined(MS_WIN32)
2086-# define PLATFORM "win32"
2087-# define HAVE_LARGEFILE_SUPPORT
2088-# define SIZEOF_VOID_P 4
2089-# define SIZEOF_OFF_T 4
2090-# define SIZEOF_FPOS_T 8
2091-# define SIZEOF_HKEY 4
2092-# define SIZEOF_SIZE_T 4
2093- /* MS VS2005 changes time_t to an 64-bit type on all platforms */
2094-# if defined(_MSC_VER) && _MSC_VER >= 1400
2095-# define SIZEOF_TIME_T 8
2096-# else
2097-# define SIZEOF_TIME_T 4
2098-# endif
2099-#endif
2100-
2101-#ifdef _DEBUG
2102-//# define Py_DEBUG
2103-#endif
2104-
2105-
2106-#ifdef MS_WIN32
2107-
2108-#define SIZEOF_SHORT 2
2109-#define SIZEOF_INT 4
2110-#define SIZEOF_LONG 4
2111-#define SIZEOF_LONG_LONG 8
2112-#define SIZEOF_DOUBLE 8
2113-#define SIZEOF_FLOAT 4
2114-
2115-/* VC 7.1 has them and VC 6.0 does not. VC 6.0 has a version number of 1200.
2116- Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't
2117- define these.
2118- If some compiler does not provide them, modify the #if appropriately. */
2119-#if defined(_MSC_VER)
2120-#if _MSC_VER > 1300
2121-#define HAVE_UINTPTR_T 1
2122-#define HAVE_INTPTR_T 1
2123-#else
2124-/* VC6, VS 2002 and eVC4 don't support the C99 LL suffix for 64-bit integer literals */
2125-#define Py_LL(x) x##I64
2126-#endif /* _MSC_VER > 1200 */
2127-#endif /* _MSC_VER */
2128-
2129-#endif
2130-
2131-/* define signed and unsigned exact-width 32-bit and 64-bit types, used in the
2132- implementation of Python long integers. */
2133-#ifndef PY_UINT32_T
2134-#if SIZEOF_INT == 4
2135-#define HAVE_UINT32_T 1
2136-#define PY_UINT32_T unsigned int
2137-#elif SIZEOF_LONG == 4
2138-#define HAVE_UINT32_T 1
2139-#define PY_UINT32_T unsigned long
2140-#endif
2141-#endif
2142-
2143-#ifndef PY_UINT64_T
2144-#if SIZEOF_LONG_LONG == 8
2145-#define HAVE_UINT64_T 1
2146-#define PY_UINT64_T unsigned PY_LONG_LONG
2147-#endif
2148-#endif
2149-
2150-#ifndef PY_INT32_T
2151-#if SIZEOF_INT == 4
2152-#define HAVE_INT32_T 1
2153-#define PY_INT32_T int
2154-#elif SIZEOF_LONG == 4
2155-#define HAVE_INT32_T 1
2156-#define PY_INT32_T long
2157-#endif
2158-#endif
2159-
2160-#ifndef PY_INT64_T
2161-#if SIZEOF_LONG_LONG == 8
2162-#define HAVE_INT64_T 1
2163-#define PY_INT64_T PY_LONG_LONG
2164-#endif
2165-#endif
2166-
2167-/* Fairly standard from here! */
2168-
2169-/* Define to 1 if you have the `copysign' function. */
2170-#define HAVE_COPYSIGN 1
2171-
2172-/* Define to 1 if you have the `isinf' macro. */
2173-#define HAVE_DECL_ISINF 1
2174-
2175-/* Define to 1 if you have the `isnan' function. */
2176-#define HAVE_DECL_ISNAN 1
2177-
2178-/* Define if on AIX 3.
2179- System headers sometimes define this.
2180- We just want to avoid a redefinition error message. */
2181-#ifndef _ALL_SOURCE
2182-/* #undef _ALL_SOURCE */
2183-#endif
2184-
2185-/* Define to empty if the keyword does not work. */
2186-/* #define const */
2187-
2188-/* Define to 1 if you have the <conio.h> header file. */
2189-#ifndef MS_WINCE
2190-#define HAVE_CONIO_H 1
2191-#endif
2192-
2193-/* Define to 1 if you have the <direct.h> header file. */
2194-#ifndef MS_WINCE
2195-#define HAVE_DIRECT_H 1
2196-#endif
2197-
2198-/* Define if you have dirent.h. */
2199-/* #define DIRENT 1 */
2200-
2201-/* Define to the type of elements in the array set by `getgroups'.
2202- Usually this is either `int' or `gid_t'. */
2203-/* #undef GETGROUPS_T */
2204-
2205-/* Define to `int' if <sys/types.h> doesn't define. */
2206-/* #undef gid_t */
2207-
2208-/* Define if your struct tm has tm_zone. */
2209-/* #undef HAVE_TM_ZONE */
2210-
2211-/* Define if you don't have tm_zone but do have the external array
2212- tzname. */
2213-#define HAVE_TZNAME
2214-
2215-/* Define to `int' if <sys/types.h> doesn't define. */
2216-/* #undef mode_t */
2217-
2218-/* Define if you don't have dirent.h, but have ndir.h. */
2219-/* #undef NDIR */
2220-
2221-/* Define to `long' if <sys/types.h> doesn't define. */
2222-/* #undef off_t */
2223-
2224-/* Define to `int' if <sys/types.h> doesn't define. */
2225-/* #undef pid_t */
2226-
2227-/* Define if the system does not provide POSIX.1 features except
2228- with this defined. */
2229-/* #undef _POSIX_1_SOURCE */
2230-
2231-/* Define if you need to in order for stat and other things to work. */
2232-/* #undef _POSIX_SOURCE */
2233-
2234-/* Define as the return type of signal handlers (int or void). */
2235-#define RETSIGTYPE void
2236-
2237-/* Define to `unsigned' if <sys/types.h> doesn't define. */
2238-/* #undef size_t */
2239-
2240-/* Define if you have the ANSI C header files. */
2241-#define STDC_HEADERS 1
2242-
2243-/* Define if you don't have dirent.h, but have sys/dir.h. */
2244-/* #undef SYSDIR */
2245-
2246-/* Define if you don't have dirent.h, but have sys/ndir.h. */
2247-/* #undef SYSNDIR */
2248-
2249-/* Define if you can safely include both <sys/time.h> and <time.h>. */
2250-/* #undef TIME_WITH_SYS_TIME */
2251-
2252-/* Define if your <sys/time.h> declares struct tm. */
2253-/* #define TM_IN_SYS_TIME 1 */
2254-
2255-/* Define to `int' if <sys/types.h> doesn't define. */
2256-/* #undef uid_t */
2257-
2258-/* Define if the closedir function returns void instead of int. */
2259-/* #undef VOID_CLOSEDIR */
2260-
2261-/* Define if getpgrp() must be called as getpgrp(0)
2262- and (consequently) setpgrp() as setpgrp(0, 0). */
2263-/* #undef GETPGRP_HAVE_ARGS */
2264-
2265-/* Define this if your time.h defines altzone */
2266-/* #define HAVE_ALTZONE */
2267-
2268-/* Define if you have the putenv function. */
2269-#ifndef MS_WINCE
2270-#define HAVE_PUTENV
2271-#endif
2272-
2273-/* Define if your compiler supports function prototypes */
2274-#define HAVE_PROTOTYPES
2275-
2276-/* Define if you can safely include both <sys/select.h> and <sys/time.h>
2277- (which you can't on SCO ODT 3.0). */
2278-/* #undef SYS_SELECT_WITH_SYS_TIME */
2279-
2280-/* Define if you want documentation strings in extension modules */
2281-#define WITH_DOC_STRINGS 1
2282-
2283-/* Define if you want to compile in rudimentary thread support */
2284-/* #undef WITH_THREAD */
2285-
2286-/* Define if you want to use the GNU readline library */
2287-/* #define WITH_READLINE 1 */
2288-
2289-/* Use Python's own small-block memory-allocator. */
2290-#define WITH_PYMALLOC 1
2291-
2292-/* Define if you have clock. */
2293-/* #define HAVE_CLOCK */
2294-
2295-/* Define when any dynamic module loading is enabled */
2296-#define HAVE_DYNAMIC_LOADING
2297-
2298-/* Define if you have ftime. */
2299-#ifndef MS_WINCE
2300-#define HAVE_FTIME
2301-#endif
2302-
2303-/* Define if you have getpeername. */
2304-#define HAVE_GETPEERNAME
2305-
2306-/* Define if you have getpgrp. */
2307-/* #undef HAVE_GETPGRP */
2308-
2309-/* Define if you have getpid. */
2310-#ifndef MS_WINCE
2311-#define HAVE_GETPID
2312-#endif
2313-
2314-/* Define if you have gettimeofday. */
2315-/* #undef HAVE_GETTIMEOFDAY */
2316-
2317-/* Define if you have getwd. */
2318-/* #undef HAVE_GETWD */
2319-
2320-/* Define if you have lstat. */
2321-/* #undef HAVE_LSTAT */
2322-
2323-/* Define if you have the mktime function. */
2324-#define HAVE_MKTIME
2325-
2326-/* Define if you have nice. */
2327-/* #undef HAVE_NICE */
2328-
2329-/* Define if you have readlink. */
2330-/* #undef HAVE_READLINK */
2331-
2332-/* Define if you have select. */
2333-/* #undef HAVE_SELECT */
2334-
2335-/* Define if you have setpgid. */
2336-/* #undef HAVE_SETPGID */
2337-
2338-/* Define if you have setpgrp. */
2339-/* #undef HAVE_SETPGRP */
2340-
2341-/* Define if you have setsid. */
2342-/* #undef HAVE_SETSID */
2343-
2344-/* Define if you have setvbuf. */
2345-#define HAVE_SETVBUF
2346-
2347-/* Define if you have siginterrupt. */
2348-/* #undef HAVE_SIGINTERRUPT */
2349-
2350-/* Define if you have symlink. */
2351-/* #undef HAVE_SYMLINK */
2352-
2353-/* Define if you have tcgetpgrp. */
2354-/* #undef HAVE_TCGETPGRP */
2355-
2356-/* Define if you have tcsetpgrp. */
2357-/* #undef HAVE_TCSETPGRP */
2358-
2359-/* Define if you have times. */
2360-/* #undef HAVE_TIMES */
2361-
2362-/* Define if you have uname. */
2363-/* #undef HAVE_UNAME */
2364-
2365-/* Define if you have waitpid. */
2366-/* #undef HAVE_WAITPID */
2367-
2368-/* Define to 1 if you have the `wcsftime' function. */
2369-#if defined(_MSC_VER) && _MSC_VER >= 1310
2370-#define HAVE_WCSFTIME 1
2371-#endif
2372-
2373-/* Define to 1 if you have the `wcscoll' function. */
2374-#ifndef MS_WINCE
2375-#define HAVE_WCSCOLL 1
2376-#endif
2377-
2378-/* Define to 1 if you have the `wcsxfrm' function. */
2379-#ifndef MS_WINCE
2380-#define HAVE_WCSXFRM 1
2381-#endif
2382-
2383-/* Define if the zlib library has inflateCopy */
2384-#define HAVE_ZLIB_COPY 1
2385-
2386-/* Define if you have the <dlfcn.h> header file. */
2387-/* #undef HAVE_DLFCN_H */
2388-
2389-/* Define to 1 if you have the <errno.h> header file. */
2390-#ifndef MS_WINCE
2391-#define HAVE_ERRNO_H 1
2392-#endif
2393-
2394-/* Define if you have the <fcntl.h> header file. */
2395-#ifndef MS_WINCE
2396-#define HAVE_FCNTL_H 1
2397-#endif
2398-
2399-/* Define to 1 if you have the <process.h> header file. */
2400-#ifndef MS_WINCE
2401-#define HAVE_PROCESS_H 1
2402-#endif
2403-
2404-/* Define to 1 if you have the <signal.h> header file. */
2405-#ifndef MS_WINCE
2406-#define HAVE_SIGNAL_H 1
2407-#endif
2408-
2409-/* Define if you have the <stdarg.h> prototypes. */
2410-#define HAVE_STDARG_PROTOTYPES
2411-
2412-/* Define if you have the <stddef.h> header file. */
2413-#define HAVE_STDDEF_H 1
2414-
2415-/* Define if you have the <sys/audioio.h> header file. */
2416-/* #undef HAVE_SYS_AUDIOIO_H */
2417-
2418-/* Define if you have the <sys/param.h> header file. */
2419-/* #define HAVE_SYS_PARAM_H 1 */
2420-
2421-/* Define if you have the <sys/select.h> header file. */
2422-/* #define HAVE_SYS_SELECT_H 1 */
2423-
2424-/* Define to 1 if you have the <sys/stat.h> header file. */
2425-#ifndef MS_WINCE
2426-#define HAVE_SYS_STAT_H 1
2427-#endif
2428-
2429-/* Define if you have the <sys/time.h> header file. */
2430-/* #define HAVE_SYS_TIME_H 1 */
2431-
2432-/* Define if you have the <sys/times.h> header file. */
2433-/* #define HAVE_SYS_TIMES_H 1 */
2434-
2435-/* Define to 1 if you have the <sys/types.h> header file. */
2436-#ifndef MS_WINCE
2437-#define HAVE_SYS_TYPES_H 1
2438-#endif
2439-
2440-/* Define if you have the <sys/un.h> header file. */
2441-/* #define HAVE_SYS_UN_H 1 */
2442-
2443-/* Define if you have the <sys/utime.h> header file. */
2444-/* #define HAVE_SYS_UTIME_H 1 */
2445-
2446-/* Define if you have the <sys/utsname.h> header file. */
2447-/* #define HAVE_SYS_UTSNAME_H 1 */
2448-
2449-/* Define if you have the <unistd.h> header file. */
2450-/* #define HAVE_UNISTD_H 1 */
2451-
2452-/* Define if you have the <utime.h> header file. */
2453-/* #define HAVE_UTIME_H 1 */
2454-
2455-/* Define if the compiler provides a wchar.h header file. */
2456-#define HAVE_WCHAR_H 1
2457-
2458-/* The size of `wchar_t', as computed by sizeof. */
2459-#define SIZEOF_WCHAR_T 2
2460-
2461-/* Define if you have the dl library (-ldl). */
2462-/* #undef HAVE_LIBDL */
2463-
2464-/* Define if you have the mpc library (-lmpc). */
2465-/* #undef HAVE_LIBMPC */
2466-
2467-/* Define if you have the nsl library (-lnsl). */
2468-#define HAVE_LIBNSL 1
2469-
2470-/* Define if you have the seq library (-lseq). */
2471-/* #undef HAVE_LIBSEQ */
2472-
2473-/* Define if you have the socket library (-lsocket). */
2474-#define HAVE_LIBSOCKET 1
2475-
2476-/* Define if you have the sun library (-lsun). */
2477-/* #undef HAVE_LIBSUN */
2478-
2479-/* Define if you have the termcap library (-ltermcap). */
2480-/* #undef HAVE_LIBTERMCAP */
2481-
2482-/* Define if you have the termlib library (-ltermlib). */
2483-/* #undef HAVE_LIBTERMLIB */
2484-
2485-/* Define if you have the thread library (-lthread). */
2486-/* #undef HAVE_LIBTHREAD */
2487-
2488-/* WinSock does not use a bitmask in select, and uses
2489- socket handles greater than FD_SETSIZE */
2490-#define Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
2491-
2492-/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
2493- least significant byte first */
2494-#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
2495-
2496-#endif /* !Py_CONFIG_H */
2497
2498=== removed file 'win_fix/readme.txt'
2499--- win_fix/readme.txt 2014-01-20 14:29:21 +0000
2500+++ win_fix/readme.txt 1970-01-01 00:00:00 +0000
2501@@ -1,6 +0,0 @@
2502-The Python distro does not come packaged with the debug
2503-library: "pythonXX_d.lib". So, in order to get ECS:Python
2504-to compile in Debug mode:
2505-
2506-copy: "DEBUG Fix\PythonXX\pyconfig.h"
2507-to: "PYTHON_ROOT\include\"
2508\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: