Commit
Also, since GCC 4.7 there is a binary compatibility issue when linking with a Guichan that was not compiled in C++11 mode. This commit also allows compiling with GCC 4.7 with C++11 mode turned off. Reviewed-by: Erik Schilling
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
/* | ||
* Compatibility header used when the compiler doesn't support C++0x. | ||
* | ||
* It doesn't seem necessary for it to contain anything, at least GCC 4.2.1 | ||
* compiles Mana fine so it apparently understands types like uint16_t by | ||
* default. | ||
* While GCC 4.2.1 understands types like uint16_t by default, later versions | ||
* are more strict so here are some typedefs for types used in our code. | ||
*/ | ||
|
||
typedef unsigned char uint8_t; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bjorn
Author
Member
|
||
typedef unsigned short uint16_t; | ||
typedef unsigned int uint32_t; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <cstdlib> // pulls in int64_t | ||
This comment has been minimized.
Sorry, something went wrong.
mgorny
|
||
#include <cstdio> | ||
#include <string> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ class ItemDB | |
mLoaded(false) | ||
{} | ||
|
||
~ItemDB() | ||
virtual ~ItemDB() | ||
{} | ||
|
||
/** | ||
|
This sounds like a very very bad idea. GCC tends to make these workaround cause even more bugs in the following versions, so we'll likely end up revisiting this pretty soon.
If you don't want to go with C++11 all the way, maybe you want to try using #include <tr1/cstdint> (which as far as I can tell still allows using cstdint without having to go through the C++11 implementation).