[MPlayer-dev-eng] [PATCH] Kill some _LARGEFILE_SOURCE #ifdefs

Nico Sabbi nsabbi at email.it
Thu Jun 30 09:44:20 CEST 2005


Rich Felker wrote:

>On Thu, Jun 30, 2005 at 12:59:05AM +0200, Tobias Diedrich wrote:
>  
>
>>I think everyone agrees that #ifdefs in code are best avoided. :-)
>>While I was looking at some code I noticed some unnecessary 
>>ifdefs related to largefile support.
>>Some can be avoided by casting to off_t, as in:
>>
>>|-#ifdef _LARGEFILE_SOURCE
>>|-       newpos &= ~((long long) (STREAM_BUFFER_SIZE - 1));  /* sector boundary */
>>|-#else
>>|-       newpos &= ~(STREAM_BUFFER_SIZE - 1);  /* sector boundary */
>>|-#endif
>>|+       newpos &= ~((off_t) (STREAM_BUFFER_SIZE - 1));  /* sector boundary */
>>
>>And for some format strings I think the simplest solution is to
>>always cast to long long:
>>
>>|-#ifdef _LARGEFILE_SOURCE
>>|   mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
>>|-#else
>>|-  mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
>>|-#endif
>>    
>>
>
>I agree.
>
>Rich
>
>  
>

me too. As far as mpeg* are concerned go on, please
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Biscotti perfetti? Metti la pasta dentro allo Sparabiscotti e...click click... biscotti pronti per essere infornati!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2745&d=30-6




More information about the MPlayer-dev-eng mailing list