From 300c914c64953e3f27120fc454e75926943badf5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 1 Sep 2006 18:15:01 +0000 Subject: *** empty log message *** --- cpukit/libnetworking/lib/rtems_bsdnet_ntp.c | 2 +- cpukit/libnetworking/lib/tftpDriver.c | 12 ++++++------ cpukit/libnetworking/libc/res_debug.c | 14 +++++++------- cpukit/libnetworking/rtems/rtems_bsdnet.h | 2 +- cpukit/libnetworking/rtems/rtems_glue.c | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'cpukit/libnetworking') diff --git a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c index 3be505a972..a005018815 100644 --- a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c +++ b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c @@ -34,7 +34,7 @@ * UNIX base: 1970, January 1 * NTP base: 1900, January 1 */ -#define UNIX_BASE_TO_NTP_BASE (((70UL*365UL)+17UL) * (24*60*60)) +#define UNIX_BASE_TO_NTP_BASE (uint32_t)(((70UL*365UL)+17UL) * (24UL*60UL*60UL)) struct ntpPacket { struct ntpPacketSmall ntp; diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c index 180f032219..0c0d21eaa9 100644 --- a/cpukit/libnetworking/lib/tftpDriver.c +++ b/cpukit/libnetworking/lib/tftpDriver.c @@ -56,8 +56,8 @@ int rtems_tftp_driver_debug = 1; /* * Default limits */ -#define PACKET_FIRST_TIMEOUT_MILLISECONDS 400 -#define PACKET_TIMEOUT_MILLISECONDS 6000 +#define PACKET_FIRST_TIMEOUT_MILLISECONDS 400L +#define PACKET_TIMEOUT_MILLISECONDS 6000L #define OPEN_RETRY_LIMIT 10 #define IO_RETRY_LIMIT 10 @@ -318,12 +318,12 @@ getPacket (struct tftpStream *tp, int retryCount) struct timeval tv; if (retryCount == 0) { - tv.tv_sec = PACKET_FIRST_TIMEOUT_MILLISECONDS / 1000; - tv.tv_usec = (PACKET_FIRST_TIMEOUT_MILLISECONDS % 1000) * 1000; + tv.tv_sec = PACKET_FIRST_TIMEOUT_MILLISECONDS / 1000L; + tv.tv_usec = (PACKET_FIRST_TIMEOUT_MILLISECONDS % 1000L) * 1000L; } else { - tv.tv_sec = PACKET_TIMEOUT_MILLISECONDS / 1000; - tv.tv_usec = (PACKET_TIMEOUT_MILLISECONDS % 1000) * 1000; + tv.tv_sec = PACKET_TIMEOUT_MILLISECONDS / 1000L; + tv.tv_usec = (PACKET_TIMEOUT_MILLISECONDS % 1000L) * 1000L; } setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv); for (;;) { diff --git a/cpukit/libnetworking/libc/res_debug.c b/cpukit/libnetworking/libc/res_debug.c index 4ea4aec144..7dc54694ef 100644 --- a/cpukit/libnetworking/libc/res_debug.c +++ b/cpukit/libnetworking/libc/res_debug.c @@ -545,8 +545,8 @@ p_time(u_int32_t value) { * by 60*60*1000 for that. */ -static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000, - 1000000,10000000,100000000,1000000000}; +static uint32_t poweroften[10] = {1, 10, 100, 1000, 10000, 100000, + 1000000,10000000,100000000,1000000000}; /* takes an XeY precision/size value, returns a string representation. */ static const char * @@ -555,7 +555,7 @@ precsize_ntoa(prec) { static char retbuf[sizeof "90000000.00"]; unsigned long val; - int mantissa, exponent; + uint32_t mantissa, exponent; mantissa = (int)((prec >> 4) & 0x0f) % 10; exponent = (int)((prec >> 0) & 0x0f) % 10; @@ -664,13 +664,13 @@ latlon2ul(latlonstrptr,which) switch (*cp) { case 'N': case 'n': case 'E': case 'e': - retval = ((unsigned)1<<31) + retval = ((u_int32_t)1<<31) + (((((deg * 60) + min) * 60) + secs) * 1000) + secsfrac; break; case 'S': case 's': case 'W': case 'w': - retval = ((unsigned)1<<31) + retval = ((u_int32_t)1<<31) - (((((deg * 60) + min) * 60) + secs) * 1000) - secsfrac; break; @@ -853,10 +853,10 @@ loc_ntoa(binary, ascii) vpval = *cp++; GETLONG(templ, cp); - latval = (templ - ((unsigned)1<<31)); + latval = (templ - ((u_int32_t)1<<31)); GETLONG(templ, cp); - longval = (templ - ((unsigned)1<<31)); + longval = (templ - ((u_int32_t)1<<31)); GETLONG(templ, cp); if (templ < referencealt) { /* below WGS 84 spheroid */ diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet.h b/cpukit/libnetworking/rtems/rtems_bsdnet.h index 3112779078..059e6be993 100644 --- a/cpukit/libnetworking/rtems/rtems_bsdnet.h +++ b/cpukit/libnetworking/rtems/rtems_bsdnet.h @@ -42,7 +42,7 @@ extern struct in_addr rtems_bsdnet_bootp_server_address; extern char *rtems_bsdnet_bootp_server_name; extern char *rtems_bsdnet_bootp_boot_file_name; extern char *rtems_bsdnet_bootp_cmdline; -extern long rtems_bsdnet_timeoffset; +extern int32_t rtems_bsdnet_timeoffset; /* * Manipulate routing tables diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c index 4fb92f442b..edd72cf499 100644 --- a/cpukit/libnetworking/rtems/rtems_glue.c +++ b/cpukit/libnetworking/rtems/rtems_glue.c @@ -97,7 +97,7 @@ static struct in_addr _rtems_bsdnet_ntpserver[sizeof rtems_bsdnet_config.ntp_ser sizeof rtems_bsdnet_config.ntp_server[0]]; struct in_addr *rtems_bsdnet_ntpserver = _rtems_bsdnet_ntpserver; int rtems_bsdnet_ntpserver_count = 0; -long rtems_bsdnet_timeoffset = 0; +int32_t rtems_bsdnet_timeoffset = 0; /* * Perform FreeBSD memory allocation. -- cgit v1.2.3