On 06/07/17 20:48, Cantor, Scott wrote:
Visual Studio had somewhat lacking C99 support, so it might be problematic
for older versions.
It's not missing SIZE_MAX though, AFAIK, so Windows isn't really much of a
concern there.
OK, that's good news.
Could we not use std::numeric_limits instead? It should work everywhere,
and should be better supported than C99?
Possibly, I'm not as familiar with it. If we're referring to size_t in the
code, which we are, I wanted to be consistent with that. I checked in this
change for now so I could patch a bug in Base64.cpp, and it's indirecting via
XERCES_SIZE_MAX, so it's easy enough to change, though hard to test.
http://en.cppreference.com/w/cpp/types/numeric_limits
Should be as simple as:
#include <limits>
std::numeric_limits<size_t>::min()
std::numeric_limits<size_t>::max()
std::numeric_limits<ssize_t>::min()
std::numeric_limits<ssize_t>::max()
Limits are defined for all the standard integer types.
I think your cmake check around some of this may be slightly off. It was
including stdint.h but if you do that in C++, you don't get the MAX macros
unless you define another macro apparently. I don't get cstdint usable on Linux
without C++11, so it's falling into the stdint.h part, and I had to alter your
cmake version to make that work.
Interesting, I'll certainly take a look. I'm afraid I'm away until next
Wednesday, so I won't be able to do anything until then.
Regards,
Roger
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org