[GRASS-SVN] r42354 - grass/trunk/lib/python/ctypes/ctypesgencore/parser

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 26 10:26:07 EDT 2010


Author: martinl
Date: 2010-05-26 10:26:05 -0400 (Wed, 26 May 2010)
New Revision: 42354

Modified:
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
Log:
Fix compiling ctypes on Windows

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py	2010-05-26 08:25:34 UTC (rev 42353)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py	2010-05-26 14:26:05 UTC (rev 42354)
@@ -109,7 +109,7 @@
 
         # On OSX, explicitly add these defines to keep from getting syntax
         # errors in the OSX standard headers.
-        if os.uname()[0] == 'Darwin':
+        if hasattr(os, 'uname') and os.uname()[0] == 'Darwin':
             self.defines += ["__uint16_t=uint16_t",
                              "__uint32_t=uint32_t",
                              "__uint64_t=uint64_t"]



More information about the grass-commit mailing list