Changeset cf04e8ac in rtems for cpukit/librpc


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/librpc/src/xdr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.