From b58d2d4096aefc0cc6efff934a72e83ef560a405 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 25 Mar 2026 08:48:14 -0400 Subject: [PATCH] try to reduce some Amiga cross-compile warnings --- include/amiconf.h | 4 ++++ include/global.h | 6 +++++- sys/amiga/amidos.c | 6 +++++- sys/amiga/amidos.p | 4 ++-- sys/amiga/amiwind.c | 4 ++++ 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/amiconf.h b/include/amiconf.h index b607fd228..c729e6c30 100644 --- a/include/amiconf.h +++ b/include/amiconf.h @@ -17,6 +17,10 @@ #ifdef CROSS_TO_AMIGA #include #include +#include +#include +#include +#include #endif #ifdef __SASC_60 /* since SAS can prevent re-inclusion */ diff --git a/include/global.h b/include/global.h index 6d785ac9a..21b00fe46 100644 --- a/include/global.h +++ b/include/global.h @@ -110,10 +110,14 @@ enum optchoice { opt_in, opt_out}; typedef uchar nhsym; #ifndef STRNCMPI -#ifndef __SASC_60 /* SAS/C already shifts to stricmp */ +/* SAS/C already shifts to stricmp */ +#if !defined(__SASC_60) && !defined(CROSS_TO_AMIGA) #define strcmpi(a, b) strncmpi((a), (b), -1) #endif #endif +#ifdef CROSS_TO_AMIGA +#define strcmpi(a, b) stricmp(a, b) +#endif /* #define SPECIALIZATION */ /* do "specialized" version of new topology */ diff --git a/sys/amiga/amidos.c b/sys/amiga/amidos.c index 3d465ddd2..01d33343f 100644 --- a/sys/amiga/amidos.c +++ b/sys/amiga/amidos.c @@ -450,7 +450,11 @@ fopenp(const char *name, const char *mode) static BPTR OrgDirLock = NO_LOCK; int -chdir(char *dir) +chdir( +#ifdef CROSS_TO_AMIGA + const +#endif + char *dir) { extern char orgdir[]; diff --git a/sys/amiga/amidos.p b/sys/amiga/amidos.p index fc479f9d1..ed669f563 100644 --- a/sys/amiga/amidos.p +++ b/sys/amiga/amidos.p @@ -31,10 +31,10 @@ void getreturn(const char *); #ifndef msmsg void msmsg( const char *, ... ); #endif -#if !defined(__SASC_60) && !defined(_DCC) +#if !defined(__SASC_60) && !defined(_DCC) && !defined(CROSS_TO_AMIGA) int chdir(char *); #endif -#ifndef strcmpi +#ifndef strcmpi int strcmpi(char * , char *); #endif #if !defined(memcmp) && !defined(AZTEC_C) && !defined(_DCC) && !defined(__GNUC__) diff --git a/sys/amiga/amiwind.c b/sys/amiga/amiwind.c index e06630675..d931697b7 100644 --- a/sys/amiga/amiwind.c +++ b/sys/amiga/amiwind.c @@ -891,6 +891,10 @@ amii_loadlib(void) { } +#ifdef CROSS_TO_AMIGA +extern void Abort(long) NORETURN; +#endif + /* fatal error */ /*VARARGS1*/ void error