[DDK/XDK/NTOSKRNL/DRIVERS]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 11 May 2014 23:11:16 +0000 (23:11 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 11 May 2014 23:11:16 +0000 (23:11 +0000)
commitdf0efd555671aaf4db36b785697267a865567f1f
treee0a67371d9eb40be6d51b847d7780e60fc516692
parentbbfd5abfca392eb0477d8060d32afb8054202dc2
[DDK/XDK/NTOSKRNL/DRIVERS]
Fix incompatible definition of a number of NTOSKRNL data imports. These imports are declared in MS DDK in a way that is usually not how you would declare data imports. The proper way of doing it is using _DECLSPEC_INTRIN_TYPE(dllimport) or in this case NTKERNELAPI, which will cause the compiler to directly dereference the __imp__FooBar symbol. MS has declared some of these variables directly as pointers without using dllimport. This works with MS DDK, since it's import libraries contain aliases (like _FooBar) to the import symbols (__imp__FooBar). Neither MS LINK nor DLLTOOL create these aliases in the import libs, which is good, since hacks like these are dangerous. To make the original declarations work without using macros (which can conflict with other things, like for example the KdDebuggerEnabled member in KUSER_SHARED_DATA) these aliases have to be generated differently. Luckily both MSVC and GCC support a pragma that does exactly this. Fix the incompatible use in our drivers and the broen(!) use of KdDebuggerEnabled in kdcom (which was writing a PBOOLEAN value (FALSE == 0 == NULL, so no warning) into the location that is really a BOOLEAN, possibly overwriting other data. Finally get rid of a number of hacks in ntoskrnl, where prefixed versions were used to not conflict with the DDK definitions.

svn path=/trunk/; revision=63247
51 files changed:
reactos/drivers/base/kdcom/kdserial.c
reactos/drivers/bus/acpi/compbatt/compmisc.c
reactos/drivers/filters/mountmgr/device.c
reactos/drivers/ksfilter/ks/event.c
reactos/drivers/ksfilter/ks/pin.c
reactos/drivers/network/afd/afd/bind.c
reactos/drivers/network/afd/afd/select.c
reactos/drivers/network/afd/afd/tdi.c
reactos/drivers/network/tcpip/tcpip/dispatch.c
reactos/drivers/storage/floppy/floppy.c
reactos/drivers/wdm/audio/legacy/wdmaud/control.c
reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c
reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c
reactos/drivers/wdm/audio/legacy/wdmaud/sup.c
reactos/drivers/wdm/audio/sysaudio/deviface.c
reactos/drivers/wdm/audio/sysaudio/pin.c
reactos/include/ddk/ntddk.h
reactos/include/ddk/ntifs.h
reactos/include/ddk/wdm.h
reactos/include/reactos/libs/pseh/pseh3.h
reactos/include/xdk/ccfuncs.h
reactos/include/xdk/extypes.h
reactos/include/xdk/fsrtlfuncs.h
reactos/include/xdk/haltypes.h
reactos/include/xdk/ia64/ke.h
reactos/include/xdk/iotypes.h
reactos/include/xdk/kdfuncs.h
reactos/include/xdk/ketypes.h
reactos/include/xdk/mmtypes.h
reactos/include/xdk/ntifs.template.h
reactos/include/xdk/obtypes.h
reactos/include/xdk/rtltypes.h
reactos/include/xdk/sefuncs.h
reactos/include/xdk/wdm.template.h
reactos/lib/rtl/nls.c
reactos/ntoskrnl/ex/event.c
reactos/ntoskrnl/ex/sem.c
reactos/ntoskrnl/fsrtl/fsrtlpc.c
reactos/ntoskrnl/include/internal/fsrtl.h
reactos/ntoskrnl/include/internal/kd.h
reactos/ntoskrnl/include/internal/kd64.h
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/kd64/kdapi.c
reactos/ntoskrnl/kd64/kddata.c
reactos/ntoskrnl/kd64/kdinit.c
reactos/ntoskrnl/ntoskrnl.spec
reactos/tools/spec2def/spec2def.c
reactos/win32ss/gdi/eng/engevent.c
reactos/win32ss/user/ntuser/main.c
reactos/win32ss/user/ntuser/message.c
reactos/win32ss/user/ntuser/misc.c