[Top][All Lists]

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

Re: [libmicrohttpd] {Spam?} {Spam?} sizeof(size_t)==4 on 32-bit systems

From: Christian Grothoff
Subject: Re: [libmicrohttpd] {Spam?} {Spam?} sizeof(size_t)==4 on 32-bit systems and position in the datastream
Date: Thu, 5 Feb 2009 23:17:58 -0700
User-agent: KMail/1.10.3 (Linux/2.6.27-9-generic; KDE/4.1.3; i686; ; )

You are right, that is an issue.  I've fixed it largely as you suggested (some 
changes were required in places beyond the API, but I think I got all of 

The change is in SVN 8196 and breaks backwards-compatibility with the previous 
API (starting with MHD_VERSION 0x00040001 as #defined in microhttpd.h) due to 
the use of uint64_t which is obviously not the same as "size_t".  I've also 
taken the opportunity to change some of our "unsigned int"'s to "size_t"'s in 
places where "size_t" is more appropriate.  A detailed comment describing each 
function changed is in the ChangeLog.



On Thursday 05 February 2009 07:23:24 am address@hidden wrote:
> On 32-bit systems size_t often defined as unsigned int, sizeof(size_t) ==
> 4.
> So, on such systems there is no posibility to set content size more than
> 4Gb in the MHD_create_response_from_callback() (in size arg) and
> to set datastream position more than 4Gb in MHD_ContentReaderCallback()
> (in pos arg).
> This is preventing MHD to serve large files such as
> DVD images, which can be 4.7 Gb in size, or some huge video file
> (what in the "age of HD video" is not so uncommon).
> I propose to change the definition of the "size" and "pos" to some
> explicite 64-bit type, e.g. uint64_t from stdint.h or something similar.
> Surely, all other logic in the MDH's internals, related to this
> definitions, should support this new 64-bit type.
> Thank you.

reply via email to

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