[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] PATCH: bug compiling pygame on osx



Hello,

When compiling pygame v1.7.1 on OSX, with macports, libsdl version 1.2.11, I get the following error:

In function 'get_wm_info': src/display.c:432:
error: 'SDL_SysWMinfo' has no member named 'data'
error: command '/usr/bin/gcc-4.0' failed with exit status 1

In SDL_SysWMInfo, the only platform containing a 'data' member is QNXNTO. APPLE does not have one. The following patch corrects this behaviour.


--- display.c.orig Sun Sep 3 01:50:07 2006
+++ display.c Sun Sep 3 01:58:30 2006
@@ -428,7 +428,7 @@
PyDict_SetItemString(dict, "window", PyInt_FromLong(info.window));
PyDict_SetItemString(dict, "wimpVersion", PyInt_FromLong (info.wimpVersion));
PyDict_SetItemString(dict, "taskHandle", PyInt_FromLong (info.taskHandle));
-#else
+#elif !(defined(__APPLE__) && defined(__MACH__))
PyDict_SetItemString(dict, "data", PyInt_FromLong(info.data));
#endif




Best regards,
Emmanuel