summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanisław Halik <sthalik@misaki.pl>2017-08-05 17:13:06 +0200
committerGitHub <noreply@github.com>2017-08-05 17:13:06 +0200
commit70fa0b3f7e1ec4581e30127785fb6d59b89ec704 (patch)
tree9bb436304297b093a7a0e9c239cee01c175458a6
parentf7701592fcf7cc3b268a331b969374cd0c796ff2 (diff)
parent2616ec46f5b69e3452788394ba6d0e21232463cc (diff)
Merge pull request #668 from MrCapone/macos_build_fix
fixed macos build
-rw-r--r--compat/nan.cpp5
-rw-r--r--compat/timer.cpp2
-rw-r--r--qxt-mini/qxtglobalshortcut_mac.cpp12
-rw-r--r--spline/spline.cpp1
4 files changed, 13 insertions, 7 deletions
diff --git a/compat/nan.cpp b/compat/nan.cpp
index 9c7bf147..2659ad07 100644
--- a/compat/nan.cpp
+++ b/compat/nan.cpp
@@ -19,6 +19,11 @@ int __cdecl my_fpclassify(double)__asm__("___fpclassify");
#define my_isinf(x) (my_fpclassify(x) == FP_INFINITE)
extern "C" OTR_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double x)
+#elif defined __APPLE__
+# include <math.h>
+# define my_isnan(x) isnan(x)
+# define my_isinf(x) isinf(x)
+extern "C" OTR_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double x)
#else
int my_isnan(double)__asm__("isnan");
int my_isinf(double)__asm__("isinf");
diff --git a/compat/timer.cpp b/compat/timer.cpp
index ca22fa10..ff08c3d5 100644
--- a/compat/timer.cpp
+++ b/compat/timer.cpp
@@ -109,7 +109,7 @@ mach_timebase_info_data_t Timer::otr_get_mach_frequency()
return timebase_info;
}
-double Timer::otr_clock_gettime(timespec* ts)
+void Timer::otr_clock_gettime(timespec* ts)
{
static const mach_timebase_info_data_t timebase_info = otr_get_mach_frequency();
uint64_t state, nsec;
diff --git a/qxt-mini/qxtglobalshortcut_mac.cpp b/qxt-mini/qxtglobalshortcut_mac.cpp
index 55684667..d7cd7f84 100644
--- a/qxt-mini/qxtglobalshortcut_mac.cpp
+++ b/qxt-mini/qxtglobalshortcut_mac.cpp
@@ -80,7 +80,7 @@ quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key keys)
{
UTF16Char ch;
// Constants found in NSEvent.h from AppKit.framework
- switch (key)
+ switch (keys)
{
case Qt::Key_Return:
return kVK_Return;
@@ -170,11 +170,11 @@ quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key keys)
;
}
- if (key == Qt::Key_Escape) ch = 27;
- else if (key == Qt::Key_Return) ch = 13;
- else if (key == Qt::Key_Enter) ch = 3;
- else if (key == Qt::Key_Tab) ch = 9;
- else ch = key;
+ if (keys == Qt::Key_Escape) ch = 27;
+ else if (keys == Qt::Key_Return) ch = 13;
+ else if (keys == Qt::Key_Enter) ch = 3;
+ else if (keys == Qt::Key_Tab) ch = 9;
+ else ch = keys;
CFDataRef currentLayoutData;
TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
diff --git a/spline/spline.cpp b/spline/spline.cpp
index 943c3af4..9d783df6 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -9,6 +9,7 @@
#include "spline.hpp"
#include <algorithm>
+#include <cstdlib>
#include <cmath>
#include <memory>
#include <cinttypes>