[Ocfs2-test-devel] [REPORT] splice_test.h: conflicting types for ‘splice' comes again

Coly Li coly.li at suse.de
Mon Apr 13 01:46:58 PDT 2009



tristan.ye Wrote:
> On Mon, 2009-04-13 at 14:51 +0800, Coly Li wrote:
>> On openSuSE 11.1 (almost same to SLES11) the splice in bits/fcntl.h is:
>> /* Splice two files together.  */
>> extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
>>                        __off64_t *__offout, size_t __len,
>>                        unsigned int __flags);
>>
>> And the bits/types.h is:
>> /* These few don't really vary by system, they always correspond
>>    to one of the other defined types.  */
>> typedef __off64_t __loff_t;     /* Type of file sizes and offsets (LFS).  */
>>
>> The conflict is on the return value of splice() in bits/fcntl.h, which is int
>> VS. ssize_t.
> 
> It's interesting, the return value of splice from bits/fcntl.h was 'int'
> instead of ssize_t, that mean I will hit type conflicting error when
> applying your patch this time:-), things are going to run into a loop..
> 
> The best solution for us anyway is to explicitly use splice() defined in
> splice_test.h by force(I thought that's also the intention of original
> author) regardless of glibc's splice().
> 
> That means we can use a different name such as my_splice() from glibc
> one.
> 
> How do you think about it?

1) ssize_t on 32bit system should be int, if your machine is 64bit x86, it
should still be problematic. BTW, what's the name & version of your devel
distribution ?


2) I strongly suggest to call a test-suit version splice() explicitly. Complying
glibc declaration without calling the glibc version is kind of confusion (at
least to me). I can not agree more with your suggestion ;))

Thanks.
-- 
Coly Li
SuSE Labs



More information about the Ocfs2-test-devel mailing list