lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using libcurl on top of lwip


From: Gisle Vanem
Subject: Re: [lwip-users] Using libcurl on top of lwip
Date: Tue, 13 Mar 2012 22:06:48 +0100

"Mason" <address@hidden> wrote:

My main difficulty is the close function, because it is
defined both in libc.a, to deal with regular files, and
in lip.a, to deal with sockets.

I suppose the simple solution would be to convince libcurl
to use lip_close instead of close?

Didn't the thread on the libcurl-list work? You posted about this
28 Feb 2012.
Gist of that was...
 In lwIP's src/include/lip/sockets.h:

 #if LWIP_COMPAT_SOCKETS
 #define closesocket(s)        lwip_close(s)
 ...

It looks like libcurl wrapped the call to close within a macro,
which means I would only have to change one line:

#if defined(HAVE_CLOSESOCKET)
#  define sclose(x)  closesocket((x))

So without looking at this in detail, you should define
HAVE_CLOSESOCKET and make sure the headers are in
correct order. My advice is to look at the preprocessed output
(gcc-whatever -E ...). So the real close() (or the real worker in libc.a) should not shadow for anything in either lwIP nor libcurl. But I'm not sure. Daniel Stenberg should know.

I'd be happy to hear suggestions, opinions, comments...

Me too; I'd be happy to get lwIP+libcurl to work okay on Windows.
But it's rather low on my list of priorities.

--gv



reply via email to

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