Author: greatlrd
Date: Fri Jun 29 18:47:04 2007
New Revision: 27324
URL:
http://svn.reactos.org/svn/reactos?rev=27324&view=rev
Log:
cleaning up ddk header file, I am aming for ddk2003sp1 3790.1830 compatible
fixing the comping issue, not tetsed whole way, but fixing smaller fualt in rpc.h
it works now. and it is compatible with mac, ppc, win64 and win32 :)
Modified:
branches/ddk2003/include/ddk2003/cderr.h
branches/ddk2003/include/ddk2003/readme.txt
branches/ddk2003/include/ddk2003/rpc.h
branches/ddk2003/include/ddk2003/warning.h
Modified: branches/ddk2003/include/ddk2003/cderr.h
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/cderr.h…
==============================================================================
--- branches/ddk2003/include/ddk2003/cderr.h (original)
+++ branches/ddk2003/include/ddk2003/cderr.h Fri Jun 29 18:47:04 2007
@@ -42,5 +42,8 @@
#define FNERR_INVALIDFILENAME 0x3002
#define FNERR_SUBCLASSFAILURE 0x3001
+/* for Windows 2000/XP/ReactOS this is not in windows 2003 ddk */
+#define FNERR_BUFFERTOOSMALL 0x3003
+
#endif
Modified: branches/ddk2003/include/ddk2003/readme.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/readme.…
==============================================================================
--- branches/ddk2003/include/ddk2003/readme.txt (original)
+++ branches/ddk2003/include/ddk2003/readme.txt Fri Jun 29 18:47:04 2007
@@ -11,3 +11,16 @@
add ros hack to upssvc.h so it works again
+
+
+------------------------------------------------------------
+cderr.h
+Contain one change that does not exists in windows 2003sp1
+But it does exists in ddk for windows 2000/XP,
+Regedit need it, it is FNERR_BUFFERTOOSMALL
+
+warning.h / rpc.h
+Contain one change, we do not use ms seh
+so we need disable the keywords for now
+until gcc support it
+
Modified: branches/ddk2003/include/ddk2003/rpc.h
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/rpc.h?r…
==============================================================================
--- branches/ddk2003/include/ddk2003/rpc.h (original)
+++ branches/ddk2003/include/ddk2003/rpc.h Fri Jun 29 18:47:04 2007
@@ -1,8 +1,8 @@
-
#if !defined( RPC_NO_WINDOWS_H ) && !defined( MAC ) && !defined( _MAC )
#include <windows.h>
#endif
+
#ifndef __RPC_H__
#define __RPC_H__
@@ -11,26 +11,25 @@
#pragma once
#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-
-#if defined( MAC ) || defined( _MAC )
-
+#if defined( MAC ) || defined( _MAC ) || defined(__powerpc__)
#define __RPC_MAC__
+ #define __RPC_WIN32__
#include <pshpack2.h>
#else
-
- #include <basetsd.h>
-
- #if defined(_M_IA64) || defined(_M_AMD64)
+ #if defined(_M_IA64) || defined(_M_AMD64) || defined(_WIN64)
#define __RPC_WIN64__
#else
#define __RPC_WIN32__
#endif
#endif
+
+#include <basetsd.h>
#if defined(__RPC_WIN64__)
#include <pshpack8.h>
@@ -42,14 +41,17 @@
#define __MIDL_USER_DEFINED
#endif
+
typedef void * I_RPC_HANDLE;
typedef long RPC_STATUS;
+#define __RPC_FAR
#if defined(__RPC_WIN32__) || defined(__RPC_WIN64__)
#define RPC_UNICODE_SUPPORTED
#endif
-#if !defined(__RPC_MAC__) && ( (_MSC_VER >= 800) ||
defined(_STDCALL_SUPPORTED) )
+
+#if !defined(__RPC_MAC__)
#define __RPC_API __stdcall
#define __RPC_USER __stdcall
#define __RPC_STUB __stdcall
@@ -61,51 +63,48 @@
#define RPC_ENTRY
#endif
-#define __RPC_FAR
+#if !defined(DECLSPEC_IMPORT)
+ #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64))
&& !defined(MIDL_PASS)
+ #define DECLSPEC_IMPORT __declspec(dllimport)
+ #else
+ #define DECLSPEC_IMPORT
+ #endif
+#endif
-
-#if !defined(DECLSPEC_IMPORT)
-#if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64))
&& !defined(MIDL_PASS)
- #define DECLSPEC_IMPORT __declspec(dllimport)
-#else
- #define DECLSPEC_IMPORT
-#endif
+#if !defined(DECLSPEC_EXPORT)
+ #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64))
&& !defined(MIDL_PASS)
+ #define DECLSPEC_EXPORT __declspec(dllexport)
+ #else
+ #define DECLSPEC_EXPORT
+ #endif
#endif
#if !defined(_RPCRT4_)
#define RPCRTAPI DECLSPEC_IMPORT
#else
- #define RPCRTAPI
+ #define RPCRTAPI DECLSPEC_EXPORT
#endif
#if !defined(_RPCNS4_)
#define RPCNSAPI DECLSPEC_IMPORT
#else
- #define RPCNSAPI
+ #define RPCNSAPI DECLSPEC_EXPORT
#endif
+
#ifdef __RPC_MAC__
-
#include <setjmp.h>
-
#define RPCXCWORD (sizeof(jmp_buf)/sizeof(int))
- #if _MSC_VER >= 1200
- #pragma warning(push)
- #endif
-
+ #pragma warning(push)
#pragma warning( disable: 4005 )
#include <rpcdce.h>
#include <rpcnsi.h>
#include <rpcerr.h>
#include <rpcmac.h>
- #if _MSC_VER >= 1200
- #pragma warning(pop)
- #else
- #pragma warning( default : 4005 )
- #endif
+ #pragma warning(pop)
- typedef void (RPC_ENTRY *MACYIELDCALLBACK)(/*OSErr*/ short *) ;
+ typedef void (RPC_ENTRY *MACYIELDCALLBACK)(short *) ;
RPC_STATUS RPC_ENTRY
RpcMacSetYieldInfo(MACYIELDCALLBACK pfnCallback) ;
@@ -114,27 +113,34 @@
#endif
#include <poppack.h>
-#else
+#else
#include <rpcdce.h>
- #include <rpcnsi.h>
+ /* #include <rpcnsi.h> */
#include <rpcnterr.h>
#include <excpt.h>
#include <winerror.h>
- #define RpcTryExcept __try {
- #define RpcExcept(expr) } __except (expr) {
- #define RpcEndExcept }
- #define RpcTryFinally __try {
- #define RpcFinally } __finally {
- #define RpcEndFinally }
+ #ifndef __GNUC__
+ #define RpcTryExcept __try {
+ #define RpcExcept(expr) } __except (expr) {
+ #define RpcEndExcept }
+ #define RpcTryFinally __try {
+ #define RpcFinally } __finally {
+ #define RpcEndFinally }
+ #define RpcExceptionCode() GetExceptionCode()
+ #define RpcAbnormalTermination() AbnormalTermination()
+ #else
+ /* FIXME ReactOS SEH support, we need remove this when gcc support native seh */
- #define RpcExceptionCode() GetExceptionCode()
- #define RpcAbnormalTermination() AbnormalTermination()
-#endif
-
-
-#if !defined( RPC_NO_WINDOWS_H ) && !defined(__RPC_MAC__)
- #include <rpcasync.h>
+ #define RpcTryExcept if (1) {
+ #define RpcExcept(expr) } else {
+ #define RpcEndExcept }
+ #define RpcTryFinally
+ #define RpcFinally
+ #define RpcEndFinally
+ #define RpcExceptionCode() 0
+ /* #define RpcAbnormalTermination() abort() */
+ #endif
#endif
#if defined(__RPC_WIN64__)
@@ -147,4 +153,3 @@
#endif
-
Modified: branches/ddk2003/include/ddk2003/warning.h
URL:
http://svn.reactos.org/svn/reactos/branches/ddk2003/include/ddk2003/warning…
==============================================================================
--- branches/ddk2003/include/ddk2003/warning.h (original)
+++ branches/ddk2003/include/ddk2003/warning.h Fri Jun 29 18:47:04 2007
@@ -53,16 +53,19 @@
#endif
-
-#ifndef __cplusplus
- #undef try
- #undef except
- #undef finally
- #undef leave
- #define try __try
- #define except __except
- #define finally __finally
- #define leave __leave
+#ifndef __GNUC__
+ #ifndef __cplusplus
+ #undef try
+ #undef except
+ #undef finally
+ #undef leave
+ #define try __try
+ #define except __except
+ #define finally __finally
+ #define leave __leave
+ #endif
+#else
+ /* FIXME when gcc support ms seh remove #ifndef __REACTOS__ */
#endif
#if _MSC_VER <= 1400