lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Exporting the real BSD socket API function names?


From: Mason
Subject: Re: [lwip-users] Exporting the real BSD socket API function names?
Date: Wed, 29 Feb 2012 17:42:09 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2

Simon Goldschmidt wrote:

> Mason wrote:
>
>> Is it possible to configure lwip in such a way that the static
>> library I build exports the /real/ BSD socket API function names?
>> I.e. export foo instead of lwip_foo (for socket, connect, bind, etc)
> 
> I don't think it's currently possible without modifying the sources.
> I'd suggest to solve this by changing the way LWIP_COMPAT_SOCKETS
> works (see end of sockets.h): currently, we define accept() to
> lwip_accept(). If you would lwip_accept to accept (define turned
> around, no arguments/only method name is redefined), that would
> result in naming the actual functions like you want.

I did the following. (I'm working with the 1.4.x branch.)

in lwipopts.h
#define LWIP_COMPAT_SOCKETS 0

in arch/cc.h
#define lwip_gethostbyname    gethostbyname
#define lwip_gethostbyname_r  gethostbyname_r
#define lwip_getaddrinfo      getaddrinfo
#define lwip_freeaddrinfo     freeaddrinfo

With this change, netdb.o exports the POSIX names.

However, this was a red herring, and I'm still stuck building
libcurl. I think the main problem is that the lwip header
naming might not be 100% POSIX compliant, and libcurl can't
find a lot of network related declarations.

I think I saw some discussion or bug reports concerning POSIX
compliance of headers, or am I mistaken?

-- 
Regards.



reply via email to

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