Windows visual studio vs gcc long and ulong
The visual studio compiler behaves diffently with _Generic than with gcc on Linux _Generic around long and ulong. On Windows they aren't recognized as one of the stdint types. On Linux gcc, it considers them equivalent to int64_t and uint64_t. Leave it out of the _Generic to avoid the behaviour difference between platforms/compilers.
This commit is contained in:
@@ -249,8 +249,6 @@ extern void sfi_ulong(NHFILE *, ulong *, const char *);
|
||||
#define Sfo_ushort(a, b, c) sfo_ushort(a, b, c)
|
||||
#define Sfo_int(a, b, c) sfo_int(a, b, c)
|
||||
#define Sfo_unsigned(a, b, c) sfo_unsigned(a, b, c)
|
||||
#define Sfo_long(a,b,c) sfo_long(a, b, c);
|
||||
#define Sfo_ulong(a,b,c) sfo_ulong(a, b, c);
|
||||
#define Sfo_boolean(a,b,c) sfo_boolean(a, b, c);
|
||||
#define Sfo_xint8(a, b, c) sfo_xint8(a, b, c);
|
||||
#define Sfo_xint16(a, b, c) sfo_xint16(a, b, c)
|
||||
@@ -319,8 +317,6 @@ extern void sfi_ulong(NHFILE *, ulong *, const char *);
|
||||
#define Sfi_ushort(a, b, c) sfi_ushort(a, b, c)
|
||||
#define Sfi_int(a, b, c) sfi_int(a, b, c);
|
||||
#define Sfi_unsigned(a, b, c) sfi_unsigned(a, b, c);
|
||||
#define Sfi_long(a,b,c) sfi_long(a, b, c);
|
||||
#define Sfi_ulong(a,b,c) sfi_ulong(a, b, c);
|
||||
#define Sfi_boolean(a,b,c) sfi_boolean(a, b, c);
|
||||
#define Sfi_xint8(a, b, c) sfi_xint8(a, b, c);
|
||||
#define Sfi_xint16(a, b, c) sfi_xint16(a, b, c);
|
||||
@@ -336,8 +332,6 @@ extern void sfi_ulong(NHFILE *, ulong *, const char *);
|
||||
uint16_t * : sfo_uint16, \
|
||||
uint32_t * : sfo_uint32, \
|
||||
uint64_t * : sfo_uint64, \
|
||||
long * : sfo_long, \
|
||||
unsigned long * : sfo_ulong, \
|
||||
xint8 * : sfo_xint8, \
|
||||
struct arti_info * : sfo_arti_info, \
|
||||
struct nhrect * : sfo_nhrect, \
|
||||
@@ -400,8 +394,6 @@ extern void sfi_ulong(NHFILE *, ulong *, const char *);
|
||||
uint16_t * : sfi_uint16, \
|
||||
uint32_t * : sfi_uint32, \
|
||||
uint64_t * : sfi_uint64, \
|
||||
long * : sfi_long, \
|
||||
unsigned long * : sfi_ulong, \
|
||||
xint8 * : sfi_xint8, \
|
||||
struct arti_info * : sfi_arti_info, \
|
||||
struct nhrect * : sfi_nhrect, \
|
||||
@@ -520,11 +512,12 @@ extern void sfi_ulong(NHFILE *, ulong *, const char *);
|
||||
#define Sfo_ushort(a, b, c) sfo(a, b, c)
|
||||
#define Sfo_int(a, b, c) sfo(a, b, c)
|
||||
#define Sfo_unsigned(a, b, c) sfo(a, b, c)
|
||||
#define Sfo_long(a,b,c) sfo(a, b, c)
|
||||
#define Sfo_ulong(a,b,c) sfo(a, b, c)
|
||||
#define Sfo_xint8(a, b, c) sfo(a, b, c)
|
||||
#define Sfo_xint16(a, b, c) sfo(a, b, c)
|
||||
|
||||
/* not in _Generic */
|
||||
#define Sfo_long(a,b,c) sfo_long(a, b, c);
|
||||
#define Sfo_ulong(a,b,c) sfo_ulong(a, b, c);
|
||||
#define Sfo_char(a,b,c,d) sfo_char(a, b, c, d)
|
||||
#define Sfo_boolean(a,b,c) sfo_boolean(a, b, c)
|
||||
#define Sfo_schar(a,b,c) sfo_schar(a, b, c)
|
||||
@@ -591,11 +584,12 @@ extern void sfi_ulong(NHFILE *, ulong *, const char *);
|
||||
#define Sfi_ushort(a, b, c) sfi(a, b, c)
|
||||
#define Sfi_int(a,b,c) sfi(a, b, c)
|
||||
#define Sfi_unsigned(a, b, c) sfi(a, b, c)
|
||||
#define Sfi_long(a,b,c) sfi(a, b, c)
|
||||
#define Sfi_ulong(a,b,c) sfi(a, b, c)
|
||||
#define Sfi_xint8(a, b, c) sfi(a, b, c)
|
||||
#define Sfi_xint16(a, b, c) sfi(a, b, c)
|
||||
|
||||
/* not in _Generic */
|
||||
#define Sfi_long(a,b,c) sfi_long(a, b, c);
|
||||
#define Sfi_ulong(a,b,c) sfi_ulong(a, b, c);
|
||||
#define Sfi_char(a,b,c,d) sfi_char(a, b, c, d)
|
||||
#define Sfi_boolean(a,b,c) sfi_boolean(a, b, c)
|
||||
#define Sfi_schar(a,b,c) sfi_schar(a, b, c)
|
||||
|
||||
Reference in New Issue
Block a user