[Top][All Lists]

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

Re: [libmicrohttpd] size MHD_SIZE_UNKNOWN should never be returned in he

From: Christian Grothoff
Subject: Re: [libmicrohttpd] size MHD_SIZE_UNKNOWN should never be returned in header
Date: Fri, 2 Apr 2010 09:44:53 +0200
User-agent: KMail/1.12.4 (Linux/2.6.31-14-generic; KDE/4.3.5; i686; ; )

On Friday 02 April 2010 09:28:08 am Brecht Sanders wrote:
> Excellent!
> Apparently I had that still in there from the 0.3.x days.
> However, I want to keep compatibility, so I will use #if MHD_VERSION <
> 0x00040000 in my program around MHD_create_response_from_callback.

You can also just do

#define MHD_SIZE_UNKNOWN ((uint64_t)-1)

> By the way, your includes break Windows unless you do it like this:
> #include <stdarg.h>
> #ifdef __WIN32__
>   #include <ws2tcpip.h>
> #else
>   #include <sys/select.h>
>   #include <sys/socket.h>
> #endif
> Why don't you include those in microhttpd.h so no other headers are
> required to be pre-included?
> Maybe #ifdef __WIN32__ should be something more general to also include
> Windows 64-bit versions...

The problem is that whatever we do here it won't work out-of-the-box on some 
platform. So in order to avoid that, we require the code that uses MHD to 
first include the proper platform-specific headers.  I realize that is not 
perfect, but I've yet to see a better workable solution that works on z/OS, 
BSD, GNU, W32, eCos and Symbian and ...



reply via email to

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