Skip to content

Commit 7bf22de

Browse files
committed
Patch for QNX, by Chris Herborth.
1 parent 91221c2 commit 7bf22de

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

Include/osdefs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@ PERFORMANCE OF THIS SOFTWARE.
4444
#define DELIM '\n'
4545
#endif
4646

47+
/* Mod by chrish: QNX has WATCOM, but isn't DOS */
48+
#if !defined(__QNX__)
4749
#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(__TOS_OS2__)
4850
#define SEP '\\'
4951
#define ALTSEP '/'
5052
#define MAXPATHLEN 256
5153
#define DELIM ';'
5254
#endif
55+
#endif
5356

5457
/* Filename separator */
5558
#ifndef SEP

Modules/timemodule.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extern int ftime();
6464
#endif /* MS_WINDOWS */
6565
#endif /* HAVE_FTIME */
6666

67-
#ifdef __WATCOMC__
67+
#if defined(__WATCOMC__) && !defined(__QNX__)
6868
#include <i86.h>
6969
#else
7070
#ifdef MS_WINDOWS
@@ -77,7 +77,7 @@ extern int ftime();
7777
#define altzone _altzone
7878
#endif /* MS_WIN16 */
7979
#endif /* MS_WINDOWS */
80-
#endif /* !__WATCOMC__ */
80+
#endif /* !__WATCOMC__ || __QNX__ */
8181

8282
#ifdef MS_WIN32
8383
/* Win32 has better clock replacement */
@@ -558,12 +558,12 @@ floatsleep(double secs)
558558
return -1;
559559
}
560560
#else /* !macintosh */
561-
#ifdef __WATCOMC__
561+
#if defined(__WATCOMC__) && !defined(__QNX__)
562562
/* XXX Can't interrupt this sleep */
563563
Py_BEGIN_ALLOW_THREADS
564564
delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */
565565
Py_END_ALLOW_THREADS
566-
#else /* !__WATCOMC__ */
566+
#else /* !__WATCOMC__ || __QNX__ */
567567
#ifdef MSDOS
568568
struct timeb t1, t2;
569569
double frac;
@@ -614,7 +614,7 @@ floatsleep(double secs)
614614
#endif /* !PYOS_OS2 */
615615
#endif /* !MS_WIN32 */
616616
#endif /* !MSDOS */
617-
#endif /* !__WATCOMC__ */
617+
#endif /* !__WATCOMC__ || __QNX__ */
618618
#endif /* !macintosh */
619619
#endif /* !HAVE_SELECT */
620620
return 0;

Parser/intrcheck.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ PyOS_InterruptOccurred()
6464

6565
#endif /* QUICKWIN */
6666

67-
#ifdef _M_IX86
67+
#if defined(_M_IX86) && !defined(__QNX__)
6868
#include <io.h>
6969
#endif
7070

@@ -160,7 +160,7 @@ extern int PyErr_CheckSignals();
160160

161161
/* ARGSUSED */
162162
static RETSIGTYPE
163-
#ifdef _M_IX86
163+
#if defined(_M_IX86) && !defined(__QNX__)
164164
intcatcher(int sig) /* So the C compiler shuts up */
165165
#else /* _M_IX86 */
166166
intcatcher(sig)

0 commit comments

Comments
 (0)