[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] syscalls name clash

From: Evgeny Grin
Subject: Re: [libmicrohttpd] syscalls name clash
Date: Sat, 19 Apr 2014 05:03:36 +0400

Just add a configure test and add to platform_interface.h (rough example)
#if defined(MHD_USE_FCNTL2)
#define MHD_fctrl_(a,b) fcntl2((a),(b))
#elif defined(MHD_USE_FCNTL3)
#define MHD_fctrl_(a,b) fcntl3((a),(b),0)

Best Wishes,

19.04.2014, 02:50, "Christian Grothoff" <address@hidden>:
> I don't see a problem with the fcntl_2/3 approach.  However,
> following existing naming conventions we should use
> MHD_fcntl2_ instead of MHD_FCNTL2.
> Happy hacking!
> Christian
> On 04/18/14 15:10, Martin Velek wrote:
>>  Hi,
>>  I will manage it. There has to be one ugly hack. To support all
>>  platforms (compilers), the  MHD_FNCTL should be in the two forms.
>>  MHD_FNCTL2(x,y) and MHD_FNCTL3(x,y,z). I am not sure whether variadic
>>  macros are supported by all compilers (< C99). Some hints to overcome
>>  it would be appreciated.
>>  Best
>>  Martin
>>  On Fri, Apr 18, 2014 at 2:46 PM, Christian Grothoff <address@hidden> wrote:
>>>  Hi!
>>>  Given that I remember Symbian also creating similar issues, I guess I'm
>>>  not opposed to this in principle.  However, we should only do this for
>>>  the symbols where it is really needed, instead of always wrapping all
>>>  system calls (and use #defines so that on platforms where the system
>>>  call is sane, we have zero overhead).
>>>  So Martin, if you could contribute
>>>  1) a patch with the minimal changes that make it work for you,
>>>  2) updates to the TeXInfo manual that describe how to make MHD
>>>     work with lwip (so that others can benefit from the change)
>>>  I'd be in favor of merging the change.
>>>  Happy hacking!
>>>  Christian
>>>  On 04/14/14 20:29, Martin Velek wrote:
>>>>  Hi,
>>>>  it is about using libmicrohttpd on non-POSIX enviroment. More users,
>>>>  more bugs discovered, and so on. I do not insist, it is only a feature
>>>>  request.
>>>>  I cannot say if there is another software affected, most of it I am
>>>>  using is ANSI C or has an adaptation layer exactly from these reasons
>>>>  (non standard enviroment).
>>>>  Best
>>>>  Martin
>>>>  On Mon, Apr 14, 2014 at 2:51 PM, Zbigniew Jędrzejewski-Szmek
>>>>  <address@hidden> wrote:
>>>>>  On Mon, Apr 14, 2014 at 02:29:58PM +0200, Martin Velek wrote:
>>>>>>  Hello,
>>>>>>  could be possible to rename all socket functions (fnctl, send, accept
>>>>>>  etc) to something like MHD_FNCTL, MHD_SEND,  in further versions >
>>>>>>  0.9.34?
>>>>>>  I am using lwip, gnu arm with newlib and there is a name clash for
>>>>>>  fnctl. The newlib has a function named fnctl, but without
>>>>>>  implementation, returning -1. The lwip has own implementation of
>>>>>>  lwip_fnctl. I cannot simply define #define fnctl lwip_fnctl because it
>>>>>>  would break all code using libmicrohttpd.
>>>>>  Hi,
>>>>>  it seems clear that the problem is in lwip, and should be fixed there. 
>>>>> Why
>>>>>  force ugly workarounds into all other software (lib痛ttpd certainly isn't
>>>>>  the only thing affected), instead of fixing the error where it is?
>>>>>  Zbyszek

Best Wishes,
Evgeny Grin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]