[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Using libcurl on top of lwip
From: |
Mason |
Subject: |
[lwip-users] Using libcurl on top of lwip |
Date: |
Tue, 13 Mar 2012 16:40:37 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2 |
Hello,
I'm trying to port libcurl on top of lwip.
http://en.wikipedia.org/wiki/CURL
http://en.wikipedia.org/wiki/LwIP
My main difficulty is the close function, because it is
defined both in libc.a, to deal with regular files, and
in lwip.a, to deal with sockets.
I suppose the simple solution would be to convince libcurl
to use lwip_close instead of close?
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))
#elif defined(HAVE_CLOSESOCKET_CAMEL)
# define sclose(x) CloseSocket((x))
#else
# define sclose(x) close((x))
#endif
There's a similar problem with fcntl, with the added complexity
that some of the parameters are #defined in two places.
I'd be happy to hear suggestions, opinions, comments...
--
Regards.
- [lwip-users] Using libcurl on top of lwip,
Mason <=