]> granicus.if.org Git - python/commitdiff
Guard definition of TIPC_SUB_CANCEL with an #ifdef.
authorGeorg Brandl <georg@python.org>
Fri, 11 Jan 2008 09:19:11 +0000 (09:19 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 11 Jan 2008 09:19:11 +0000 (09:19 +0000)
Modules/socketmodule.c

index 4e340a6b51a5a4156d8ae9a78a2c24a092ef0263..c060dcde7874341d0db30dec2673fd42f83a0f13 100644 (file)
@@ -4591,7 +4591,10 @@ init_socket(void)
        /* for subscriptions */
        PyModule_AddIntConstant(m, "TIPC_SUB_PORTS", TIPC_SUB_PORTS);
        PyModule_AddIntConstant(m, "TIPC_SUB_SERVICE", TIPC_SUB_SERVICE);
-     /* PyModule_AddIntConstant(m, "TIPC_SUB_CANCEL", TIPC_SUB_CANCEL); XXX This var is missing on gcc (GCC) 4.1.1 (Gentoo 4.1.1) and it breaks the build */
+#ifdef TIPC_SUB_CANCEL
+       /* doesn't seem to be available everywhere */
+       PyModule_AddIntConstant(m, "TIPC_SUB_CANCEL", TIPC_SUB_CANCEL);
+#endif
        PyModule_AddIntConstant(m, "TIPC_WAIT_FOREVER", TIPC_WAIT_FOREVER);
        PyModule_AddIntConstant(m, "TIPC_PUBLISHED", TIPC_PUBLISHED);
        PyModule_AddIntConstant(m, "TIPC_WITHDRAWN", TIPC_WITHDRAWN);