Use cstdint instead of stdint.h to (hopefully) fix any problems caused by C/C++ mismatches
INT64_MIN was causing problems ('not declared'), because C99 requires some C++-specific behavior, which C++11 prohibits... Comments from clang's stdint implementation (http://clang.llvm.org/doxygen/stdint_8h_source.html): // C99 7.18.3 Limits of other integer types // // Footnote 219, 220: C++ implementations should define these macros only when // __STDC_LIMIT_MACROS is defined before <stdint.h> is included. // // Footnote 222: C++ implementations should define these macros only when // __STDC_CONSTANT_MACROS is defined before <stdint.h> is included. // // C++11 [cstdint.syn]p2: // // The macros defined by <cstdint> are provided unconditionally. In particular, // the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in // footnotes 219, 220, and 222 in the C standard) play no role in C++. // // C11 removed the problematic footnotes.master
parent
d654b3fa75
commit
1fbf6d3962
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
#include "config.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#endif
|
||||
#include <set>
|
||||
#include <list>
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <zlib.h>
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include "ZlibDecompressor.h"
|
||||
|
||||
ZlibDecompressor::ZlibDecompressor(const unsigned char *data, std::size_t size):
|
||||
|
|
Loading…
Reference in New Issue