summaryrefslogtreecommitdiff
path: root/src/sanity.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sanity.hpp')
-rw-r--r--src/sanity.hpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/sanity.hpp b/src/sanity.hpp
index f29a7c3..c00d9b2 100644
--- a/src/sanity.hpp
+++ b/src/sanity.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_SANITY_HPP
-#define TMWA_SANITY_HPP
+#pragma once
// sanity.hpp - Keep spatulas out of the build environment.
//
// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
@@ -19,32 +18,33 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# if 0
-# include "../sanity.hpp"
-# endif
+// just mention "fwd.hpp" to make formatter happy
-# 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
+namespace tmwa
+{
+#ifndef __cplusplus
+# error "Please compile in C++ mode"
+#endif // __cplusplus
-# if __GNUC__ == 4
+#if __GNUC__ < 4
+# error "Your compiler is absolutely ancient. You have no chance ..."
+#endif // __GNUC__ < 4
+
+#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
+// clang 3.2 is the minimum that the CI builds are using
+# if __GNUC_MINOR__ < 7 && !defined(__clang__)
+# error "Please upgrade to at least GCC 4.7"
+# endif // __GNUC_MINOR__ < 7 && !defined(__clang__)
+#endif // __GNUC__ == 4
-# if not defined(__i386__) and not defined(__x86_64__)
+#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
+// some integer sizes (partially fixed for the x32 ABI)
+# error "Unsupported platform, we use x86 / amd64 only"
+#endif // not __i386__
+} // namespace tmwa