diff --git a/goldlib/gall/Makefile b/goldlib/gall/Makefile index 6f09def..734a2e2 100644 --- a/goldlib/gall/Makefile +++ b/goldlib/gall/Makefile @@ -14,7 +14,7 @@ INCS=-I$(TOP)/goldlib/gall ifdef MINGW INCS+=-I$(TOP)/goldlib/glibc else -ifeq ($(findstring EMX, $(PATH)), EMX) +ifeq ($(PLATFORM),emx) INCS+=-I$(TOP)/goldlib/glibc endif endif diff --git a/goldlib/gall/gctype.h b/goldlib/gall/gctype.h index 14532b4..83e6920 100644 --- a/goldlib/gall/gctype.h +++ b/goldlib/gall/gctype.h @@ -40,9 +40,13 @@ #endif #include #if defined(__EMX__) -#include -#define g_tolower(c) _nls_tolower((uint8_t)(c)) -#define g_toupper(c) _nls_toupper((uint8_t)(c)) +//old EMX 0.9d code +//#include +//#define g_tolower(c) _nls_tolower((uint8_t)(c)) +//#define g_toupper(c) _nls_toupper((uint8_t)(c)) +//old EMX 0.9d code +#define g_tolower(c) tolower(c) +#define g_toupper(c) toupper(c) #elif defined(__WIN32__) #ifdef __cplusplus extern "C" { diff --git a/goldlib/gall/gfilutil.h b/goldlib/gall/gfilutil.h index 8442353..b943066 100644 --- a/goldlib/gall/gfilutil.h +++ b/goldlib/gall/gfilutil.h @@ -269,7 +269,7 @@ int unlock(int handle, long offset, long length); int lock(int handle, long offset, long length); int unlock(int handle, long offset, long length); #if !defined(__QNXNTO__) && !defined(__MINGW32__) -inline long tell(int fh) { return lseek(fh, 0, SEEK_CUR); } +inline off_t tell(int fh) { return lseek(fh, 0, SEEK_CUR); } #endif #endif diff --git a/goldlib/gall/gstrall.h b/goldlib/gall/gstrall.h index 1675e38..75b10a4 100644 --- a/goldlib/gall/gstrall.h +++ b/goldlib/gall/gstrall.h @@ -42,9 +42,11 @@ // ------------------------------------------------------------------ #if defined(__EMX__) -#include -#define strupr(s) (char *)_nls_strupr((uint8_t *)(s)) -#define strlwr(s) (char *)_nls_strlwr((uint8_t *)(s)) +//old EMX 0.9d code +//#include +//#define strupr(s) (char *)_nls_strupr((uint8_t *)(s)) +//#define strlwr(s) (char *)_nls_strlwr((uint8_t *)(s)) +//old EMX 0.9d code #elif defined(__GNUC__) #if defined(__QNXNTO__) || defined(__SUNOS__) #include diff --git a/goldlib/gall/gtimall.h b/goldlib/gall/gtimall.h index c6f9649..b55a88c 100644 --- a/goldlib/gall/gtimall.h +++ b/goldlib/gall/gtimall.h @@ -206,7 +206,7 @@ inline time32_t gmktime(struct tm *timep) #if defined(__OS2__) -inline void usleep(long duration) { DosSleep(duration); } +inline void usleep(int duration) { DosSleep(duration); } #elif (defined(__MINGW32__) && __GNUC__*100+__GNUC_MINOR__ < 304) || defined(_MSC_VER) inline void usleep(long duration) { Sleep(duration); } #endif diff --git a/goldlib/gcfg/Makefile b/goldlib/gcfg/Makefile index c39d517..927251d 100644 --- a/goldlib/gcfg/Makefile +++ b/goldlib/gcfg/Makefile @@ -14,7 +14,7 @@ INCS=-I$(TOP)/goldlib/gall -I$(TOP)/goldlib/gcfg ifdef MINGW INCS+=-I$(TOP)/goldlib/glibc else -ifeq ($(findstring EMX, $(PATH)), EMX) +ifeq ($(PLATFORM),emx) INCS+=-I$(TOP)/goldlib/glibc endif endif diff --git a/goldlib/gmb3/Makefile b/goldlib/gmb3/Makefile index 3fdce72..cf31179 100644 --- a/goldlib/gmb3/Makefile +++ b/goldlib/gmb3/Makefile @@ -14,7 +14,7 @@ INCS=-I$(TOP)/goldlib/gall -I$(TOP)/goldlib/gcfg -I$(TOP)/goldlib/gmb3 -I$(TOP)/ ifdef MINGW INCS+=-I$(TOP)/goldlib/glibc else -ifeq ($(findstring EMX, $(PATH)), EMX) +ifeq ($(PLATFORM),emx) INCS+=-I$(TOP)/goldlib/glibc endif endif diff --git a/rddt/Makefile b/rddt/Makefile index a9dfcf4..d3b7a50 100644 --- a/rddt/Makefile +++ b/rddt/Makefile @@ -12,13 +12,9 @@ TOP=.. SHORTTARGET=rddt TARGET=rddt INCS=-I$(TOP)/goldlib/gall -I$(TOP)/golded3 -ifeq ($(findstring EMX, $(PATH)), EMX) -STDLIBS=-lstdcpp -else ifdef MINGW STDLIBS=-luser32 endif -endif GLIBS=gall CLEANS= ADDS+=$(TOP)/$(OBJPATH)/$(PLATFORM)/golded3/golded3$(OBJEXT)