From f1f51592ba7f3a689aca38fd33cd5e4a31da38c1 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 2 Dec 2003 23:46:03 +0000 Subject: [PATCH] MSC/TurboC compatibility fixes (Luchezar/Bart) git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@735 6ac86273-5f31-0410-b378-82cca8765d1b --- hdr/algnbyte.h | 1 - hdr/portab.h | 3 +++ kernel/inthndlr.c | 2 +- kernel/prf.c | 4 ++-- kernel/proto.h | 1 - 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hdr/algnbyte.h b/hdr/algnbyte.h index adb0e5d..e66c2e3 100644 --- a/hdr/algnbyte.h +++ b/hdr/algnbyte.h @@ -1,6 +1,5 @@ #if defined(_MSC_VER) -#define asm __asm #if _MSC_VER >= 700 #pragma warning(disable:4103) #endif diff --git a/hdr/portab.h b/hdr/portab.h index 3e87e73..9e41ea2 100644 --- a/hdr/portab.h +++ b/hdr/portab.h @@ -69,6 +69,9 @@ void __int__(int); #elif defined (_MSC_VER) #define I86 +#define asm __asm +#pragma warning(disable: 4761) /* "integral size mismatch in argument; + conversion supplied" */ #define CDECL _cdecl #define PASCAL pascal #define __int__(intno) asm int intno; diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index 094c68b..6759458 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -1928,7 +1928,7 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs r) { int rel_idx = idx_to_sft_(r.bx); - if (rel_idx == (size_t) - 1) + if (rel_idx == -1) { r.flags |= FLG_CARRY; break; diff --git a/kernel/prf.c b/kernel/prf.c index c9d1491..ff0364b 100644 --- a/kernel/prf.c +++ b/kernel/prf.c @@ -57,7 +57,7 @@ static BYTE *prfRcsId = static int buff_offset = 0; static char buff[MAX_BUFSIZE]; -VOID put_console(COUNT c) +STATIC VOID put_console(COUNT c) { if (buff_offset >= MAX_BUFSIZE) { @@ -91,7 +91,7 @@ VOID put_console(COUNT c) } } #else -VOID put_console(COUNT c) +STATIC VOID put_console(COUNT c) { if (c == '\n') put_console('\r'); diff --git a/kernel/proto.h b/kernel/proto.h index c82c76a..924d367 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -279,7 +279,6 @@ UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS); int CDECL printf(CONST BYTE * fmt, ...); int CDECL sprintf(BYTE * buff, CONST BYTE * fmt, ...); #endif -VOID put_console(COUNT c); VOID hexd(char *title, VOID FAR * p, COUNT numBytes); void put_unsigned(unsigned n, int base, int width); void put_string(const char *s);