Patch for QNX, by Chris Herborth.

This commit is contained in:
Guido van Rossum 1997-12-02 20:34:19 +00:00
parent 91221c29f2
commit 7bf22de753
3 changed files with 10 additions and 7 deletions

View 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

View 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;

View 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)