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
Rogier 2015-05-30 21:06:17 +02:00
parent d654b3fa75
commit 1fbf6d3962
4 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
#include <limits>
#include <cmath>
#include <stdint.h>
#include <cstdint>
#include <stdexcept>
#include <cassert>
#include "config.h"

View File

@ -21,7 +21,7 @@
#endif
#include <set>
#include <list>
#include <stdint.h>
#include <cstdint>
#include <string>
#include <iostream>
#include <sstream>

View File

@ -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):

2
db.h
View File

@ -1,7 +1,7 @@
#ifndef _DB_H
#define _DB_H
#include <stdint.h>
#include <cstdint>
#include <vector>
#include <string>
#include <utility>