[Ffmpeg-devel] [PATCH] Networking with MingW
Michael A. Kohn
mike
Tue Nov 7 14:37:53 CET 2006
On Tue, 7 Nov 2006, Michael Niedermayer wrote:
> Hi
>
> On Tue, Nov 07, 2006 at 03:17:01AM +0100, Diego Biurrun wrote:
>> On Mon, Nov 06, 2006 at 06:25:25PM -0600, Michael A. Kohn wrote:
>>>
>>> On Tue, 7 Nov 2006, Fran?ois Revol wrote:
>>>
>>>> And I will do this if you don't mind, but don't mess up with something
>>>> you can't test.
>>>> I'll remove the net_server support code to simplify stuff, everyone
>>>> uses the illegal-BONE-beta or Zeta or Haiku now anyway.
>>>
>>> You're right. I can't test this on BEOS. This is a new version of the
>>> patch with the gxf.c changes removed. Can you please test this patch with
>>> BEOS and someone accept this patch?
>>
>> You misunderstand. You have no business messing with BeOS stuff, thus
>> your patch should not touch it. In any case it mixes two different
>> things: MinGW networking and BeOS cleanup. This has to be separated.
>>
>> Patch in its current form rejected.
>
> additionally, things like
>
>
> +#if defined(__BEOS__) || defined(__MINGW32__) || defined(__INNOTEK_LIBC__)
> +typedef int socklen_t;
> +#endif
>
> should rather be
>
> #ifndef HAVE_SOCKLEN_T
> typedef int socklen_t;
> #endif
>
> with HAVE_SOCKLEN_T set by configure
> or even typedef in config.h
>
>
> these huge messy prerocessor checks all over the source are ugly and make the
> code unreadable
Point taken. Then I have a couple questions:
1) I have this right now in tcp.c and udp.c:
#if defined(CONFIG_BEOS_NETSERVER) || defined(__MINGW32__)
closesocket(s->fd);
#else
close(s->fd);
#endif
Is there a HAVE_CLOSESOCKET? Or should that be added to the configure
script for BEOS and MINGW?
2) Maybe Diego is right and I'm not understanding this. I understand why
I shouldn't be messing with BEOS code. I can't test it. But most of the
goofy things BEOS needs #ifdef's for are also needed for MingW. Other
than moving the #include for "barpainet.h" into os_support.h, mostly all I
did was add the || defined(__MINGW32__) to make sure MingW compiles with
the BEOS changes too. I'm not really sure if there any way I can add
MingW changes without putting them in parallel to the BEOS #defines.
More information about the ffmpeg-devel
mailing list