--- ./Modules/_ctypes/libffi/src/mips/ffitarget.h.DIST 2008-08-06 23:37:51.000000000 +0300 +++ ./Modules/_ctypes/libffi/src/mips/ffitarget.h 2008-12-09 01:07:37.000000000 +0200 @@ -27,7 +27,7 @@ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H -#ifdef linux +#ifdef __linux #include # ifndef _ABIN32 # define _ABIN32 _MIPS_SIM_NABI32 --- ./Modules/socketmodule.c.DIST 2008-08-18 22:39:26.000000000 +0300 +++ ./Modules/socketmodule.c 2008-12-09 00:57:40.000000000 +0200 @@ -146,7 +146,7 @@ On the other hand, not all Linux versions agree, so there the settings computed by the configure script are needed! */ -#ifndef linux +#ifndef __linux # undef HAVE_GETHOSTBYNAME_R_3_ARG # undef HAVE_GETHOSTBYNAME_R_5_ARG # undef HAVE_GETHOSTBYNAME_R_6_ARG @@ -161,7 +161,7 @@ # define HAVE_GETHOSTBYNAME_R_3_ARG # elif defined(__sun) || defined(__sgi) # define HAVE_GETHOSTBYNAME_R_5_ARG -# elif defined(linux) +# elif defined(__linux) /* Rely on the configure script */ # else # undef HAVE_GETHOSTBYNAME_R @@ -999,14 +999,14 @@ case AF_UNIX: { struct sockaddr_un *a = (struct sockaddr_un *) addr; -#ifdef linux +#ifdef __linux if (a->sun_path[0] == 0) { /* Linux abstract namespace */ addrlen -= offsetof(struct sockaddr_un, sun_path); return PyString_FromStringAndSize(a->sun_path, addrlen); } else -#endif /* linux */ +#endif /* __linux */ { /* regular NULL-terminated string */ return PyString_FromString(a->sun_path); @@ -1182,7 +1182,7 @@ return 0; addr = (struct sockaddr_un*)addr_ret; -#ifdef linux +#ifdef __linux if (len > 0 && path[0] == 0) { /* Linux abstract namespace extension */ if (len > sizeof addr->sun_path) { @@ -1192,7 +1192,7 @@ } } else -#endif /* linux */ +#endif /* __linux */ { /* regular NULL-terminated string */ if (len >= sizeof addr->sun_path) { --- ./Modules/socketmodule.h.DIST 2008-08-06 23:38:06.000000000 +0300 +++ ./Modules/socketmodule.h 2008-12-09 00:14:37.000000000 +0200 @@ -66,6 +66,14 @@ #endif #ifdef HAVE_LINUX_TIPC_H +/* linux tipc.h header is not c89 compatible - inline in use */ +#if !defined(__cplusplus) && !defined(inline) +# if defined (__GNUC__) +# define inline __inline +# else + /*FIXME*/ +# endif +#endif # include #endif --- ./Modules/fpectlmodule.c.DIST 2008-08-06 23:38:06.000000000 +0300 +++ ./Modules/fpectlmodule.c 2008-12-09 01:06:06.000000000 +0200 @@ -185,7 +185,7 @@ PyOS_setsig(SIGFPE, handler); /*-- DEC ALPHA LINUX ------------------------------------------------------*/ -#elif defined(__alpha) && defined(linux) +#elif defined(__alpha) && defined(__linux) #include unsigned long fp_control = IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE | IEEE_TRAP_ENABLE_OVF; @@ -224,7 +224,7 @@ PyOS_setsig(SIGFPE, handler); /*-- Linux ----------------------------------------------------------------*/ -#elif defined(linux) +#elif defined(__linux) #ifdef __GLIBC__ #include #else --- ./Modules/linuxaudiodev.c.DIST 2008-08-06 23:38:06.000000000 +0300 +++ ./Modules/linuxaudiodev.c 2008-12-06 20:10:09.000000000 +0200 @@ -25,7 +25,10 @@ #include -#if defined(linux) +/* Use __linux, __linux__ or __gnu_linux__ instead linux. + * As example linux isn't defined for -std=c89 compiler flag. + */ +#if defined(__linux) #include #ifndef HAVE_STDINT_H --- ./Modules/ossaudiodev.c.DIST 2008-08-06 23:38:06.000000000 +0300 +++ ./Modules/ossaudiodev.c 2008-12-09 01:02:50.000000000 +0200 @@ -32,7 +32,7 @@ #include #include -#if defined(linux) +#if defined(__linux) #ifndef HAVE_STDINT_H typedef unsigned long uint32_t;