[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:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0 |
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.
signature.asc
Description: OpenPGP digital signature
- [Lzip-bug] mingw build failure, Roy, 2013/01/10
- Re: [Lzip-bug] mingw build failure, Antonio Diaz Diaz, 2013/01/10
- Re: [Lzip-bug] mingw build failure, Roy Tam, 2013/01/10
- Re: [Lzip-bug] mingw build failure, Antonio Diaz Diaz, 2013/01/11
- Re: [Lzip-bug] mingw build failure, Roy Tam, 2013/01/11
- Re: [Lzip-bug] mingw build failure, Antonio Diaz Diaz, 2013/01/12
- Re: [Lzip-bug] mingw build failure, Roy Tam, 2013/01/12
- Re: [Lzip-bug] mingw build failure, JonY, 2013/01/12
- Re: [Lzip-bug] mingw build failure, Antonio Diaz Diaz, 2013/01/13
- Re: [Lzip-bug] mingw build failure,
JonY <=
- Re: [Lzip-bug] mingw build failure, Antonio Diaz Diaz, 2013/01/14
- [Lzip-bug] Rc3, Elbert & Nicole Pol, 2013/01/15
- Re: [Lzip-bug] Rc3, Antonio Diaz Diaz, 2013/01/15
- Re: [Lzip-bug] Rc3, JonY, 2013/01/16
- Re: [Lzip-bug] Rc3, Antonio Diaz Diaz, 2013/01/16
- Re: [Lzip-bug] mingw build failure, Elbert & Nicole Pol, 2013/01/13