summaryrefslogblamecommitdiff
path: root/src/common/sanity.hpp
blob: 3658f9f6a65c98e7a2c1e98b6b1b1e9c9b432cfc (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                

                  
 

                                     
                      


                                                                      





                                                           






                                                                        
                                                     
                        
 
                                                      


                                       
                                                    
                       
 
                    
/// return wrappers for unexpected NULL pointers
#ifndef SANITY_HPP
#define 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 use x86 / amd64 only"
# endif // not __i386__

#endif // SANITY_HPP