From 236638cd8731712e3446ba2db8b5e952c9589a7e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 8 Apr 2013 11:20:10 +0200 Subject: Added call convention parameter for win32. --- libusbhp/libusbhp.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libusbhp/libusbhp.h b/libusbhp/libusbhp.h index ccf7125..2df287e 100644 --- a/libusbhp/libusbhp.h +++ b/libusbhp/libusbhp.h @@ -28,6 +28,7 @@ #define __LIBUSBHP_H__ #ifdef WIN32 +#define CALL __stdcall #ifdef BUILD_DLL /* DLL export */ #define EXPORT __declspec(dllexport) @@ -37,6 +38,7 @@ #endif #include #else +#define CALL #define EXPORT #include #endif @@ -48,8 +50,8 @@ struct libusbhp_device_t { unsigned short idProduct; }; -typedef void (*libusbhp_hotplug_cb_fn)(struct libusbhp_device_t *device, - void *user_data); +typedef void (CALL *libusbhp_hotplug_cb_fn)(struct libusbhp_device_t *device, + void *user_data); EXPORT int libusbhp_init(struct libusbhp_t **handle); @@ -58,7 +60,8 @@ EXPORT void libusbhp_exit(struct libusbhp_t *handle); EXPORT - int libusbhp_handle_events_timeout(struct libusbhp_t *handle, struct timeval *tv); + int libusbhp_handle_events_timeout(struct libusbhp_t *handle, + struct timeval *tv); EXPORT void libusbhp_register_hotplug_listeners(struct libusbhp_t *handle, -- cgit v1.2.3