Workaround for SunOS of conflict between system and local int8_t definitions.
System headers implies that char is signed by ABI and define the type as `char' while GoldEd has to be compiled with -funsigned-char and defines it as `signed char'. Thus we have conflict definition. At the same time goldlib cannot be compiled with -fsigned-char.
This commit is contained in:
parent
a49d62da90
commit
5050e3eb8e
@ -42,7 +42,6 @@ WINDRES=windres
|
|||||||
EXEEXT=.exe
|
EXEEXT=.exe
|
||||||
OBJEXT=.o
|
OBJEXT=.o
|
||||||
LIBEXT=.a
|
LIBEXT=.a
|
||||||
CFLAGS+=-funsigned-char
|
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),emx)
|
ifeq ($(PLATFORM),emx)
|
||||||
CAT=cat
|
CAT=cat
|
||||||
@ -64,7 +63,6 @@ LIBEXT=.a
|
|||||||
#OBJEXT=.obj
|
#OBJEXT=.obj
|
||||||
#LIBEXT=.lib
|
#LIBEXT=.lib
|
||||||
CXX=$(CC)
|
CXX=$(CC)
|
||||||
CFLAGS+=-funsigned-char
|
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),djg)
|
ifeq ($(PLATFORM),djg)
|
||||||
CAT=command.com /c type
|
CAT=command.com /c type
|
||||||
@ -78,7 +76,6 @@ SHELL=sh
|
|||||||
EXEEXT=.exe
|
EXEEXT=.exe
|
||||||
OBJEXT=.o
|
OBJEXT=.o
|
||||||
LIBEXT=.a
|
LIBEXT=.a
|
||||||
CFLAGS+=-funsigned-char
|
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),be)
|
ifeq ($(PLATFORM),be)
|
||||||
CAT=cat
|
CAT=cat
|
||||||
@ -91,7 +88,6 @@ RANLIB=ranlib
|
|||||||
EXEEXT=
|
EXEEXT=
|
||||||
OBJEXT=.o
|
OBJEXT=.o
|
||||||
LIBEXT=.a
|
LIBEXT=.a
|
||||||
CFLAGS+=-funsigned-char
|
|
||||||
LNKFLAGS+=-lbe -ltextencoding
|
LNKFLAGS+=-lbe -ltextencoding
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),sun) # SUN Solaris
|
ifeq ($(PLATFORM),sun) # SUN Solaris
|
||||||
@ -105,7 +101,7 @@ RANLIB=ranlib
|
|||||||
EXEEXT=
|
EXEEXT=
|
||||||
OBJEXT=.o
|
OBJEXT=.o
|
||||||
LIBEXT=.a
|
LIBEXT=.a
|
||||||
CFLAGS+=-fsigned-char -D__SUNOS__ -D__UNIX__ -DUNIX
|
CFLAGS+=-D__SUNOS__ -D__UNIX__ -DUNIX
|
||||||
else # Linux, *BSD or another unix-like OS
|
else # Linux, *BSD or another unix-like OS
|
||||||
CAT=cat
|
CAT=cat
|
||||||
SED=sed
|
SED=sed
|
||||||
@ -118,13 +114,12 @@ PLATFORM=lnx
|
|||||||
EXEEXT=
|
EXEEXT=
|
||||||
OBJEXT=.o
|
OBJEXT=.o
|
||||||
LIBEXT=.a
|
LIBEXT=.a
|
||||||
CFLAGS+=-funsigned-char
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
CFLAGS+=-g $(INCS) -Wall -Wno-sign-compare -pedantic -O2 -DPRAGMA_PACK # -fomit-frame-pointer
|
CFLAGS+=-funsigned-char -g $(INCS) -Wall -Wno-sign-compare -pedantic -O2 -DPRAGMA_PACK # -fomit-frame-pointer
|
||||||
LNKFLAGS+=-g
|
LNKFLAGS+=-g
|
||||||
CPPFLAGS+=$(CFLAGS) -fno-rtti # -fno-exceptions
|
CPPFLAGS+=$(CFLAGS) -fno-rtti # -fno-exceptions
|
||||||
|
|
||||||
|
@ -144,7 +144,9 @@ typedef unsigned short uint16_t;
|
|||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
|
|
||||||
#if !defined(__APPLE__)
|
#if !defined(__APPLE__)
|
||||||
|
#if !defined(__SUNOS__)
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
|
#endif
|
||||||
typedef signed short int16_t;
|
typedef signed short int16_t;
|
||||||
typedef signed int int32_t;
|
typedef signed int int32_t;
|
||||||
#endif
|
#endif
|
||||||
|
@ -161,7 +161,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
gfile& operator>> (char& i) { return operator>>((uint8_t&)i); }
|
gfile& operator>> (char& i) { return operator>>((uint8_t&)i); }
|
||||||
|
#if !defined(__SUNOS__)
|
||||||
gfile& operator>> (int8_t& i) { return operator>>((uint8_t&)i); }
|
gfile& operator>> (int8_t& i) { return operator>>((uint8_t&)i); }
|
||||||
|
#endif
|
||||||
gfile& operator>> (int16_t& i) { return operator>>((uint16_t&)i); }
|
gfile& operator>> (int16_t& i) { return operator>>((uint16_t&)i); }
|
||||||
gfile& operator>> (int32_t& i) { return operator>>((uint32_t&)i); }
|
gfile& operator>> (int32_t& i) { return operator>>((uint32_t&)i); }
|
||||||
#if !defined(__CYGWIN__)
|
#if !defined(__CYGWIN__)
|
||||||
@ -179,7 +181,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
gfile& operator<< (char o) { return operator<<((uint8_t )o); }
|
gfile& operator<< (char o) { return operator<<((uint8_t )o); }
|
||||||
|
#if !defined(__SUNOS__)
|
||||||
gfile& operator<< (int8_t o) { return operator<<((uint8_t )o); }
|
gfile& operator<< (int8_t o) { return operator<<((uint8_t )o); }
|
||||||
|
#endif
|
||||||
gfile& operator<< (int16_t o) { return operator<<((uint16_t)o); }
|
gfile& operator<< (int16_t o) { return operator<<((uint16_t)o); }
|
||||||
gfile& operator<< (int32_t o) { return operator<<((uint32_t)o); }
|
gfile& operator<< (int32_t o) { return operator<<((uint32_t)o); }
|
||||||
#if !defined(__CYGWIN__)
|
#if !defined(__CYGWIN__)
|
||||||
|
Reference in New Issue
Block a user