diff --git a/C/heapgc.c b/C/heapgc.c index 152077526..c93b5813f 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -1256,7 +1256,7 @@ mark_variable(CELL_PTR current) goto begin; #ifdef DEBUG } else if (next < (CELL *)Yap_GlobalBase || next > (CELL *)Yap_TrailTop) { - fprintf(Yap_stderr, "OOPS in GC: marking, current=%p, *current=%lx next=%p\n", current, (unsigned long int)ccur, next); + fprintf(Yap_stderr, "OOPS in GC: marking, current=%p, *current=" UInt_FORMAT " next=%p\n", current, ccur, next); #endif } else { #ifdef COROUTING @@ -1495,7 +1495,7 @@ mark_environments(CELL_PTR gc_ENV, OPREG size, CELL *pvbmap) #ifdef DEBUG if (size < 0 || size > 512) - fprintf(Yap_stderr,"OOPS in GC: env size for %p is %ld\n", gc_ENV, (unsigned long int)size); + fprintf(Yap_stderr,"OOPS in GC: env size for %p is " UInt_FORMAT "\n", gc_ENV, (CELL)size); #endif mark_db_fixed((CELL *)gc_ENV[E_CP]); /* for each saved variable */ diff --git a/H/Yap.h b/H/Yap.h index 5598ef636..5c37b8a00 100644 --- a/H/Yap.h +++ b/H/Yap.h @@ -187,14 +187,14 @@ /* */ typedef unsigned int UInt; #define Int_FORMAT "%d" -#define UInt_FORMAT "%ud" +#define UInt_FORMAT "%u" #elif SIZEOF_LONG_INT==8 /* */ typedef long int Int; /* */ typedef unsigned long int UInt; #define Int_FORMAT "%l" -#define UInt_FORMAT "%ul" +#define UInt_FORMAT "%lu" # elif SIZEOF_LONG_LONG_INT==8 /* */ typedef long long int Int;