From 89bc16599528f4978d3c7767be0561bb6c66cd86 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 20 Feb 2012 18:26:58 +0000 Subject: sync with x_misc.c from pure-data.git 0.42-1 svn path=/trunk/; revision=16005 --- externals/vanilla/namecanvas.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'externals/vanilla/namecanvas.c') diff --git a/externals/vanilla/namecanvas.c b/externals/vanilla/namecanvas.c index cd523237..ac6c1976 100644 --- a/externals/vanilla/namecanvas.c +++ b/externals/vanilla/namecanvas.c @@ -9,16 +9,26 @@ #include #include #include -#ifdef UNISTD +#ifdef _WIN32 +#include +#include +#else #include #include #include #include #include +#endif /* _WIN32 */ + +#if defined (__APPLE__) || defined (__FreeBSD__) +#define CLOCKHZ CLK_TCK #endif -#ifdef _WIN32 -#include +#if defined (__linux__) || defined (__CYGWIN__) || defined (ANDROID) +#define CLOCKHZ sysconf(_SC_CLK_TCK) +#endif +#if defined (__FreeBSD_kernel__) || defined(__GNU__) #include +#define CLOCKHZ CLOCKS_PER_SEC #endif static t_class *namecanvas_class; -- cgit v1.2.1