diff --git a/Include/osdefs.h b/Include/osdefs.h index f9149199bc6..594fc107cf0 100644 --- a/Include/osdefs.h +++ b/Include/osdefs.h @@ -44,12 +44,15 @@ PERFORMANCE OF THIS SOFTWARE. #define DELIM '\n' #endif +/* Mod by chrish: QNX has WATCOM, but isn't DOS */ +#if !defined(__QNX__) #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(__TOS_OS2__) #define SEP '\\' #define ALTSEP '/' #define MAXPATHLEN 256 #define DELIM ';' #endif +#endif /* Filename separator */ #ifndef SEP diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 6390c407892..3fedfa63cd8 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -64,7 +64,7 @@ extern int ftime(); #endif /* MS_WINDOWS */ #endif /* HAVE_FTIME */ -#ifdef __WATCOMC__ +#if defined(__WATCOMC__) && !defined(__QNX__) #include #else #ifdef MS_WINDOWS @@ -77,7 +77,7 @@ extern int ftime(); #define altzone _altzone #endif /* MS_WIN16 */ #endif /* MS_WINDOWS */ -#endif /* !__WATCOMC__ */ +#endif /* !__WATCOMC__ || __QNX__ */ #ifdef MS_WIN32 /* Win32 has better clock replacement */ @@ -558,12 +558,12 @@ floatsleep(double secs) return -1; } #else /* !macintosh */ -#ifdef __WATCOMC__ +#if defined(__WATCOMC__) && !defined(__QNX__) /* XXX Can't interrupt this sleep */ Py_BEGIN_ALLOW_THREADS delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */ Py_END_ALLOW_THREADS -#else /* !__WATCOMC__ */ +#else /* !__WATCOMC__ || __QNX__ */ #ifdef MSDOS struct timeb t1, t2; double frac; @@ -614,7 +614,7 @@ floatsleep(double secs) #endif /* !PYOS_OS2 */ #endif /* !MS_WIN32 */ #endif /* !MSDOS */ -#endif /* !__WATCOMC__ */ +#endif /* !__WATCOMC__ || __QNX__ */ #endif /* !macintosh */ #endif /* !HAVE_SELECT */ return 0; diff --git a/Parser/intrcheck.c b/Parser/intrcheck.c index 7fe6205f444..1320bd8f20e 100644 --- a/Parser/intrcheck.c +++ b/Parser/intrcheck.c @@ -64,7 +64,7 @@ PyOS_InterruptOccurred() #endif /* QUICKWIN */ -#ifdef _M_IX86 +#if defined(_M_IX86) && !defined(__QNX__) #include #endif @@ -160,7 +160,7 @@ extern int PyErr_CheckSignals(); /* ARGSUSED */ static RETSIGTYPE -#ifdef _M_IX86 +#if defined(_M_IX86) && !defined(__QNX__) intcatcher(int sig) /* So the C compiler shuts up */ #else /* _M_IX86 */ intcatcher(sig)