Changeset 300c914c in rtems


Ignore:
Timestamp:
Sep 1, 2006, 6:15:01 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cf04e8ac
Parents:
a612b50
Message:

* empty log message *

Location:
cpukit
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/lib/rtems_bsdnet_ntp.c

    ra612b50 r300c914c  
    3535 *   NTP base: 1900, January 1
    3636 */
    37 #define UNIX_BASE_TO_NTP_BASE (((70UL*365UL)+17UL) * (24*60*60))
     37#define UNIX_BASE_TO_NTP_BASE (uint32_t)(((70UL*365UL)+17UL) * (24UL*60UL*60UL))
    3838
    3939struct ntpPacket {
  • cpukit/libnetworking/lib/tftpDriver.c

    ra612b50 r300c914c  
    5757 * Default limits
    5858 */
    59 #define PACKET_FIRST_TIMEOUT_MILLISECONDS  400
    60 #define PACKET_TIMEOUT_MILLISECONDS        6000
     59#define PACKET_FIRST_TIMEOUT_MILLISECONDS  400L
     60#define PACKET_TIMEOUT_MILLISECONDS        6000L
    6161#define OPEN_RETRY_LIMIT                   10
    6262#define IO_RETRY_LIMIT                     10
     
    319319
    320320    if (retryCount == 0) {
    321         tv.tv_sec = PACKET_FIRST_TIMEOUT_MILLISECONDS / 1000;
    322         tv.tv_usec = (PACKET_FIRST_TIMEOUT_MILLISECONDS % 1000) * 1000;
     321        tv.tv_sec = PACKET_FIRST_TIMEOUT_MILLISECONDS / 1000L;
     322        tv.tv_usec = (PACKET_FIRST_TIMEOUT_MILLISECONDS % 1000L) * 1000L;
    323323    }
    324324    else {
    325         tv.tv_sec = PACKET_TIMEOUT_MILLISECONDS / 1000;
    326         tv.tv_usec = (PACKET_TIMEOUT_MILLISECONDS % 1000) * 1000;
     325        tv.tv_sec = PACKET_TIMEOUT_MILLISECONDS / 1000L;
     326        tv.tv_usec = (PACKET_TIMEOUT_MILLISECONDS % 1000L) * 1000L;
    327327    }
    328328    setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
  • cpukit/libnetworking/libc/res_debug.c

    ra612b50 r300c914c  
    546546 */
    547547
    548 static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
    549                                       1000000,10000000,100000000,1000000000};
     548static uint32_t poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
     549                              1000000,10000000,100000000,1000000000};
    550550
    551551/* takes an XeY precision/size value, returns a string representation. */
     
    556556        static char retbuf[sizeof "90000000.00"];
    557557        unsigned long val;
    558         int mantissa, exponent;
     558        uint32_t mantissa, exponent;
    559559
    560560        mantissa = (int)((prec >> 4) & 0x0f) % 10;
     
    665665        case 'N': case 'n':
    666666        case 'E': case 'e':
    667                 retval = ((unsigned)1<<31)
     667                retval = ((u_int32_t)1<<31)
    668668                        + (((((deg * 60) + min) * 60) + secs) * 1000)
    669669                        + secsfrac;
     
    671671        case 'S': case 's':
    672672        case 'W': case 'w':
    673                 retval = ((unsigned)1<<31)
     673                retval = ((u_int32_t)1<<31)
    674674                        - (((((deg * 60) + min) * 60) + secs) * 1000)
    675675                        - secsfrac;
     
    854854
    855855        GETLONG(templ, cp);
    856         latval = (templ - ((unsigned)1<<31));
     856        latval = (templ - ((u_int32_t)1<<31));
    857857
    858858        GETLONG(templ, cp);
    859         longval = (templ - ((unsigned)1<<31));
     859        longval = (templ - ((u_int32_t)1<<31));
    860860
    861861        GETLONG(templ, cp);
  • cpukit/libnetworking/rtems/rtems_bsdnet.h

    ra612b50 r300c914c  
    4343extern char *rtems_bsdnet_bootp_boot_file_name;
    4444extern char *rtems_bsdnet_bootp_cmdline;
    45 extern long rtems_bsdnet_timeoffset;
     45extern int32_t rtems_bsdnet_timeoffset;
    4646
    4747/*
  • cpukit/libnetworking/rtems/rtems_glue.c

    ra612b50 r300c914c  
    9898struct in_addr *rtems_bsdnet_ntpserver = _rtems_bsdnet_ntpserver;
    9999int rtems_bsdnet_ntpserver_count = 0;
    100 long rtems_bsdnet_timeoffset = 0;
     100int32_t rtems_bsdnet_timeoffset = 0;
    101101
    102102/*
  • cpukit/pppd/md4.c

    ra612b50 r300c914c  
    4141#include "pppd.h"
    4242
     43#include <inttypes.h>
     44
    4345/* Compile-time declarations of MD4 "magic constants".
    4446*/
    45 #define I0  0x67452301       /* Initial values for MD buffer */
    46 #define I1  0xefcdab89
    47 #define I2  0x98badcfe
    48 #define I3  0x10325476
    49 #define C2  013240474631     /* round 2 constant = sqrt(2) in octal */
    50 #define C3  015666365641     /* round 3 constant = sqrt(3) in octal */
     47#define I0  0x67452301L       /* Initial values for MD buffer */
     48#define I1  0xefcdab89L
     49#define I2  0x98badcfeL
     50#define I3  0x10325476L
     51#define C2  013240474631L     /* round 2 constant = sqrt(2) in octal */
     52#define C3  015666365641L     /* round 3 constant = sqrt(3) in octal */
    5153/* C2 and C3 are from Knuth, The Art of Programming, Volume 2
    5254** (Seminumerical Algorithms), Second Edition (1981), Addison-Wesley.
     
    9496  for (i=0;i<4;i++)
    9597    for (j=0;j<32;j=j+8)
    96       printf("%02x",(MDp->buffer[i]>>j) & 0xFF);
     98      printf("%02" PRIx32,(MDp->buffer[i]>>j) & 0xFF);
    9799}
    98100
     
    130132
    131133  for (i = 0; i < 16; ++i) {
    132     X[i] = Xb[0] + (Xb[1] << 8) + (Xb[2] << 16) + (Xb[3] << 24);
     134    X[i] = Xb[0] + ((uint32_t)Xb[1] << 8) +
     135           ((uint32_t)Xb[2] << 16) + ((uint32_t)Xb[3] << 24);
    133136    Xb += 4;
    134137  }
  • cpukit/pppd/md4.h

    ra612b50 r300c914c  
    1717#endif
    1818
     19#include <stdint.h>
    1920
    2021/* MDstruct is the data structure for a message digest computation.
    2122*/
    2223typedef struct {
    23         unsigned int buffer[4]; /* Holds 4-word result of MD computation */
    24         unsigned char count[8]; /* Number of bits processed so far */
    25         unsigned int done;      /* Nonzero means MD computation finished */
     24        uint32_t buffer[4]; /* Holds 4-word result of MD computation */
     25        uint8_t  count[8]; /* Number of bits processed so far */
     26        uint32_t done;      /* Nonzero means MD computation finished */
    2627} MD4_CTX;
    2728
  • cpukit/pppd/options.c

    ra612b50 r300c914c  
    12431243{
    12441244  int      spd;
    1245   int      ret      = (int    )1;
     1245  uint32_t ret      = (int)1;
    12461246  speed_t  spdValue = (speed_t)0;
    12471247  char    *ptr;
     
    12541254    else {
    12551255      switch ( spd ) {
    1256         case 2400:
     1256        case 2400L:
    12571257          spdValue = B2400;
    12581258          break;
    1259         case 4800:
     1259        case 4800L:
    12601260          spdValue = B4800;
    12611261          break;
    1262         case 9600:
     1262        case 9600L:
    12631263          spdValue = B9600;
    12641264          break;
    1265         case 19200:
     1265        case 19200L:
    12661266          spdValue = B19200;
    12671267          break;
    1268         case 38400:
     1268        case 38400L:
    12691269          spdValue = B38400;
    12701270          break;
    1271         case 57600:
     1271        case 57600L:
    12721272          spdValue = B57600;
    12731273          break;
    1274         case 115200:
     1274        case 115200L:
    12751275          spdValue = B115200;
    12761276          break;
Note: See TracChangeset for help on using the changeset viewer.