Gisle Vanem <[EMAIL PROTECTED]> writes: > "Hrvoje Niksic" wrote: > >> Thanks for the info. Is it OK to just require MSVC7, or should we >> write a compatibility function for earlier versions? > > Write a compatible function IMHO. A lot of users (including me) still > uses MSVC6.
OK. I don't think we can use sscanf, though, because strtol(l) supports (and Wget uses) overflow detection. >> One more question: how does one spell 64-bit constants in MSVC? >> google seems to suggest nnnI64; how portable is that? > > That can be expressed with: > > #if defined(_MSC_VER) || defined(__WATCOMC__) > #define S64_SUFFIX(x) (x##i64) > #define U64_SUFFIX(x) (x##Ui64) > #else > #define S64_SUFFIX(x) (x##LL) > #define U64_SUFFIX(x) (x##ULL) > #endif That won't work with old compilers which Wget still (unless Mauro has decreed otherwise) supports. Fortunately, I need 64-bit constants in only one place, which is now correctly ifdeffed.