From: Georg Brandl Date: Mon, 24 Jul 2006 13:46:47 +0000 (+0000) Subject: Patch #1527744: right order of includes in order to have HAVE_CONIO_H defined properly. X-Git-Tag: v2.5b3~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=844f7ddcdc3b171ea18c626e46dec14a5786400a;p=python Patch #1527744: right order of includes in order to have HAVE_CONIO_H defined properly. --- diff --git a/PC/winsound.c b/PC/winsound.c index c593d77d4d..4e94230405 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -37,10 +37,10 @@ #include #include +#include #ifdef HAVE_CONIO_H #include /* port functions on Win9x */ #endif -#include PyDoc_STRVAR(sound_playsound_doc, "PlaySound(sound, flags) - a wrapper around the Windows PlaySound API\n" @@ -147,7 +147,7 @@ sound_beep(PyObject *self, PyObject *args) return NULL; } } -#ifdef _M_IX86 +#if defined(_M_IX86) && defined(HAVE_CONIO_H) else if (whichOS == Win9X) { int speaker_state; /* Force timer into oscillator mode via timer control port. */ @@ -172,7 +172,7 @@ sound_beep(PyObject *self, PyObject *args) /* Restore speaker control to original state. */ _outp(0x61, speaker_state); } -#endif /* _M_IX86 */ +#endif /* _M_IX86 && HAVE_CONIO_H */ else { assert(!"winsound's whichOS has insane value"); }