Index: configure =================================================================== --- configure (Revision 67606) +++ configure (Arbeitskopie) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 67227 . +# From configure.in Revision: 67463 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -1341,6 +1341,7 @@ compile main() and link python executable with C++ compiler --with-suffix=.exe set executable suffix + --with-stdc89 enforce C89 compatible compiler --with-pydebug build with Py_DEBUG defined --with-libs='lib1 ...' link against additional libs --with-system-ffi build _ctypes module using an installed ffi library @@ -4470,6 +4471,27 @@ esac fi +# Check for --with-stdc89 +{ echo "$as_me:$LINENO: checking for --with-stdc89" >&5 +echo $ECHO_N "checking for --with-stdc89... $ECHO_C" >&6; } + +# Check whether --with-stdc89 was given. +if test "${with_stdc89+set}" = set; then + withval=$with_stdc89; +if test "$withval" != no +then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; }; + with_stdc89='true' +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; with_stdc89='false' +fi +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + # Check for --with-pydebug { echo "$as_me:$LINENO: checking for --with-pydebug" >&5 echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } @@ -4626,6 +4648,11 @@ BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" fi + # --with-stdc89 option + if test "$with_stdc89" = 'true' ; then + BASECFLAGS="-std=c89 $BASECFLAGS" + fi + # if using gcc on alpha, use -mieee to get (near) full IEEE 754 # support. Without this, treatment of subnormals doesn't follow # the standard. @@ -13403,7 +13430,7 @@ fi # Dynamic linking for HP-UX -# only check for sem_ini if thread support is requested +# only check for sem_init if thread support is requested if test "$with_threads" = "yes" -o -z "$with_threads"; then { echo "$as_me:$LINENO: checking for library containing sem_init" >&5 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; } Index: configure.in =================================================================== --- configure.in (Revision 67606) +++ 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, @@ -886,6 +899,11 @@ BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" fi + # --with-stdc89 option + if test "$with_stdc89" = 'true' ; then + BASECFLAGS="-std=c89 $BASECFLAGS" + fi + # if using gcc on alpha, use -mieee to get (near) full IEEE 754 # support. Without this, treatment of subnormals doesn't follow # the standard. Index: setup.py =================================================================== --- setup.py (Revision 67606) +++ 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 67606) +++ 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