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 mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lzip-bug
