try to support size independent printf
This commit is contained in:
parent
d8fc0ea8bf
commit
1a53fdc757
15
H/Yap.h
15
H/Yap.h
@ -158,10 +158,16 @@
|
||||
/* */ typedef int Int;
|
||||
/* */ typedef unsigned int UInt;
|
||||
|
||||
#define Int_FORMAT "%d"
|
||||
#define UInt_FORMAT "%u"
|
||||
|
||||
#elif SIZEOF_LONG_INT==4
|
||||
/* */ typedef long int Int;
|
||||
/* */ typedef unsigned long int UInt;
|
||||
|
||||
#define Int_FORMAT "%l"
|
||||
#define UInt_FORMAT "%ul"
|
||||
|
||||
#else
|
||||
# error Yap require integer types of the same size as a pointer
|
||||
#endif
|
||||
@ -180,14 +186,23 @@
|
||||
/* */ typedef int Int;
|
||||
/* */ typedef unsigned int UInt;
|
||||
|
||||
#define Int_FORMAT "%d"
|
||||
#define UInt_FORMAT "%ud"
|
||||
|
||||
#elif SIZEOF_LONG_INT==8
|
||||
/* */ typedef long int Int;
|
||||
/* */ typedef unsigned long int UInt;
|
||||
|
||||
#define Int_FORMAT "%l"
|
||||
#define UInt_FORMAT "%ul"
|
||||
|
||||
# elif SIZEOF_LONG_LONG_INT==8
|
||||
/* */ typedef long long int Int;
|
||||
/* */ typedef unsigned long long int UInt;
|
||||
|
||||
#define Int_FORMAT "%I64d"
|
||||
#define UInt_FORMAT "%I64u"
|
||||
|
||||
# else
|
||||
# error Yap requires integer types of the same size as a pointer
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user