]> granicus.if.org Git - python/commitdiff
Patch for QNX, by Chris Herborth.
authorGuido van Rossum <guido@python.org>
Tue, 2 Dec 1997 20:34:19 +0000 (20:34 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 2 Dec 1997 20:34:19 +0000 (20:34 +0000)
Include/osdefs.h
Modules/timemodule.c
Parser/intrcheck.c

index f9149199bc6e9b9fda32862d9cbc45e9de7d7774..594fc107cf0d23f0ee791c9213015649b6b936e8 100644 (file)
@@ -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
index 6390c407892975958e2d22e0605abc709c7a4149..3fedfa63cd8477a1719f5171712898a19d6d2e9a 100644 (file)
@@ -64,7 +64,7 @@ extern int ftime();
 #endif /* MS_WINDOWS */
 #endif /* HAVE_FTIME */
 
-#ifdef __WATCOMC__
+#if defined(__WATCOMC__) && !defined(__QNX__)
 #include <i86.h>
 #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;
index 7fe6205f444b9ffef7dc5fa8d8ed5c275c255eea..1320bd8f20e73b1406d4ecb45e1524a3ebd41acc 100644 (file)
@@ -64,7 +64,7 @@ PyOS_InterruptOccurred()
 
 #endif /* QUICKWIN */
 
-#ifdef _M_IX86
+#if defined(_M_IX86) && !defined(__QNX__)
 #include <io.h>
 #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)