Author: hpoussin
Date: Sun Jul 27 03:18:07 2008
New Revision: 34829
URL:
http://svn.reactos.org/svn/reactos?rev=34829&view=rev
Log:
Prevent code duplication when translating GCC platform defines to MSVC ones.
Added:
trunk/reactos/include/reactos/msvctarget.h (with props)
Modified:
trunk/reactos/include/ddk/hidclass.h
trunk/reactos/include/psdk/windows.h
trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/include/ddk/hidclass.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/hidclass.h?rev…
==============================================================================
--- trunk/reactos/include/ddk/hidclass.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/hidclass.h [iso-8859-1] Sun Jul 27 03:18:07 2008
@@ -79,6 +79,22 @@
#define IOCTL_HID_SET_DRIVER_CONFIG HID_BUFFER_CTL_CODE(101)
#define IOCTL_HID_GET_MS_GENRE_DESCRIPTOR HID_OUT_CTL_CODE(121)
+/* FIXME: these values are wrong! */
+#define IOCTL_HID_GET_STRING 0
+#define IOCTL_HID_GET_DEVICE_ATTRIBUTES 1
+#define IOCTL_HID_GET_DEVICE_DESCRIPTOR 2
+#define IOCTL_HID_READ_REPORT 3
+#define IOCTL_HID_WRITE_REPORT 4
+#define IOCTL_HID_GET_REPORT_DESCRIPTOR 5
+
+typedef enum _HID_STRING_TYPE
+{
+ HID_STRING_INDEXED = 0,
+ HID_STRING_ID_IMANUFACTURER,
+ HID_STRING_ID_IPRODUCT,
+ HID_STRING_ID_ISERIALNUMBER,
+ HID_STRING_MAX
+} HID_STRING_TYPE;
enum DeviceObjectState {
DeviceObjectStarted = 0,
Modified: trunk/reactos/include/psdk/windows.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windows.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/windows.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/windows.h [iso-8859-1] Sun Jul 27 03:18:07 2008
@@ -16,21 +16,16 @@
#pragma GCC system_header
#endif
-/* translate GCC target defines to MS equivalents. Keep this synchronized
- with winnt.h. */
-#if defined(__i686__) && !defined(_M_IX86)
-#define _M_IX86 600
-#elif defined(__i586__) && !defined(_M_IX86)
-#define _M_IX86 500
-#elif defined(__i486__) && !defined(_M_IX86)
-#define _M_IX86 400
-#elif defined(__i386__) && !defined(_M_IX86)
-#define _M_IX86 300
+#ifdef __GNUC__
+#include <msvctarget.h>
#endif
+
#if defined(_M_IX86) && !defined(_X86_)
#define _X86_
#elif defined(_M_ALPHA) && !defined(_ALPHA_)
#define _ALPHA_
+#elif defined(_M_ARM) && !defined(_ARM_)
+#define _ARM_
#elif defined(_M_PPC) && !defined(_PPC_)
#define _PPC_
#elif defined(_M_MRX000) && !defined(_MIPS_)
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Jul 27 03:18:07 2008
@@ -4,24 +4,16 @@
#pragma GCC system_header
#endif
-/* translate GCC target defines to MS equivalents. Keep this synchronized
- with windows.h. */
-#if defined(__i686__) && !defined(_M_IX86)
-#define _M_IX86 600
-#elif defined(__i586__) && !defined(_M_IX86)
-#define _M_IX86 500
-#elif defined(__i486__) && !defined(_M_IX86)
-#define _M_IX86 400
-#elif defined(__i386__) && !defined(_M_IX86)
-#define _M_IX86 300
-#endif
+#ifdef __GNUC__
+#include <msvctarget.h>
+#endif
+
#if defined(_M_IX86) && !defined(_X86_)
#define _X86_
#elif defined(_M_ALPHA) && !defined(_ALPHA_)
#define _ALPHA_
-
-#elif defined(_M_ARM) && !defined(ARM)
-#define ARM
+#elif defined(_M_ARM) && !defined(_ARM_)
+#define _ARM_
#elif defined(_M_PPC) && !defined(_PPC_)
#define _PPC_
#elif defined(_M_MRX000) && !defined(_MIPS_)
Added: trunk/reactos/include/reactos/msvctarget.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/msvctarget…
==============================================================================
--- trunk/reactos/include/reactos/msvctarget.h (added)
+++ trunk/reactos/include/reactos/msvctarget.h [iso-8859-1] Sun Jul 27 03:18:07 2008
@@ -1,0 +1,17 @@
+#ifndef __GNUC__
+#error Unsupported compiler
+#endif
+
+/* translate GCC target defines to MS equivalents. */
+#if defined(__i686__) && !defined(_M_IX86)
+#define _M_IX86 600
+#undef __i686__
+#elif defined(__i586__) && !defined(_M_IX86)
+#define _M_IX86 500
+#undef __i586__
+#elif defined(__i486__) && !defined(_M_IX86)
+#define _M_IX86 400
+#undef __i486__
+#elif defined(__i386__) && !defined(_M_IX86)
+#define _M_IX86 300
+#endif
Propchange: trunk/reactos/include/reactos/msvctarget.h
------------------------------------------------------------------------------
svn:eol-style = native