[Commits] SDL: hidapi/windows/hid.c: comment out ntdef.h include after win...

libsdl.org revision control commits-owner at libsdl.org
Fri Sep 28 03:44:28 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/94e0879b9a6a
changeset: 12250:94e0879b9a6a
user:      Ozkan Sezer <sezeroz at gmail.com>
date:      Fri Sep 28 13:44:10 2018 +0300
description:
hidapi/windows/hid.c: comment out ntdef.h include after windows.h.

not necessary and can cause redefinition errors in some toolchains.

diffstat:

 src/hidapi/windows/hid.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 4f358c108da1 -r 94e0879b9a6a src/hidapi/windows/hid.c
--- a/src/hidapi/windows/hid.c	Fri Sep 28 13:41:04 2018 +0300
+++ b/src/hidapi/windows/hid.c	Fri Sep 28 13:44:10 2018 +0300
@@ -22,10 +22,7 @@
 
 #include <windows.h>
 
-#ifndef _NTDEF_
-typedef LONG NTSTATUS;
-#endif
-
+#if 0 /* can cause redefinition errors on some toolchains */
 #ifdef __MINGW32__
 #include <ntdef.h>
 #include <winbase.h>
@@ -35,6 +32,11 @@
 #include <ntdef.h>
 #define _wcsdup wcsdup
 #endif
+#endif /* */
+
+#ifndef _NTDEF_
+typedef LONG NTSTATUS;
+#endif
 
 /* SDL C runtime functions */
 #include "../../SDL_internal.h"
@@ -906,7 +908,6 @@
 	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 @@
 /*#define PICPGM*/
 /*#define S11*/
 #define P32
-#ifdef S11 
+#ifdef S11
   unsigned short VendorID = 0xa0a0;
 	unsigned short ProductID = 0x0001;
 #endif
@@ -928,7 +929,6 @@
 	unsigned short ProductID = 0x3f;
 #endif
 
-
 #ifdef PICPGM
   unsigned short VendorID = 0x04d8;
   unsigned short ProductID = 0x0033;


More information about the commits mailing list