hidapi/windows/hid.c: comment out ntdef.h include after windows.h.
authorOzkan Sezer <sezeroz@gmail.com>
Fri, 28 Sep 2018 13:44:10 +0300
changeset 1225094e0879b9a6a
parent 12249 4f358c108da1
child 12251 47246ea2f62c
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
     1.1 --- a/src/hidapi/windows/hid.c	Fri Sep 28 13:41:04 2018 +0300
     1.2 +++ b/src/hidapi/windows/hid.c	Fri Sep 28 13:44:10 2018 +0300
     1.3 @@ -22,10 +22,7 @@
     1.4  
     1.5  #include <windows.h>
     1.6  
     1.7 -#ifndef _NTDEF_
     1.8 -typedef LONG NTSTATUS;
     1.9 -#endif
    1.10 -
    1.11 +#if 0 /* can cause redefinition errors on some toolchains */
    1.12  #ifdef __MINGW32__
    1.13  #include <ntdef.h>
    1.14  #include <winbase.h>
    1.15 @@ -35,6 +32,11 @@
    1.16  #include <ntdef.h>
    1.17  #define _wcsdup wcsdup
    1.18  #endif
    1.19 +#endif /* */
    1.20 +
    1.21 +#ifndef _NTDEF_
    1.22 +typedef LONG NTSTATUS;
    1.23 +#endif
    1.24  
    1.25  /* SDL C runtime functions */
    1.26  #include "../../SDL_internal.h"
    1.27 @@ -906,7 +908,6 @@
    1.28  	return 0;
    1.29  }
    1.30  
    1.31 -
    1.32  HID_API_EXPORT const wchar_t * HID_API_CALL  hid_error(hid_device *dev)
    1.33  {
    1.34  	return (wchar_t*)dev->last_error_str;
    1.35 @@ -918,7 +919,7 @@
    1.36  /*#define PICPGM*/
    1.37  /*#define S11*/
    1.38  #define P32
    1.39 -#ifdef S11 
    1.40 +#ifdef S11
    1.41    unsigned short VendorID = 0xa0a0;
    1.42  	unsigned short ProductID = 0x0001;
    1.43  #endif
    1.44 @@ -928,7 +929,6 @@
    1.45  	unsigned short ProductID = 0x3f;
    1.46  #endif
    1.47  
    1.48 -
    1.49  #ifdef PICPGM
    1.50    unsigned short VendorID = 0x04d8;
    1.51    unsigned short ProductID = 0x0033;