[Top][All Lists]

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

Re: [Lzip-bug] mingw build failure

From: JonY
Subject: Re: [Lzip-bug] mingw build failure
Date: Mon, 14 Jan 2013 18:16:06 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080213 Thunderbird/ Mnenhy/

On 1/13/2013 22:00, Antonio Diaz Diaz wrote:
> Roy, JonY, Elbert, thanks for your quick and useful answers. And best
> wishes for 2013 to all. :-)
> Roy Tam wrote:
>> for strtoull in mingw, use _strtoui64.
>> [...]
>> but g++ complains there is no header about it, I think keep using
>> strtoll/strtoull in C++ version will be better.
>> (the function exists in MSVCRT.dll but mingw header does not have
>> prototypes)
> I think I have found the perfect solution for this; instead of using
> exotic windows functions, use the standard strtoul:
>   #if defined(__MSVCRT__)
>   #define strtoull std::strtoul
>   #endif
> This surely will work on any kind of windows system and its only effect
> is that (on 32 bit windows systems) numbers larger than 4GiB must be
> given using prefixes (16G instead of 16000000000). This does not affect
> dictionary sizes, only the less used --member-size and --volume-size.

I think Roy meant strtoull is missing from the headers, if so,
_strtoui64 should be fine since it is already guarded by __MSVCRT__.

I still think the most correct way is to get mingw to fix their headers
since the function actually exists, just unexposed. I dislike these
define hacks, especially on a still active target.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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