From c26a0e0e0f9aaeeda0ea07e51bce0f7eb0b95591 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 4 Dec 2006 05:23:35 +0000 Subject: minor fix for MinGW compilation svn path=/trunk/externals/io/hidio/; revision=6607 --- hidio.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'hidio.h') diff --git a/hidio.h b/hidio.h index 793de81..7e73fe7 100644 --- a/hidio.h +++ b/hidio.h @@ -1,17 +1,20 @@ #ifndef _HIDIO_H #define _HIDIO_H -#include +#include #ifdef _WINDOWS -#include "pthread.h" /* needs pthread library */ -#define LOG_DEBUG 7 -#define LOG_INFO 6 -#define LOG_WARNING 4 -#define vsnprintf _vsnprintf -#pragma warning (disable: 4305 4244 4761) -#else +#include "pthread.h" /* needs pthread library */ +#define LOG_DEBUG 7 +#define LOG_INFO 6 +#define LOG_WARNING 4 +#define vsnprintf _vsnprintf +#else #include -#include +#include +#endif + +#ifdef _MSC_VER /* this only applies to Microsoft compilers */ +#pragma warning (disable: 4305 4244 4761) #endif #ifdef __linux__ @@ -44,7 +47,7 @@ typedef void t_clock; #define HIDIO_MAJOR_VERSION 0 #define HIDIO_MINOR_VERSION 0 -/* static char *version = "$Revision: 1.5 $"; */ +/* static char *version = "$Revision: 1.6 $"; */ /*------------------------------------------------------------------------------ * GLOBAL DEFINES @@ -128,13 +131,13 @@ typedef struct _hid_element __u16 linux_code; #endif /* __linux__ */ #ifdef _WIN32 - /* this should be pointers to the UsagePage and Usage */ + /* this should store the UsagePage and Usage */ #endif /* _WIN32 */ #ifdef __APPLE__ void *pHIDElement; // pRecElement on Mac OS X; ... on Windows #endif /* __APPLE__ */ - t_symbol *type; // Linux "type"; HID "usagePage" - t_symbol *name; // Linux "code"; HID "usage" + t_symbol *type; // Linux "type"; HID "usagePage", but using the hidio scheme + t_symbol *name; // Linux "code"; HID "usage", but using the hidio scheme unsigned char polled; // is it polled or queued? (maybe only on Mac OS X?) unsigned char relative; // relative data gets output everytime t_int min; // from device report -- cgit v1.2.1