mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
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 svn path=/trunk/; revision=16501
This commit is contained in:
parent
daafc242e6
commit
74346861b0
6 changed files with 33 additions and 47 deletions
|
@ -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 @@ SerenumDetectPnpDevice(
|
|||
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 @@ SerenumDetectPnpDevice(
|
|||
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 @@ SerenumCollectPnpComDeviceId:
|
|||
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:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Serial enumerator driver
|
||||
* FILE: drivers/bus/serenum/fdo.c
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Serial enumerator driver
|
||||
* FILE: drivers/dd/serenum/misc.c
|
||||
|
|
|
@ -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 @@ SerenumPdoPnp(
|
|||
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;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Serial enumerator driver
|
||||
* FILE: drivers/bus/serenum/serenum.c
|
||||
|
|
|
@ -1,47 +1,38 @@
|
|||
/*
|
||||
* 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@reactos.com)
|
||||
*/
|
||||
|
||||
#include <ntddk.h>
|
||||
#include <ntddser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddser.h>
|
||||
#include <ddk/wdmguid.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <debug.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);
|
||||
|
||||
#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,
|
||||
|
|
Loading…
Reference in a new issue