[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] oRTP: restored build on linux/ia64
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] oRTP: restored build on linux/ia64 |
Date: |
Mon, 20 Feb 2006 11:03:45 +0100 |
User-agent: |
KMail/1.9.1 |
Thanks.
I've finally the completely removed (long) casts because there were needed
when b_wptr, b_rptr,db_base and db_lim were void*, but they became char * a
few months ago.
Simo
Le Jeudi 16 Février 2006 18:59, Francois-Xavier 'FiX' KOWALSKI a écrit :
> Simon,
>
> In ILP32 data-model, int, long & void* are equivalent
> In LP64 data-model: long & void* are equivalent, but not int
>
> Please tell me if you see a problem in the following patch.
>
> --- str_utils.c 31 Jan 2006 18:09:20 -0000 1.20
> +++ str_utils.c 16 Feb 2006 17:56:55 -0000
> @@ -267,7 +267,7 @@
> int padcnt=0;
> int i;
> if (pad){
> - padcnt= (int)(4L-( (long)(((int32_t)mp->b_wptr)+size) % 4L)) % 4L;
> + padcnt= (int)(4L-( (long)(((long)mp->b_wptr)+size) % 4L)) % 4L;
> }
> if ((mp->b_wptr + size +padcnt) > (char*)mp->b_datap->db_lim){
> /* buffer is not large enough: append a new block (with the
> same size ?)*/
>
> --- telephonyevents.c 31 Jan 2006 18:09:20 -0000 1.17
> +++ telephonyevents.c 16 Feb 2006 17:56:55 -0000
> @@ -117,7 +117,7 @@
> /* find the place where to add the new telephony event to the packet
> */ while(mp->b_cont!=NULL) mp=mp->b_cont;
> /* see if we need to allocate a new mblk_t */
> - if ( ((uint32_t) mp->b_wptr) >= ((uint32_t) mp->b_datap->db_lim)){
> + if ( ((long) mp->b_wptr) >= ((long) mp->b_datap->db_lim)){
> mblk_t *newm=allocb(TELEPHONY_EVENTS_ALLOCATED_SIZE,BPRI_MED);
> mp->b_cont=newm;
> mp=mp->b_cont;