diff --git a/Makefile b/Makefile index 460a889..5bd330f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,9 @@ CMDSRC= src/cmd.cpp TESTSOURCES= tests/test_cheapgmp.cpp LDFLAGS= TESTLDFLAGS= -laeryn_tests -laeryn_core -CFLAGS= -c -Wall -std=c++11 + +# Enable __USE_MISC if you're using clang +CFLAGS= -c -Wall -std=c++11 # -D__USE_MISC CPLUSPLUS= g++ BINARY=cheapgmp CMD=gmpcmd diff --git a/src/cheapgmp.hpp b/src/cheapgmp.hpp index 16f8c4f..fed64f1 100644 --- a/src/cheapgmp.hpp +++ b/src/cheapgmp.hpp @@ -1,3 +1,4 @@ +#include "compat.hpp" #include #include #include diff --git a/src/compat.hpp b/src/compat.hpp new file mode 100644 index 0000000..63e65cf --- /dev/null +++ b/src/compat.hpp @@ -0,0 +1,6 @@ +#ifdef __USE_MISC +/* Old compatibility names for C types. */ +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +#endif