Fix build on older versions of gcc

Gcc 4.7 thinks there's a conflict with C99 stdint macros and C++, even with -std=c++11.
This commit is contained in:
John Ralls 2014-12-07 13:57:55 -08:00
parent 495c939c3e
commit 4654f49d5c
2 changed files with 7 additions and 4 deletions

View File

@ -24,7 +24,6 @@
extern "C"
{
#include "config.h"
#include <inttypes.h>
}
#include "gnc-int128.hpp"
@ -920,4 +919,3 @@ operator>> (GncInt128 a, uint b) noexcept
a >>= b;
return a;
}

View File

@ -25,7 +25,13 @@
#ifndef GNCINT128_H
#define GNCINT128_H
#include <stdint.h>
extern "C"
{
#define __STDC_LIMIT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
}
#include <stdexcept>
#include <string>
@ -248,7 +254,6 @@ GncInt128 gcd (int64_t a, int64_t b);
/** Compute the least common multiple of two integers
*/
GncInt128 lcm (int64_t a, int64_t b);
#endif //GNCINT128_H
/** @} */