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:
Stanislav Mekhanoshin
2006-02-01 10:06:07 +00:00
parent a49d62da90
commit 5050e3eb8e
3 changed files with 8 additions and 7 deletions

View File

@@ -144,7 +144,9 @@ typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#if !defined(__APPLE__)
#if !defined(__SUNOS__)
typedef signed char int8_t;
#endif
typedef signed short int16_t;
typedef signed int int32_t;
#endif

View File

@@ -161,7 +161,9 @@ public:
#endif
gfile& operator>> (char& i) { return operator>>((uint8_t&)i); }
#if !defined(__SUNOS__)
gfile& operator>> (int8_t& i) { return operator>>((uint8_t&)i); }
#endif
gfile& operator>> (int16_t& i) { return operator>>((uint16_t&)i); }
gfile& operator>> (int32_t& i) { return operator>>((uint32_t&)i); }
#if !defined(__CYGWIN__)
@@ -179,7 +181,9 @@ public:
#endif
gfile& operator<< (char o) { return operator<<((uint8_t )o); }
#if !defined(__SUNOS__)
gfile& operator<< (int8_t o) { return operator<<((uint8_t )o); }
#endif
gfile& operator<< (int16_t o) { return operator<<((uint16_t)o); }
gfile& operator<< (int32_t o) { return operator<<((uint32_t)o); }
#if !defined(__CYGWIN__)