diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-22 10:29:27 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-22 10:56:27 +0000 |
commit | 6ccb7e4a989de9785c99ea96ca6b35ac4da0a7fa (patch) | |
tree | 8b109c5114ba456e2a4425b017cbb48d569b65ab /community/portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch | |
parent | 05d8679cf7535fce20297e7d6e96bbc6bdd8ae95 (diff) | |
download | aports-6ccb7e4a989de9785c99ea96ca6b35ac4da0a7fa.tar.bz2 aports-6ccb7e4a989de9785c99ea96ca6b35ac4da0a7fa.tar.xz |
community/portablexdr: moved from testing
Diffstat (limited to 'community/portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch')
-rw-r--r-- | community/portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/community/portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch b/community/portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch new file mode 100644 index 0000000000..847ca15910 --- /dev/null +++ b/community/portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch @@ -0,0 +1,79 @@ +From a7461e1430fcc26b02457f7b8f53dc423c062e1e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> +Date: Mon, 23 Jan 2012 19:31:10 +0100 +Subject: [PATCH] build: use intptr_t and uintptr_t to cast ptr to int + +--- + xdr_mem.c | 2 +- + xdr_rec.c | 16 ++++++++-------- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/xdr_mem.c b/xdr_mem.c +index 701cad2..f8a2d3a 100644 +--- a/xdr_mem.c ++++ b/xdr_mem.c +@@ -169,7 +169,7 @@ xdrmem_setpos(xdrs, pos) + register caddr_t newaddr = xdrs->x_base + pos; + register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy; + +- if ((long)newaddr > (long)lastaddr) ++ if ((intptr_t)newaddr > (intptr_t)lastaddr) + return (FALSE); + xdrs->x_private = newaddr; + xdrs->x_handy = lastaddr - newaddr; +diff --git a/xdr_rec.c b/xdr_rec.c +index 6859c42..a0d34c6 100644 +--- a/xdr_rec.c ++++ b/xdr_rec.c +@@ -173,7 +173,7 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit) + return; + } + for (rstrm->out_base = rstrm->the_buffer; +- (long) rstrm->out_base % BYTES_PER_XDR_UNIT != 0; ++ (intptr_t) rstrm->out_base % BYTES_PER_XDR_UNIT != 0; + rstrm->out_base++); + rstrm->in_base = rstrm->out_base + sendsize; + /* +@@ -472,12 +472,12 @@ xdrrec_endofrecord(xdrs, sendnow) + register u_long len; /* fragment length */ + + if (sendnow || rstrm->frag_sent || +- ((u_long)rstrm->out_finger + sizeof(u_long) >= +- (u_long)rstrm->out_boundry)) { ++ ((uintptr_t)rstrm->out_finger + sizeof(u_long) >= ++ (uintptr_t)rstrm->out_boundry)) { + rstrm->frag_sent = FALSE; + return (flush_out(rstrm, TRUE)); + } +- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) - ++ len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->frag_header) - + sizeof(u_long); + *(rstrm->frag_header) = htonl((u_long)len | LAST_FRAG); + rstrm->frag_header = (u_long *)rstrm->out_finger; +@@ -495,11 +495,11 @@ flush_out(rstrm, eor) + bool_t eor; + { + register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0; +- register u_long len = (u_long)(rstrm->out_finger) - +- (u_long)(rstrm->frag_header) - sizeof(u_long); ++ register u_long len = (uintptr_t)(rstrm->out_finger) - ++ (uintptr_t)(rstrm->frag_header) - sizeof(u_long); + + *(rstrm->frag_header) = htonl(len | eormask); +- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->out_base); ++ len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->out_base); + if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len) + != (int)len) + return (FALSE); +@@ -517,7 +517,7 @@ fill_input_buf(rstrm) + register int len; + + where = rstrm->in_base; +- i = (long) rstrm->in_boundry % BYTES_PER_XDR_UNIT; ++ i = (intptr_t) rstrm->in_boundry % BYTES_PER_XDR_UNIT; + where += i; + len = rstrm->in_size - i; + if ((len = (*(rstrm->readit))(rstrm->tcp_handle, where, len)) == -1) +-- +1.7.7.5 + |