summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-07-24 13:46:47 (GMT)
committerGeorg Brandl <georg@python.org>2006-07-24 13:46:47 (GMT)
commit844f7ddcdc3b171ea18c626e46dec14a5786400a (patch)
treed1102b4c4ab392d37911248eea95e9ac6d49c60c /PC
parentced52a97b66b564a69cb35edea1502d84d8d9d19 (diff)
downloadcpython-844f7ddcdc3b171ea18c626e46dec14a5786400a.zip
cpython-844f7ddcdc3b171ea18c626e46dec14a5786400a.tar.gz
cpython-844f7ddcdc3b171ea18c626e46dec14a5786400a.tar.bz2
Patch #1527744: right order of includes in order to have HAVE_CONIO_H defined properly.
Diffstat (limited to 'PC')
-rw-r--r--PC/winsound.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/PC/winsound.c b/PC/winsound.c
index c593d77..4e94230 100644
--- a/PC/winsound.c
+++ b/PC/winsound.c
@@ -37,10 +37,10 @@
#include <windows.h>
#include <mmsystem.h>
+#include <Python.h>
#ifdef HAVE_CONIO_H
#include <conio.h> /* port functions on Win9x */
#endif
-#include <Python.h>
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");
}