Index: configure.in =================================================================== --- configure.in (Revision 67574) +++ configure.in (Arbeitskopie) @@ -783,6 +783,19 @@ esac fi +# Check for --with-stdc89 +AC_MSG_CHECKING(for --with-stdc89) +AC_ARG_WITH(stdc89, + AC_HELP_STRING(--with-stdc89, enforce C89 compatible compiler), +[ +if test "$withval" != no +then + AC_MSG_RESULT(yes); + with_stdc89='true' +else AC_MSG_RESULT(no); with_stdc89='false' +fi], +[AC_MSG_RESULT(no)]) + # Check for --with-pydebug AC_MSG_CHECKING(for --with-pydebug) AC_ARG_WITH(pydebug, @@ -843,8 +856,11 @@ SCO_SV*) OPT="$OPT -m486 -DSCO5" ;; esac - ;; - + # --with-stdc89 option + if test "$with_stdc89" = 'true' ; then + OPT="-std=c89 $OPT" + fi + ;; *) OPT="-O" ;; Index: setup.py =================================================================== --- setup.py (Revision 67574) +++ setup.py (Arbeitskopie) @@ -1312,7 +1312,8 @@ # Platform-specific libraries if platform == 'linux2': # Linux-specific modules - exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) + exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c'], + define_macros=[("linux", "1")] )) else: missing.append('linuxaudiodev') Index: Modules/socketmodule.h =================================================================== --- Modules/socketmodule.h (Revision 67574) +++ Modules/socketmodule.h (Arbeitskopie) @@ -47,6 +47,11 @@ # undef AF_NETLINK #endif +#if defined(__STRICT_ANSI__) +/* disable inline when python is compiled with -std=c89 */ +#define inline +#endif + #ifdef HAVE_BLUETOOTH_BLUETOOTH_H #include #include @@ -59,15 +64,20 @@ #include #endif +#ifdef HAVE_LINUX_TIPC_H +# include +#endif + +#if defined(__STRICT_ANSI__) && defined(inline) +#undef inline +#endif + #ifdef HAVE_NETPACKET_PACKET_H # include # include # include #endif -#ifdef HAVE_LINUX_TIPC_H -# include -#endif #ifndef Py__SOCKET_H #define Py__SOCKET_H