From cf7d64f2662cee538f0b5dce9fea926a45127e23 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 28 Sep 2018 13:44:10 +0300 Subject: [PATCH] hidapi/windows/hid.c: comment out ntdef.h include after windows.h. not necessary and can cause redefinition errors in some toolchains. --- src/hidapi/windows/hid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hidapi/windows/hid.c b/src/hidapi/windows/hid.c index 69b53231c..1d3803c40 100644 --- a/src/hidapi/windows/hid.c +++ b/src/hidapi/windows/hid.c @@ -22,10 +22,7 @@ #include -#ifndef _NTDEF_ -typedef LONG NTSTATUS; -#endif - +#if 0 /* can cause redefinition errors on some toolchains */ #ifdef __MINGW32__ #include #include @@ -35,6 +32,11 @@ typedef LONG NTSTATUS; #include #define _wcsdup wcsdup #endif +#endif /* */ + +#ifndef _NTDEF_ +typedef LONG NTSTATUS; +#endif /* SDL C runtime functions */ #include "../../SDL_internal.h" @@ -906,7 +908,6 @@ int HID_API_EXPORT_CALL HID_API_CALL hid_get_indexed_string(hid_device *dev, int return 0; } - HID_API_EXPORT const wchar_t * HID_API_CALL hid_error(hid_device *dev) { return (wchar_t*)dev->last_error_str; @@ -918,7 +919,7 @@ HID_API_EXPORT const wchar_t * HID_API_CALL hid_error(hid_device *dev) /*#define PICPGM*/ /*#define S11*/ #define P32 -#ifdef S11 +#ifdef S11 unsigned short VendorID = 0xa0a0; unsigned short ProductID = 0x0001; #endif @@ -928,7 +929,6 @@ HID_API_EXPORT const wchar_t * HID_API_CALL hid_error(hid_device *dev) unsigned short ProductID = 0x3f; #endif - #ifdef PICPGM unsigned short VendorID = 0x04d8; unsigned short ProductID = 0x0033;