- Get rid off STATIC, DECL_IMPORT and DECL_EXPORT

- Fix FIELD_OFFSET

svn path=/trunk/; revision=38074
This commit is contained in:
Stefan Ginsberg 2008-12-14 10:02:46 +00:00
parent 0cb750adfa
commit afa4c210b2
3 changed files with 6 additions and 20 deletions

View file

@ -60,14 +60,6 @@ typedef unsigned long POINTER_64; // FIXME! HACK!!!
#define CONST const
#endif
//
// FIXME: Non standard, should be deprecated
//
#ifndef STATIC
#define STATIC static
#endif
//
// TRUE/FALSE
//
@ -164,7 +156,7 @@ typedef unsigned long POINTER_64; // FIXME! HACK!!!
//
#ifndef FIELD_OFFSET
#define FIELD_OFFSET(Type, Field) \
((LONG_PTR) (&(((Type *) 0)->Field)))
((LONG)(LONG_PTR) (&(((Type *) 0)->Field)))
#endif
//
@ -193,14 +185,8 @@ typedef unsigned long POINTER_64; // FIXME! HACK!!!
//
// Import and Export Specifiers
//
#ifndef DECL_IMPORT
#define DECL_IMPORT DECLSPEC_IMPORT //FIXME: DECL_IMPORT -> DECLSPEC_IMPORT
#endif
#ifndef DECL_EXPORT
#define DECL_EXPORT DECLSPEC_EXPORT //FIXME: DECL_EXPORT -> DECLSPEC_EXPORT
#endif
// Done the same way as in windef.h (for now *cough*)
// Done the same way as in windef.h for now
#define DECLSPEC_IMPORT __declspec(dllimport)
#define DECLSPEC_EXPORT __declspec(dllexport)
#define DECLSPEC_NORETURN __declspec(noreturn)

View file

@ -34,8 +34,8 @@
extern "C" {
#endif
#ifndef DECL_IMPORT
#define DECL_IMPORT __attribute__((dllimport))
#ifndef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT __attribute__((dllimport))
#endif
#ifndef WIN32KAPI

View file

@ -3122,10 +3122,10 @@ typedef struct {
} HAL_DISPATCH, *PHAL_DISPATCH;
#if defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTHAL_)
extern DECL_IMPORT PHAL_DISPATCH HalDispatchTable;
extern DECLSPEC_IMPORT PHAL_DISPATCH HalDispatchTable;
#define HALDISPATCH ((PHAL_DISPATCH)&HalDispatchTable)
#else
extern DECL_EXPORT HAL_DISPATCH HalDispatchTable;
extern DECLSPEC_EXPORT HAL_DISPATCH HalDispatchTable;
#define HALDISPATCH (&HalDispatchTable)
#endif