Added clang compatibility.

This commit is contained in:
Elf M. Sternberg 2016-07-22 17:10:01 -07:00
parent a74b1ce714
commit 88a5a95b63
3 changed files with 10 additions and 1 deletions

View File

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

View File

@ -1,3 +1,4 @@
#include "compat.hpp"
#include <memory>
#include <list>
#include <algorithm>

6
src/compat.hpp Normal file
View File

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