[MPlayer-dev-eng] [PATCH] 'socklen_t' definition
Diego Biurrun
diego at biurrun.de
Wed Jul 30 20:22:38 CEST 2008
On Thu, Jul 31, 2008 at 12:30:17AM +0900, KO Myung-Hun wrote:
>
> Diego Biurrun wrote:
>> On Wed, Jul 30, 2008 at 12:06:36AM +0900, KO Myung-Hun wrote:
>>
>>> Some system such as OS/2, 'socklen_t is not defined. So we need to check
>>> its definition and if needed, should defined it.
>>>
>>> But, this check and definition can conflict with other systems. So set
>>> its default value to 'HAVE', and check only on OS/2, finally if needed
>>> define 'socklen_t'.
>>>
>>> Can this approach make a trouble with systems other than OS/2 ?
>>
>> I just committed a different check. Testing on Windows is welcome.
>>
> Additional patch.
>
> 1. _socklen_t should be initialized to 'no'
I don't see what this helps.
> 2. if 'socklen_t' is defined, 'HAVE_SOCKLEN_T' should be defined, too.
> Otherwise, this can conflict with 'socklen_t ' definition of
> libavformat. Although CONFIG_NETWORK solve this, fortunately. this can
> be a potential problem whenever.
Is this a real problem or does it just generate a warning?
Anyway, changed.
> 3. Check Win32 env using '_winsock2'. If _winsock2 is yes, we can
> assume that socklen_t is defined.
Such assumptions make the code non-portable. I have added a check
instead.
Diego
More information about the MPlayer-dev-eng
mailing list