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 win32_init would
not be called on a POSIX platform, but still...)

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?

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?

For the time being, I've applied the following patch. Comments?

--- easy.c.orig 2012-01-23 16:21:24.000000000 +0100
+++ easy.c      2012-03-16 17:35:42.562500000 +0100
@@ -125,7 +125,7 @@
     return CURLE_FAILED_INIT;
   }
   /* The Windows Sockets DLL is acceptable. Proceed. */
-#elif defined(USE_LWIPSOCK)
+#elif defined(USE_LWIPSOCK) && defined(HAVE_WINDOWS_H)
   lwip_init();
 #endif


-- 
Regards.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to