From 67f4974bf28cccf4b67494448c61f95453651fa7 Mon Sep 17 00:00:00 2001 From: elliott_c Date: Tue, 2 Nov 2004 19:52:57 +0000 Subject: ChangeLogTag: Tue Nov 2 13:51:15 2004 Chad Elliott --- ASNMP/asnmp/asn1.cpp | 14 +++++++------- ChangeLog | 15 +++++++++++++++ ace/config-linux-common.h | 4 ++-- examples/IPC_SAP/SSL_SAP/SSL-client.cpp | 4 ++-- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ASNMP/asnmp/asn1.cpp b/ASNMP/asnmp/asn1.cpp index baeffbccd22..59b0fa9f8bf 100644 --- a/ASNMP/asnmp/asn1.cpp +++ b/ASNMP/asnmp/asn1.cpp @@ -194,7 +194,7 @@ u_char * asn1::build_int( u_char *data, * consecutive 1's or 0's at the most significant end of the * integer. */ - mask = 0x1FF << ((8 * (sizeof(long) - 1)) - 1); + mask = u_long (0x1FF) << ((8 * (sizeof(u_long) - 1)) - 1); /* mask is 0xFF800000 on a big-endian machine */ while((((integer & mask) == 0) || ((integer & mask) == mask)) && intsize > 1){ @@ -207,7 +207,7 @@ u_char * asn1::build_int( u_char *data, if (*datalength < intsize) return 0; *datalength -= intsize; - mask = 0xFF << (8 * (sizeof(long) - 1)); + mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1)); /* mask is 0xFF000000 on a big-endian machine */ while(intsize--){ *data++ = (u_char)((integer & mask) >> (8 * (sizeof(long) - 1))); @@ -245,7 +245,7 @@ u_char * asn1::build_unsigned_int( u_char *data, if (intsize != sizeof (long)) return 0; integer = *intp; - mask = 0xFF << (8 * (sizeof(long) - 1)); + mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1)); /* mask is 0xFF000000 on a big-endian machine */ if ((u_char)((integer & mask) >> (8 * (sizeof(long) - 1))) & 0x80){ /* if MSB is set */ @@ -257,7 +257,7 @@ u_char * asn1::build_unsigned_int( u_char *data, * There should be no sequence of 9 consecutive 1's or 0's at the most significant end of the * integer. */ - mask = 0x1FF << ((8 * (sizeof(long) - 1)) - 1); + mask = u_long (0x1FF) << ((8 * (sizeof(u_long) - 1)) - 1); /* mask is 0xFF800000 on a big-endian machine */ while((((integer & mask) == 0) || ((integer & mask) == mask)) && intsize > 1){ intsize--; @@ -273,7 +273,7 @@ u_char * asn1::build_unsigned_int( u_char *data, *data++ = '\0'; intsize--; } - mask = 0xFF << (8 * (sizeof(long) - 1)); + mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1)); /* mask is 0xFF000000 on a big-endian machine */ while(intsize--){ *data++ = (u_char)((integer & mask) >> (8 * (sizeof(long) - 1))); @@ -921,7 +921,7 @@ u_char * asn1::build_unsigned_int64( u_char *data, intsize = 8; low = cp->low; high = cp->high; - mask = 0xFF << (8 * (sizeof(long) - 1)); + mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1)); /* mask is 0xFF000000 on a big-endian machine */ if ((u_char)((high & mask) >> (8 * (sizeof(long) - 1))) & 0x80){ /* if MSB is set */ @@ -934,7 +934,7 @@ u_char * asn1::build_unsigned_int64( u_char *data, * There should be no sequence of 9 consecutive 1's or 0's at the most * significant end of the integer. */ - mask2 = 0x1FF << ((8 * (sizeof(long) - 1)) - 1); + mask2 = u_long (0x1FF) << ((8 * (sizeof(u_long) - 1)) - 1); /* mask2 is 0xFF800000 on a big-endian machine */ while((((high & mask2) == 0) || ((high & mask2) == mask2)) && intsize > 1){ diff --git a/ChangeLog b/ChangeLog index 9f8ffbfc4a4..8f077337ea5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Tue Nov 2 13:51:15 2004 Chad Elliott + + * ASNMP/asnmp/asn1.cpp: + + Cast literal integer to u_long to match the type of the variable. + + * ace/config-linux-common.h: + + Check for __x86_64__ similarly to __ia64 to get rid of some build + warnings. + + * examples/IPC_SAP/SSL_SAP/SSL-client.cpp: + + Use size_t instead of int to match the size of void*. + Tue Nov 2 10:15:01 2004 Chad Elliott * tests/SOCK_SEQPACK_SCTP_Test.cpp: diff --git a/ace/config-linux-common.h b/ace/config-linux-common.h index 1002d6a6426..8a719e77580 100644 --- a/ace/config-linux-common.h +++ b/ace/config-linux-common.h @@ -46,7 +46,7 @@ # if !defined (ACE_DEFAULT_BASE_ADDR) # define ACE_DEFAULT_BASE_ADDR ((char *) 0x40000000) # endif /* ! ACE_DEFAULT_BASE_ADDR */ -#elif defined (__ia64) +#elif defined (__ia64) || defined (__x86_64__) # if !defined (ACE_DEFAULT_BASE_ADDR) // Zero base address should work fine for Linux of IA-64: it just lets // the kernel to choose the right value. @@ -342,7 +342,7 @@ #define ACE_HAS_DIRENT -#if defined (__ia64) || defined(__alpha) +#if defined (__ia64) || defined(__alpha) || defined (__x86_64__) // On 64 bit platforms, the "long" type is 64-bits. Override the // default 32-bit platform-specific format specifiers appropriately. # define ACE_UINT64_FORMAT_SPECIFIER ACE_LIB_TEXT ("%lu") diff --git a/examples/IPC_SAP/SSL_SAP/SSL-client.cpp b/examples/IPC_SAP/SSL_SAP/SSL-client.cpp index 0d2c733c4aa..b59117bb071 100644 --- a/examples/IPC_SAP/SSL_SAP/SSL-client.cpp +++ b/examples/IPC_SAP/SSL_SAP/SSL-client.cpp @@ -238,7 +238,7 @@ Options::oneway_client_test (void *) size_t iteration = 0; // Keep track of return value. - int result = 0; + size_t result = 0; ACE_INT32 len = options->message_len (); ACE_DEBUG ((LM_DEBUG, @@ -290,7 +290,7 @@ Options::twoway_client_test (void *) size_t iteration = 0; // Keep track of return value. - int result = 0; + size_t result = 0; // Timer business. ACE_High_Res_Timer timer; -- cgit v1.2.1