Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 44636:2ad3e35c5825 legacy-trunk
Guard definition of TIPC_SUB_CANCEL with an #ifdef.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 11 Jan 2008 09:19:11 +0000 |
| parents | 354be0dafe54 |
| children | aadcda7a4bf7 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Fri Jan 11 08:04:03 2008 +0000 +++ b/Modules/socketmodule.c Fri Jan 11 09:19:11 2008 +0000 @@ -4591,7 +4591,10 @@ /* 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);
