From add28c2eb1921bd264631fe4f168bea1e5123fb2 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 26 Apr 2003 17:47:16 +0000 Subject: [PATCH] Initial Support For NetBSD and QNX --- src/uifc/uifc.h | 4 ++++ src/uifc/uifcc.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/uifc/uifc.h b/src/uifc/uifc.h index 5eef0d21b9..ef5743ae6c 100644 --- a/src/uifc/uifc.h +++ b/src/uifc/uifc.h @@ -221,9 +221,13 @@ #ifndef BOOL #define BOOL int +#ifndef TRUE #define TRUE 1 +#endif +#ifndef FALSE #define FALSE 0 #endif +#endif typedef struct { uint left,top,right,bot; diff --git a/src/uifc/uifcc.c b/src/uifc/uifcc.c index 93bd3dc67d..8f766adc25 100644 --- a/src/uifc/uifcc.c +++ b/src/uifc/uifcc.c @@ -38,6 +38,9 @@ #include <unistd.h> #include <sys/time.h> #include "uifc.h" +#ifdef __QNX__ +#include <strings.h> +#endif #if defined(__OS2__) @@ -84,7 +87,9 @@ enum { #define BLINK 128 #define SH_DENYWR 1 #define SH_DENYRW 2 +#ifndef O_BINARY #define O_BINARY 0 +#endif static char hfclr,hbclr,hclr,lclr,bclr,cclr,show_free_mem=0; static char* helpfile=0; @@ -106,7 +111,9 @@ static int gettext(int sx, int sy, int ex, int ey, unsigned char *fill); static short curses_color(short color); static void textattr(unsigned char attr); static int kbhit(void); +#ifndef __QNX__ static void delay(int msec); +#endif static int ugetstr(char *outstr, int max, long mode); static int wherey(void); static int wherex(void); @@ -2047,10 +2054,12 @@ static int kbhit(void) return(select(fileno(stdin)+1,&rfds,NULL,NULL,&timeout)); } +#ifndef __QNX__ static void delay(msec) { usleep(msec*1000); } +#endif static int wherey(void) { -- GitLab