try to support size independent printf

This commit is contained in:
Vitor Santos Costa 2010-05-05 00:27:00 +01:00
parent d8fc0ea8bf
commit 1a53fdc757
1 changed files with 15 additions and 0 deletions

15
H/Yap.h
View File

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