aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2018-03-10 18:10:43 -0500
committercnlohr <lohr85@gmail.com>2018-03-10 18:10:43 -0500
commitc687e3ea63a5d974fd35feb07fe7fb87d4375e6a (patch)
tree6011fe431de4393c9212b4d5db78759080d65509 /src
parentb0856a49eb1bb693fa7bb2e1a090a1420b85a95e (diff)
parent78507e78bc7ff8aaffbe24642cf7b7a689b419c6 (diff)
downloadlibsurvive-c687e3ea63a5d974fd35feb07fe7fb87d4375e6a.tar.gz
libsurvive-c687e3ea63a5d974fd35feb07fe7fb87d4375e6a.tar.bz2
Merge branch 'master' of https://github.com/cnlohr/libsurvive
Diffstat (limited to 'src')
-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 )