Merge pull request #17 from ycros/osx Fix suseconds_t for OSX.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
diff --git a/compat.h b/compat.h
index 7ea9c63..245697a 100644
--- a/compat.h
+++ b/compat.h
@@ -1,10 +1,6 @@
#ifndef __COMPAT_H__
#define __COMPAT_H__
-#ifndef __SUSECONDS_T_TYPE
-typedef long suseconds_t;
-#endif
-
#ifdef WIN32
#include <windows.h>
@@ -28,6 +24,10 @@ typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
+#ifndef __SUSECONDS_T_TYPE
+typedef long suseconds_t;
+#endif
+
#endif /* WIN32 */
#endif /* __COMPAT_H__ */
diff --git a/configure.ac b/configure.ac
index edfa4e0..d6fd215 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,21 +30,23 @@ PTHREAD_FLAGS="-pthread"
OPENCL_FLAGS="-lOpenCL"
case $target in
+ x86_64-*)
+ have_x86_64=true
+ ;;
+ *)
+ have_x86_64=false
+ ;;
+esac
+
+case $target in
*-*-mingw*)
have_x86_64=false
have_win32=true
PTHREAD_FLAGS=""
;;
- x86_64-*)
- have_x86_64=true
- ;;
*-*-darwin*)
- have_x86_64=false
OPENCL_FLAGS="-framework OpenCL"
;;
- *)
- have_x86_64=false
- ;;
esac
# Check for OpenCL (the long way needed on mingw32 due to calling conventions)