From f453d6586b92a605957d8ec31aa11c6b30f10dbc Mon Sep 17 00:00:00 2001 From: mokafolio Date: Tue, 20 Nov 2018 18:48:32 -0800 Subject: [PATCH] made meson stuff work on gcc/linux, replaced fmodf and fabsf with fmod and fabs for proper c89 --- Examples/meson.build | 10 ++++++---- Tarp/Tarp.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Examples/meson.build b/Examples/meson.build index af288be..67552ff 100644 --- a/Examples/meson.build +++ b/Examples/meson.build @@ -1,17 +1,19 @@ glfw = dependency('glfw3') gl = dependency('GL') -deps = [] +deps = [gl, glfw] #we manually need to link glfw3 dependencies...hmm :/ if host_machine.system() == 'darwin' deps += [dependency('Cocoa'), dependency('IOKit'), dependency('CoreFoundation'), dependency('CoreVideo')] elif host_machine.system() == 'linux' - deps += [dependency('x11', method: 'pkg-config'), static: false] + cc = meson.get_compiler('c') + deps += [dependency('x11'), + cc.find_library('dl', required : true), + cc.find_library('m', required : true), + dependency('threads')] endif #@TODO Add windows deps for glfw -deps += [glfw, gl] - gl3w = '../ExampleAndTestDeps/GL/gl3w.c' if get_option('addressSanitizer') == true diff --git a/Tarp/Tarp.h b/Tarp/Tarp.h index 0ddcbaf..d2f5a3a 100644 --- a/Tarp/Tarp.h +++ b/Tarp/Tarp.h @@ -3095,9 +3095,9 @@ TARP_LOCAL void _tpGLStroke(_tpGLPath * _path, } offsetIntoPattern = _style->dashOffset; - if (fabsf(offsetIntoPattern) >= patternLen) + if (fabs(offsetIntoPattern) >= patternLen) { - offsetIntoPattern = fmodf(offsetIntoPattern, patternLen); + offsetIntoPattern = fmod(offsetIntoPattern, patternLen); } dashStartState.startDashLen = -offsetIntoPattern;