[FFmpeg-devel] [PATCH] socklen_t definition

Måns Rullgård mans
Mon Sep 17 12:32:05 CEST 2007


KO Myung-Hun wrote:
> Hi/2.

Is that half a hi?

> M?ns Rullg?rd wrote:
>> KO Myung-Hun <komh at chollian.net> writes:
>>
>>
>>> Index: configure
>>> ===================================================================
>>> --- configure	(revision 10425)
>>> +++ configure	(working copy)
>>> @@ -534,6 +535,26 @@
>>>  EOF
>>>  }
>>>
>>> +check_type(){
>>> +    log check_type "$@"
>>> +    headers=$1
>>> +    type=$2
>>> +    shift 2
>>> +    disable $type
>>> +    incs=""
>>> +    for hdr in $headers; do
>>> +        incs="$incs
>>> +#include <$hdr>"
>>> +    done
>>> +    check_ld "$@" <<EOF && enable $type
>>> +$incs
>>> +int main(){
>>> +    $type v;
>>> +    return 0;
>>> +}
>>> +EOF
>>> +}
>>>
>>
>> There's no need for a main() function or to run the linker.  All you
>> need is check_cc with a global declaration.
>>
>>
>
> Ah, like this ?

Yes, like that.

As for the rest of the patch, how do we know that int is the correct
type to use if socklen_t doesn't exist?  Using the wrong type could
be dangerous.  On Beos we know it's int, but we can't be sure in the
general case.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list