aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/survive.c')
-rwxr-xr-xsrc/survive.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/survive.c b/src/survive.c
index 0386275..76bf8e4 100755
--- a/src/survive.c
+++ b/src/survive.c
@@ -94,7 +94,16 @@ static void *button_servicer(void * context)
return NULL;
}
-SurviveContext * survive_init( int headless )
+void survive_verify_FLT_size(uint32_t user_size) {
+ if(sizeof(FLT) != user_size) {
+ fprintf(stderr, "FLT type incompatible; the shared library libsurvive has FLT size %lu vs user program %u\n", sizeof(FLT), user_size);
+ fprintf(stderr, "Add '#define FLT %s' before including survive.h or recompile the shared library with the appropriate flag. \n",
+ sizeof(FLT) == sizeof(double) ? "double" : "float");
+ exit(-1);
+ }
+}
+
+SurviveContext * survive_init_internal( int headless )
{
#ifdef RUNTIME_SYMNUM
if( !did_runtime_symnum )