From b2d4c9be8fd379aa56d8bc392f94b3fb0dc055ef Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Mon, 1 May 2006 14:17:26 +0000 Subject: use int_64 instead of __int64, define int_64, include stdint.h on 64 bits linux --- cgaas.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'cgaas.c') diff --git a/cgaas.c b/cgaas.c index 39a0b5a..626650d 100644 --- a/cgaas.c +++ b/cgaas.c @@ -9,6 +9,9 @@ #include #include #include +#ifdef LINUX +# include +#endif #ifdef __MWERKS__ # define I486 @@ -361,11 +364,11 @@ void store_long_word_in_data_section (ULONG c) } } -void store_word64_in_data_section (__int64 c) +void store_word64_in_data_section (int_64 c) { if (data_buffer_free>=8){ data_buffer_free-=8; - *(__int64*)data_buffer_p=c; + *(int_64*)data_buffer_p=c; data_buffer_p+=8; } else { store_long_word_in_data_section ((ULONG)c); @@ -398,19 +401,19 @@ void store_abc_string_in_data_section (char *string,int length) store_word64_in_data_section (length); while (length>=8){ - store_word64_in_data_section (*(__int64*)string_p); + store_word64_in_data_section (*(int_64*)string_p); string_p+=8; length-=8; } if (length>0){ - unsigned __int64 d; + uint_64 d; int shift; d=0; shift=0; while (length>0){ - d |= (unsigned __int64)string_p[0]<=0 ? d : -d; - t = two63 + ((unsigned __int64)d >> 63); + t = two63 + ((uint_64)d >> 63); anc = t - 1 - t%ad; /* absolute value of nc */ p = 63; /* initialize p */ q1 = two63/anc; /* initialize q1 = 2p/abs(nc) */ -- cgit v1.2.3