Minimize differences between GCC and MSVC in header file
Don't define SR_MSR_DSR as it already exists under the name
SERIAL_DSR_STATE
Remove $Id: tags
Modified: trunk/reactos/drivers/bus/serenum/detect.c
Modified: trunk/reactos/drivers/bus/serenum/fdo.c
Modified: trunk/reactos/drivers/bus/serenum/misc.c
Modified: trunk/reactos/drivers/bus/serenum/pdo.c
Modified: trunk/reactos/drivers/bus/serenum/serenum.c
Modified: trunk/reactos/drivers/bus/serenum/serenum.h
_____
Modified: trunk/reactos/drivers/bus/serenum/detect.c
--- trunk/reactos/drivers/bus/serenum/detect.c 2005-07-07 22:27:30 UTC
(rev 16500)
+++ trunk/reactos/drivers/bus/serenum/detect.c 2005-07-07 23:10:35 UTC
(rev 16501)
@@ -1,5 +1,4 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/detect.c
@@ -285,7 +284,7 @@
Status = SerenumDeviceIoControl(LowerDevice,
IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, &Msr, &Size);
if (!NT_SUCCESS(Status)) goto ByeBye;
- if ((Msr & SR_MSR_DSR) == 0) goto SerenumDisconnectIdle;
+ if ((Msr & SERIAL_DSR_STATE) == 0) goto SerenumDisconnectIdle;
/* 2. COM port setup, 1st phase */
CHECKPOINT;
@@ -356,7 +355,7 @@
Status = SerenumDeviceIoControl(LowerDevice,
IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, &Msr, &Size);
if (!NT_SUCCESS(Status)) goto ByeBye;
- if ((Msr & SR_MSR_DSR) == 0) goto SerenumVerifyDisconnect; else
goto SerenumConnectIdle;
+ if ((Msr & SERIAL_DSR_STATE) == 0) goto SerenumVerifyDisconnect;
else goto SerenumConnectIdle;
/* 6. Collect PnP COM device ID */
SerenumCollectPnpComDeviceId:
@@ -395,7 +394,7 @@
Status = SerenumDeviceIoControl(LowerDevice,
IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, &Msr, &Size);
if (!NT_SUCCESS(Status)) goto ByeBye;
- if ((Msr & SR_MSR_DSR) == 0) goto SerenumVerifyDisconnect;
+ if ((Msr & SERIAL_DSR_STATE) == 0) goto SerenumVerifyDisconnect;
/* 7. Verify disconnect */
SerenumVerifyDisconnect:
_____
Modified: trunk/reactos/drivers/bus/serenum/fdo.c
--- trunk/reactos/drivers/bus/serenum/fdo.c 2005-07-07 22:27:30 UTC
(rev 16500)
+++ trunk/reactos/drivers/bus/serenum/fdo.c 2005-07-07 23:10:35 UTC
(rev 16501)
@@ -1,5 +1,4 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/fdo.c
_____
Modified: trunk/reactos/drivers/bus/serenum/misc.c
--- trunk/reactos/drivers/bus/serenum/misc.c 2005-07-07 22:27:30 UTC
(rev 16500)
+++ trunk/reactos/drivers/bus/serenum/misc.c 2005-07-07 23:10:35 UTC
(rev 16501)
@@ -1,5 +1,4 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/dd/serenum/misc.c
_____
Modified: trunk/reactos/drivers/bus/serenum/pdo.c
--- trunk/reactos/drivers/bus/serenum/pdo.c 2005-07-07 22:27:30 UTC
(rev 16500)
+++ trunk/reactos/drivers/bus/serenum/pdo.c 2005-07-07 23:10:35 UTC
(rev 16501)
@@ -1,5 +1,4 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/pdo.c
@@ -283,11 +282,11 @@
Status = STATUS_INSUFFICIENT_RESOURCES;
else
{
- BusInfo->BusTypeGuid =
GUID_BUS_TYPE_SERENUM;
- /* FIXME: real value should be PNPBus,
but PNPBus seems to be
- * the only value in INTERFACE_TYPE enum
that doesn't work...
- */
- BusInfo->LegacyBusType = PNPISABus;
+ memcpy(
+ &BusInfo->BusTypeGuid,
+
&GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR,
+ sizeof(BusInfo->BusTypeGuid));
+ BusInfo->LegacyBusType = PNPBus;
/* We're the only serial bus enumerator
on the computer */
BusInfo->BusNumber = 0;
Information = (ULONG_PTR)BusInfo;
_____
Modified: trunk/reactos/drivers/bus/serenum/serenum.c
--- trunk/reactos/drivers/bus/serenum/serenum.c 2005-07-07 22:27:30 UTC
(rev 16500)
+++ trunk/reactos/drivers/bus/serenum/serenum.c 2005-07-07 23:10:35 UTC
(rev 16501)
@@ -1,5 +1,4 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/serenum.c
_____
Modified: trunk/reactos/drivers/bus/serenum/serenum.h
--- trunk/reactos/drivers/bus/serenum/serenum.h 2005-07-07 22:27:30 UTC
(rev 16500)
+++ trunk/reactos/drivers/bus/serenum/serenum.h 2005-07-07 23:10:35 UTC
(rev 16501)
@@ -1,47 +1,38 @@
-#if defined(__GNUC__)
- #include <ddk/ntddk.h>
- #include <ddk/ntddser.h>
- #include <ddk/wdmguid.h>
- #include <stdio.h>
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Serial enumerator driver
+ * FILE: drivers/bus/serenum/serenum.h
+ * PURPOSE: Serial enumerator driver header
+ *
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.com)
+ */
- #include <debug.h>
+#include <ntddk.h>
+#include <ntddser.h>
+#include <stdio.h>
- #define SR_MSR_DSR 0x20
-
- /* FIXME: these prototypes MUST NOT be here! */
- NTSTATUS STDCALL
- IoAttachDeviceToDeviceStackSafe(
- IN PDEVICE_OBJECT SourceDevice,
- IN PDEVICE_OBJECT TargetDevice,
- OUT PDEVICE_OBJECT *AttachedToDeviceObject);
-
+#if defined(__GNUC__)
+ #include <debug.h>
#elif defined(_MSC_VER)
- #include <ntddk.h>
- #include <ntddser.h>
- #include <c:/progra~1/winddk/inc/ddk/wdm/wxp/wdmguid.h>
- #include <stdio.h>
-
#define STDCALL
#define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
#define CHECKPOINT1 DbgPrint("(%s:%d)\n")
-
- NTSTATUS STDCALL
- IoAttachDeviceToDeviceStackSafe(
- IN PDEVICE_OBJECT SourceDevice,
- IN PDEVICE_OBJECT TargetDevice,
- OUT PDEVICE_OBJECT *AttachedToDeviceObject);
-
#define DPRINT DPRINT1
#define CHECKPOINT CHECKPOINT1
-
- #define SR_MSR_DSR 0x20
#else
#error Unknown compiler!
#endif
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) +
((D)<<24))
+/* FIXME: I don't know why it is not defined anywhere... */
+NTSTATUS STDCALL
+IoAttachDeviceToDeviceStackSafe(
+ IN PDEVICE_OBJECT SourceDevice,
+ IN PDEVICE_OBJECT TargetDevice,
+ OUT PDEVICE_OBJECT *AttachedToDeviceObject);
+
typedef enum
{
dsStopped,