Kaydet (Commit) 7bf22de7 authored tarafından Guido van Rossum's avatar Guido van Rossum

Patch for QNX, by Chris Herborth.

üst 91221c29
...@@ -44,12 +44,15 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -44,12 +44,15 @@ PERFORMANCE OF THIS SOFTWARE.
#define DELIM '\n' #define DELIM '\n'
#endif #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__) #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(__TOS_OS2__)
#define SEP '\\' #define SEP '\\'
#define ALTSEP '/' #define ALTSEP '/'
#define MAXPATHLEN 256 #define MAXPATHLEN 256
#define DELIM ';' #define DELIM ';'
#endif #endif
#endif
/* Filename separator */ /* Filename separator */
#ifndef SEP #ifndef SEP
......
...@@ -64,7 +64,7 @@ extern int ftime(); ...@@ -64,7 +64,7 @@ extern int ftime();
#endif /* MS_WINDOWS */ #endif /* MS_WINDOWS */
#endif /* HAVE_FTIME */ #endif /* HAVE_FTIME */
#ifdef __WATCOMC__ #if defined(__WATCOMC__) && !defined(__QNX__)
#include <i86.h> #include <i86.h>
#else #else
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
...@@ -77,7 +77,7 @@ extern int ftime(); ...@@ -77,7 +77,7 @@ extern int ftime();
#define altzone _altzone #define altzone _altzone
#endif /* MS_WIN16 */ #endif /* MS_WIN16 */
#endif /* MS_WINDOWS */ #endif /* MS_WINDOWS */
#endif /* !__WATCOMC__ */ #endif /* !__WATCOMC__ || __QNX__ */
#ifdef MS_WIN32 #ifdef MS_WIN32
/* Win32 has better clock replacement */ /* Win32 has better clock replacement */
...@@ -558,12 +558,12 @@ floatsleep(double secs) ...@@ -558,12 +558,12 @@ floatsleep(double secs)
return -1; return -1;
} }
#else /* !macintosh */ #else /* !macintosh */
#ifdef __WATCOMC__ #if defined(__WATCOMC__) && !defined(__QNX__)
/* XXX Can't interrupt this sleep */ /* XXX Can't interrupt this sleep */
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */ delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
#else /* !__WATCOMC__ */ #else /* !__WATCOMC__ || __QNX__ */
#ifdef MSDOS #ifdef MSDOS
struct timeb t1, t2; struct timeb t1, t2;
double frac; double frac;
...@@ -614,7 +614,7 @@ floatsleep(double secs) ...@@ -614,7 +614,7 @@ floatsleep(double secs)
#endif /* !PYOS_OS2 */ #endif /* !PYOS_OS2 */
#endif /* !MS_WIN32 */ #endif /* !MS_WIN32 */
#endif /* !MSDOS */ #endif /* !MSDOS */
#endif /* !__WATCOMC__ */ #endif /* !__WATCOMC__ || __QNX__ */
#endif /* !macintosh */ #endif /* !macintosh */
#endif /* !HAVE_SELECT */ #endif /* !HAVE_SELECT */
return 0; return 0;
......
...@@ -64,7 +64,7 @@ PyOS_InterruptOccurred() ...@@ -64,7 +64,7 @@ PyOS_InterruptOccurred()
#endif /* QUICKWIN */ #endif /* QUICKWIN */
#ifdef _M_IX86 #if defined(_M_IX86) && !defined(__QNX__)
#include <io.h> #include <io.h>
#endif #endif
...@@ -160,7 +160,7 @@ extern int PyErr_CheckSignals(); ...@@ -160,7 +160,7 @@ extern int PyErr_CheckSignals();
/* ARGSUSED */ /* ARGSUSED */
static RETSIGTYPE static RETSIGTYPE
#ifdef _M_IX86 #if defined(_M_IX86) && !defined(__QNX__)
intcatcher(int sig) /* So the C compiler shuts up */ intcatcher(int sig) /* So the C compiler shuts up */
#else /* _M_IX86 */ #else /* _M_IX86 */
intcatcher(sig) intcatcher(sig)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment