13 #if !defined(OS_LINUX) && !defined(OS_MAC) 
   14 #error Your OS is not supported. Edit os.h if you want to compile anyway. 
   21 #ifndef _DEFAULT_SOURCE 
   22 #define _DEFAULT_SOURCE 
   31 #include <linux/uinput.h> 
   32 #include <linux/usbdevice_fs.h> 
   34 #ifndef UINPUT_VERSION 
   35 #define UINPUT_VERSION 2 
   40 #define euid_guard_start 
   41 #define euid_guard_stop 
   47 #include <Availability.h> 
   48 #include <Carbon/Carbon.h> 
   49 #include <IOKit/IOMessage.h> 
   50 #include <IOKit/hid/IOHIDDevicePlugin.h> 
   51 #include <IOKit/hid/IOHIDLib.h> 
   52 #include <IOKit/hidsystem/IOHIDLib.h> 
   53 #include <IOKit/hidsystem/ev_keymap.h> 
   54 #include <IOKit/usb/IOUSBLib.h> 
   55 #include <IOKit/usb/USB.h> 
   57 typedef IOHIDDeviceDeviceInterface**    hid_dev_t;
 
   58 typedef IOUSBDeviceInterface182**       usb_dev_t;
 
   59 typedef IOUSBInterfaceInterface183**    usb_iface_t;
 
   63 extern pthread_mutex_t _euid_guard;
 
   64 #define euid_guard_start    pthread_mutex_lock(&_euid_guard) 
   65 #define euid_guard_stop     pthread_mutex_unlock(&_euid_guard) 
   69 void *memrchr(
const void *s, 
int c, 
size_t n);
 
   71 #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200 
   72 typedef int clockid_t;
 
   73 #define CLOCK_MONOTONIC 1 
   76 #define TIMER_ABSTIME   1 
   78 int clock_gettime(clockid_t clk_id, 
struct timespec *tp);
 
   79 int clock_nanosleep(clockid_t clock_id, 
int flags, 
const struct timespec *rqtp, 
struct timespec *rmtp);