Changeset cf04e8ac in rtems


Ignore:
Timestamp:
Sep 1, 2006, 7:10:01 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d8f86d9
Parents:
300c914c
Message:

* empty log message *

Location:
cpukit
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/readdir.c

    r300c914c rcf04e8ac  
    4646
    4747#include <dirent.h>
     48#include <stdint.h>
    4849
    4950int getdents(
     
    7879    }
    7980    dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
    80     if ((int)dp & 03)   /* bogus pointer check */
     81    if ((intptr_t)dp & 03)      /* bogus pointer check */
    8182      return NULL;
    8283    if (dp->d_reclen <= 0 ||
  • cpukit/libnetworking/net/if.h

    r300c914c rcf04e8ac  
    213213                short   ifru_flags[2];
    214214                int32_t ifru_metric;
    215                 int     ifru_mtu;
     215                int32_t ifru_mtu;
    216216                int     ifru_phys;
    217217                int     ifru_media;
  • cpukit/libnetworking/net/pppcompress.c

    r300c914c rcf04e8ac  
    427427         * prepend 128 bytes of header).
    428428         */
    429         if ((int)cp & 3) {
     429        if ((intptr_t)cp & 3) {
    430430                if (len > 0)
    431                         (void) ovbcopy(cp, (caddr_t)((int)cp &~ 3), len);
    432                 cp = (u_char *)((int)cp &~ 3);
     431                        (void) ovbcopy(cp, (caddr_t)((intptr_t)cp &~ 3), len);
     432                cp = (u_char *)((intptr_t)cp &~ 3);
    433433        }
    434434        cp -= hlen;
  • cpukit/libnetworking/net/raw_usrreq.c

    r300c914c rcf04e8ac  
    175175                        break;
    176176                }
    177                 error = raw_attach(so, (int)nam);
     177                error = raw_attach(so, (intptr_t)nam);
    178178                break;
    179179
  • cpukit/libnetworking/netinet/in_cksum.c

    r300c914c rcf04e8ac  
    118118                 * Force to even boundary.
    119119                 */
    120                 if ((1 & (int) w) && (mlen > 0)) {
     120                if ((1 & (intptr_t) w) && (mlen > 0)) {
    121121                        REDUCE;
    122122                        sum <<= 8;
  • cpukit/libnetworking/netinet/ip.h

    r300c914c rcf04e8ac  
    9595#endif
    9696
    97 #define IP_MAXPACKET    65535           /* maximum packet size */
     97#define IP_MAXPACKET    65535L          /* maximum packet size */
    9898
    9999/*
  • cpukit/libnetworking/netinet/ip_divert.c

    r300c914c rcf04e8ac  
    296296                        break;
    297297                inp = (struct inpcb *)so->so_pcb;
    298                 inp->inp_ip_p = (int)nam;       /* XXX */
     298                inp->inp_ip_p = (intptr_t)nam;  /* XXX */
    299299                inp->inp_flags |= INP_HDRINCL;
    300300                /* The socket is always "connected" because
  • cpukit/libnetworking/sys/mbuf.h

    r300c914c rcf04e8ac  
    8484struct  pkthdr {
    8585        struct  ifnet *rcvif;           /* rcv interface */
    86         int     len;                    /* total packet length */
     86        int32_t len;                    /* total packet length */
    8787};
    8888
  • cpukit/librpc/src/xdr/xdr_rec.c

    r300c914c rcf04e8ac  
    9797 */
    9898
    99 #define LAST_FRAG ((u_int32_t)(1 << 31))
     99#define LAST_FRAG ((u_int32_t)(1L << 31))
    100100
    101101typedef struct rec_strm {
     
    166166        }
    167167        for (rstrm->out_base = rstrm->the_buffer;
    168                 (u_long)rstrm->out_base % BYTES_PER_XDR_UNIT != 0;
     168                (uintptr_t)rstrm->out_base % BYTES_PER_XDR_UNIT != 0;
    169169                rstrm->out_base++);
    170170        rstrm->in_base = rstrm->out_base + sendsize;
     
    206206        /* first try the inline, fast case */
    207207        if ((rstrm->fbtbc >= sizeof(int32_t)) &&
    208                 (((long)rstrm->in_boundry - (long)buflp) >= sizeof(int32_t))) {
     208                (((intptr_t)rstrm->in_boundry - (intptr_t)buflp) >= sizeof(int32_t))) {
    209209                *lp = (long)ntohl((u_int32_t)(*buflp));
    210210                rstrm->fbtbc -= sizeof(int32_t);
     
    280280
    281281        while (len > 0) {
    282                 current = (u_long)rstrm->out_boundry -
    283                         (u_long)rstrm->out_finger;
     282                current = (intptr_t)rstrm->out_boundry -
     283                        (intptr_t)rstrm->out_finger;
    284284                current = (len < current) ? len : current;
    285285                memcpy(rstrm->out_finger, addr, current);
     
    303303        register long pos;
    304304
    305         pos = lseek((int)(long)rstrm->tcp_handle, (off_t) 0, 1);
     305        pos = lseek((intptr_t)rstrm->tcp_handle, (off_t) 0, 1);
    306306        if (pos != -1)
    307307                switch (xdrs->x_op) {
     
    466466
    467467        if (sendnow || rstrm->frag_sent ||
    468                 ((u_long)rstrm->out_finger + sizeof(u_int32_t) >=
    469                 (u_long)rstrm->out_boundry)) {
     468                ((uintptr_t)rstrm->out_finger + sizeof(u_int32_t) >=
     469                (uintptr_t)rstrm->out_boundry)) {
    470470                rstrm->frag_sent = FALSE;
    471471                return (flush_out(rstrm, TRUE));
    472472        }
    473         len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) -
     473        len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->frag_header) -
    474474           sizeof(u_int32_t);
    475         *(rstrm->frag_header) = htonl((u_long)len | LAST_FRAG);
     475        *(rstrm->frag_header) = htonl((u_int32_t)len | LAST_FRAG);
    476476        rstrm->frag_header = (u_int32_t *)rstrm->out_finger;
    477477        rstrm->out_finger += sizeof(u_int32_t);
     
    488488        bool_t eor;
    489489{
    490         register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
    491         register u_int32_t len = (u_long)(rstrm->out_finger) -
    492                 (u_long)(rstrm->frag_header) - sizeof(u_int32_t);
     490        register u_int32_t eormask = (eor == TRUE) ? LAST_FRAG : 0;
     491        register u_int32_t len = (uintptr_t)(rstrm->out_finger) -
     492                (uintptr_t)(rstrm->frag_header) - sizeof(u_int32_t);
    493493
    494494        *(rstrm->frag_header) = htonl(len | eormask);
    495         len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->out_base);
     495        len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->out_base);
    496496        if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len)
    497497                != (int)len)
     
    511511
    512512        where = rstrm->in_base;
    513         i = (u_long)rstrm->in_boundry % BYTES_PER_XDR_UNIT;
     513        i = (uintptr_t)rstrm->in_boundry % BYTES_PER_XDR_UNIT;
    514514        where += i;
    515515        len = rstrm->in_size - i;
     
    531531
    532532        while (len > 0) {
    533                 current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
     533                current = (intptr_t)rstrm->in_boundry - (intptr_t)rstrm->in_finger;
    534534                if (current == 0) {
    535535                        if (! fill_input_buf(rstrm))
     
    578578
    579579        while (cnt > 0) {
    580                 current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
     580                current = (intptr_t)rstrm->in_boundry - (intptr_t)rstrm->in_finger;
    581581                if (current == 0) {
    582582                        if (! fill_input_buf(rstrm))
  • cpukit/librpc/src/xdr/xdr_sizeof.c

    r300c914c rcf04e8ac  
    9090                return (NULL);
    9191        }
    92         if (len < (long) xdrs->x_base) {
     92        if (len < (intptr_t) xdrs->x_base) {
    9393                /* x_private was already allocated */
    9494                xdrs->x_handy += len;
     
    102102                        return (NULL);
    103103                }
    104                 xdrs->x_base = (caddr_t) len;
     104                xdrs->x_base = (caddr_t)((intptr_t) len);
    105105                xdrs->x_handy += len;
    106106                return ((int32_t *) xdrs->x_private);
  • cpukit/score/include/rtems/score/tod.h

    r300c914c rcf04e8ac  
    280280 *  @note This must be a macro so it can be used in "static" tables.
    281281 */
    282 #define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000)
     282#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((uint32_t)(_ms) * 1000L)
    283283
    284284/** @brief TOD_MICROSECONDS_TO_TICKS
Note: See TracChangeset for help on using the changeset viewer.