medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit b8b3016d73ec079d6d1f6ccae33679272e9b3095
parent e66af9caeea0cb86410d2b3ba6454cb32311f13f
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Aug 16 12:06:57 +0200

Put #include "platform_backtrace.h" after #define array_count so we compile again

Diffstat:
intrinsics.h | 35++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/intrinsics.h b/intrinsics.h @@ -3,7 +3,6 @@ #include <stdio.h> #include <stdint.h> -#include "platform_backtrace.h" typedef int8_t i8; typedef int16_t i16; @@ -20,22 +19,6 @@ typedef double f64; #define array_count( x ) ( sizeof( x ) / sizeof( ( x )[ 0 ] ) ) -#ifdef assert -#undef assert -#endif - -inline void mike_assert( const bool predicate, const char * const message ) { - if( !( predicate ) ) { - puts( message ); - print_backtrace(); - __builtin_trap(); - } -} - -#define STRINGIFY_HELPER( x ) #x -#define STRINGIFY( x ) STRINGIFY_HELPER( x ) -#define assert( predicate ) mike_assert( predicate, "assertion failed at " __FILE__ " line " STRINGIFY( __LINE__ ) ": " #predicate ) - #define is_power_of_2( n ) ( ( ( n ) & ( ( n ) - 1 ) ) == 0 ) #define align_power_of_2( n, alignment ) ( ( ( n ) + ( alignment ) - 1 ) & ~( ( alignment ) - 1 ) ) @@ -58,4 +41,22 @@ inline size_t gigabytes( const size_t gb ) { return megabytes( gb ) * 1024; } +#include "platform_backtrace.h" + +#ifdef assert +#undef assert +#endif + +inline void mike_assert( const bool predicate, const char * const message ) { + if( !( predicate ) ) { + puts( message ); + print_backtrace(); + __builtin_trap(); + } +} + +#define STRINGIFY_HELPER( x ) #x +#define STRINGIFY( x ) STRINGIFY_HELPER( x ) +#define assert( predicate ) mike_assert( predicate, "assertion failed at " __FILE__ " line " STRINGIFY( __LINE__ ) ": " #predicate ) + #endif // _INTRINSICS_H_