Author: janderwald
Date: Wed Feb 23 15:14:12 2011
New Revision: 50877
URL:
http://svn.reactos.org/svn/reactos?rev=50877&view=rev
Log:
[PORTCLS]
- Re-add the hack for gcc
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp
trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp [iso-8859-1] Wed Feb 23
15:14:12 2011
@@ -194,6 +194,8 @@
return m_MaximumBufferSize;
}
+#ifdef _MSC_VER
+
PHYSICAL_ADDRESS
NTAPI
CDmaChannelInit::PhysicalAddress()
@@ -203,6 +205,24 @@
return m_Address;
}
+#else
+
+PHYSICAL_ADDRESS
+NTAPI
+CDmaChannelInit::PhysicalAddress(
+ PPHYSICAL_ADDRESS Address)
+{
+ DPRINT("CDmaChannelInit_PhysicalAdress: this %p Virtuell %p Physical High %x Low
%x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart);
+
+ PHYSICAL_ADDRESS Result;
+
+ Address->QuadPart = m_Address.QuadPart;
+ Result.QuadPart = (PtrToUlong(Address));
+ return Result;
+}
+
+
+#endif
VOID
NTAPI
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] Wed Feb 23
15:14:12 2011
@@ -106,7 +106,7 @@
IN PDEVICE_OBJECT DeviceObject, \
IN PIRP Irp)PURE; \
\
- STDMETHOD_(NTSTATUS, Close)(THIS_ \
+ virtual NTSTATUS Close( \
IN PDEVICE_OBJECT DeviceObject, \
IN PIRP Irp)PURE; \
\
@@ -888,6 +888,8 @@
*****************************************************************************
*/
+#ifdef _MSC_VER
+
#define IMP_IDmaChannelEx \
STDMETHODIMP_(NTSTATUS) AllocateBuffer( \
IN ULONG BufferSize, \
@@ -915,6 +917,42 @@
IN PVOID Destination, \
IN PVOID Source, \
IN ULONG ByteCount)
+
+#else
+
+#define IMP_IDmaChannelEx \
+ STDMETHODIMP_(NTSTATUS) AllocateBuffer( \
+ IN ULONG BufferSize, \
+ IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); \
+ \
+ STDMETHODIMP_(void) FreeBuffer(void); \
+ STDMETHODIMP_(ULONG) TransferCount(void); \
+ STDMETHODIMP_(ULONG) MaximumBufferSize(void); \
+ STDMETHODIMP_(ULONG) AllocatedBufferSize(void); \
+ STDMETHODIMP_(ULONG) BufferSize(void); \
+ \
+ STDMETHODIMP_(void) SetBufferSize( \
+ IN ULONG BufferSize); \
+ \
+ STDMETHODIMP_(PVOID) SystemAddress(void); \
+ STDMETHODIMP_(PHYSICAL_ADDRESS) PhysicalAddress( \
+ IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); \
+ STDMETHODIMP_(PADAPTER_OBJECT) GetAdapterObject(void); \
+ \
+ STDMETHODIMP_(void) CopyTo( \
+ IN PVOID Destination, \
+ IN PVOID Source, \
+ IN ULONG ByteCount); \
+ \
+ STDMETHODIMP_(void) CopyFrom( \
+ IN PVOID Destination, \
+ IN PVOID Source, \
+ IN ULONG ByteCount)
+
+
+
+#endif
+
#define IMP_IDmaChannelSlaveEx \
IMP_IDmaChannelEx; \
@@ -933,6 +971,8 @@
STDMETHODIMP_(NTSTATUS) Init( \
IN PDEVICE_DESCRIPTION DeviceDescription, \
IN PDEVICE_OBJECT DeviceObject)
+
+#ifdef _MSC_VER
#define DEFINE_ABSTRACT_DMACHANNEL_EX() \
STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \
@@ -961,7 +1001,38 @@
IN PVOID Destination, \
IN PVOID Source, \
IN ULONG ByteCount) PURE;
-
+#else
+
+#define DEFINE_ABSTRACT_DMACHANNEL_EX() \
+ STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \
+ IN ULONG BufferSize, \
+ IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL) PURE; \
+\
+ STDMETHOD_(void, FreeBuffer)( THIS ) PURE; \
+ STDMETHOD_(ULONG, TransferCount)( THIS ) PURE; \
+ STDMETHOD_(ULONG, MaximumBufferSize)( THIS ) PURE; \
+ STDMETHOD_(ULONG, AllocatedBufferSize)( THIS ) PURE; \
+ STDMETHOD_(ULONG, BufferSize)( THIS ) PURE; \
+\
+ STDMETHOD_(void, SetBufferSize)( THIS_ \
+ IN ULONG BufferSize) PURE; \
+\
+ STDMETHOD_(PVOID, SystemAddress)( THIS ) PURE; \
+ STDMETHOD_(PHYSICAL_ADDRESS, PhysicalAddress)( THIS_ \
+ IN PPHYSICAL_ADDRESS Address) PURE; \
+ STDMETHOD_(PADAPTER_OBJECT, GetAdapterObject)( THIS ) PURE; \
+\
+ STDMETHOD_(void, CopyTo)( THIS_ \
+ IN PVOID Destination, \
+ IN PVOID Source, \
+ IN ULONG ByteCount) PURE; \
+\
+ STDMETHOD_(void, CopyFrom)( THIS_ \
+ IN PVOID Destination, \
+ IN PVOID Source, \
+ IN ULONG ByteCount) PURE;
+
+#endif
#undef INTERFACE
#define INTERFACE IDmaChannelInit