OS/2 build fix for GNU C 3.5, patch from Max Vasilyev 2:5057/77

This commit is contained in:
Stas Degteff 2010-04-29 22:29:11 +00:00
parent 28b6562a17
commit 3f8f3ac232
8 changed files with 17 additions and 15 deletions

View File

@ -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

View File

@ -40,9 +40,13 @@
#endif
#include <ctype.h>
#if defined(__EMX__)
#include <sys/nls.h>
#define g_tolower(c) _nls_tolower((uint8_t)(c))
#define g_toupper(c) _nls_toupper((uint8_t)(c))
//old EMX 0.9d code
//#include <sys/nls.h>
//#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" {

View File

@ -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

View File

@ -42,9 +42,11 @@
// ------------------------------------------------------------------
#if defined(__EMX__)
#include <sys/nls.h>
#define strupr(s) (char *)_nls_strupr((uint8_t *)(s))
#define strlwr(s) (char *)_nls_strlwr((uint8_t *)(s))
//old EMX 0.9d code
//#include <sys/nls.h>
//#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 <strings.h>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)