From: Brett Cannon Date: Sat, 10 Jul 2004 00:57:37 +0000 (+0000) Subject: Add an #ifdef __APPLE__ around typedef of foreachfunc to match Apple's X-Git-Tag: v2.4a2~355 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6067ec336e2eff1fc1cce90c67c20b0d4e80c22;p=python Add an #ifdef __APPLE__ around typedef of foreachfunc to match Apple's incorrect declaration for ypall_callback in /usr/include/rpcsvc/ypcInt.h . Shouldn't hurt any code since the differences are unsigned long instead of int and void * instead of char *. Removes warning about improper function pointer assignment during compilation. --- diff --git a/Modules/nismodule.c b/Modules/nismodule.c index 0a38ee85c5..2494adbbed 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -68,7 +68,11 @@ nis_mapname (char *map, int *pfix) return map; } +#ifdef __APPLE__ +typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); +#else typedef int (*foreachfunc)(int, char *, int, char *, int, char *); +#endif struct ypcallback_data { PyObject *dict;