Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-21 Thread Daniel Stenberg
On Tue, 20 Mar 2012, Mason wrote: I really don't like this being dependent on the presence of windows.h. I'd rather we make a decision and we document that - it will still be a good idea to produce a short description somewhere on how to build and use libcurl with lwip so that future users won

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-21 Thread Daniel Stenberg
On Tue, 20 Mar 2012, Mason wrote: My static HTTP-only libcurl (SH-4) is much larger than 100 KB. I'll report the exact size after I've disabled verbose strings. Did you also make sure to strip it? I can't recall how much (if at all) larger sh-4 programs are in general as compared to x86, but

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-20 Thread Mason
Daniel Stenberg wrote: > Mason wrote: > >> Technically, one should not call lwip_init, as lwip_init is called from >> tcpip_init. Philosophically, why would library code initialize the network >> stack on which the library code depends? > > Philosophically, we do it for win32 if the correct bi

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-20 Thread Mason
Dan Fandrich wrote: > Mason wrote: > >> By the way, is there a way to make libcurl even smaller? :-) > > In case you haven't found it by now, there are a number of tricks > documented in the INSTALL file. http://curl.haxx.se/docs/install.html REDUCING SIZE = There are a number of

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-20 Thread Mason
Daniel Stenberg wrote: > Mason wrote: > >> Proposed patch (will test ASAP) > > I've just pushed this change to the git repo. Great! After fixing two (minor) bugs in lwip, I was finally able to HTTP GET Google's index page :-) >> By the way, is there a way to make libcurl even smaller? :-) >

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-19 Thread Dan Fandrich
On Fri, Mar 16, 2012 at 02:00:34PM +0100, Mason wrote: > By the way, is there a way to make libcurl even smaller? :-) In case you haven't found it by now, there are a number of tricks documented in the INSTALL file. >>> Dan --- List

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-19 Thread Gisle Vanem
"Guenter" wrote: If its not possible to check if initialisation is required or not then its probably worth to talk to the lwip team and suggest an enhancement to lwip_init() so that it does simply nothing if the stack is already initialized. I can only speak for Windows. We can probably ass

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-18 Thread Guenter
Hi, Am 17.03.2012 22:36, schrieb Daniel Stenberg: On Fri, 16 Mar 2012, Mason wrote: On my platform, at boot-time, the network stack is one of the first things initialized, long before any thread has had a chance to run libcurl code. Perhaps this is a Windows peculiarity? How can it be Windows

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-17 Thread Daniel Stenberg
On Fri, 16 Mar 2012, Mason wrote: Is there a guarantee that setup.h will never include setup_once.h, directly or indirectly? Perhaps it is safer to define an sfcntl (socket fcntl) macro along with sclose. Yes I agree. Proposed patch (will test ASAP) I've just pushed this change to the git

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-17 Thread Daniel Stenberg
On Fri, 16 Mar 2012, Mason wrote: Technically, one should not call lwip_init, as lwip_init is called from tcpip_init. Philosophically, why would library code initialize the network stack on which the library code depends? Philosophically, we do it for win32 if the correct bit is set (CURL_GL

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-16 Thread Mason
Mason wrote: > I have almost (I hope!) succeeded in generating libcurl on > top of lwip for a (mostly) POSIX sh-superh-elf platform. > > The last problem [...] And after "the last problem" had been solved, one more "last problem" showed up :-) In easy.c, win32_init calls lwip_init. (I suppose

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-16 Thread Mason
Daniel Stenberg wrote: > On Thu, 15 Mar 2012, Mason wrote: > >> I have almost (I hope!) succeeded in generating libcurl on top of lwip >> for a (mostly) POSIX sh-superh-elf platform. > > Nice! :-) >> As far as I can tell, in libcurl, fcntl is only called on sockets (in >> nonblock.c). Therefo

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-15 Thread Daniel Stenberg
On Thu, 15 Mar 2012, Mason wrote: I have almost (I hope!) succeeded in generating libcurl on top of lwip for a (mostly) POSIX sh-superh-elf platform. Nice! As far as I can tell, in libcurl, fcntl is only called on sockets (in nonblock.c). Therefore I think it should be possible to have libcu

Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-15 Thread Mason
Hello, I have almost (I hope!) succeeded in generating libcurl on top of lwip for a (mostly) POSIX sh-superh-elf platform. The last problem comes from "generic" POSIX functions, i.e. those that deal with file descriptors which might describe either a regular file or a socket (e.g. close and fcntl