diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-11-15 21:52:11 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-11-15 21:52:26 -0800 |
commit | 4420659effaee63e1a814e5aae1350f1924731ab (patch) | |
tree | 840eaff58b703d097bb273779ba0e9c05c7546d7 /src/sanity.hpp | |
parent | 672c4091b5a43442759886144607aa407a04e5bc (diff) | |
download | tmwa-4420659effaee63e1a814e5aae1350f1924731ab.tar.gz tmwa-4420659effaee63e1a814e5aae1350f1924731ab.tar.bz2 tmwa-4420659effaee63e1a814e5aae1350f1924731ab.tar.xz tmwa-4420659effaee63e1a814e5aae1350f1924731ab.zip |
Another step towards proper header ordering
Diffstat (limited to 'src/sanity.hpp')
-rw-r--r-- | src/sanity.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/sanity.hpp b/src/sanity.hpp new file mode 100644 index 0000000..d4a8738 --- /dev/null +++ b/src/sanity.hpp @@ -0,0 +1,34 @@ +/// Keep spatulas out of the build environment +#ifndef TMWA_SANITY_HPP +#define TMWA_SANITY_HPP + +# ifndef __cplusplus +# error "Please compile in C++ mode" +# endif // __cplusplus + +# if __GNUC__ < 4 +# error "Your compiler is absolutely ancient. You have no chance ..." +# endif // __GNUC__ < 4 + +/// Convert type assumptions to use the standard types here +# include <cstdint> +/// size_t, NULL +# include <cstddef> + +# if __GNUC__ == 4 +// clang identifies as GCC 4.2, but is mostly okay. +// Until a bug-free release of it happens, though, I won't recommend it. +// (patched) clang 3.1 would be the requirement +# if __GNUC_MINOR__ < 6 && !defined(__clang__) +# error "Please upgrade to at least GCC 4.6" +# endif // __GNUC_MINOR__ < 6 && !defined(__clang__) +# endif // __GNUC__ == 4 + +# if not defined(__i386__) and not defined(__x86_64__) +// Known platform dependencies: +// endianness for the [RW]FIFO.* macros +// possibly, some signal-handling +# error "Unsupported platform, we use x86 / amd64 only" +# endif // not __i386__ + +#endif // TMWA_SANITY_HPP |