Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 
      7 /* Make sure we have internals defined.  */
      8 #include <_mingw.h>
      9 
     10 #ifndef __OBJC__
     11 #undef interface
     12 #define interface struct
     13 #endif
     14 
     15 #ifndef RPC_NO_WINDOWS_H
     16 #include <windows.h>
     17 #endif
     18 
     19 #ifndef __RPC_H__
     20 #define __RPC_H__
     21 
     22 #ifdef __cplusplus
     23 extern "C" {
     24 #endif
     25 
     26 #include <basetsd.h>
     27 
     28 #if defined(__ia64__) || defined(__x86_64)
     29 #define __RPC_WIN64__
     30 #else
     31 #if !defined (_ARM_)
     32 #define __RPC_WIN32__
     33 #else
     34 #define __RPC_ARM32__
     35 #endif
     36 #endif
     37 
     38 #ifdef __RPC_WIN64__
     39 #include <pshpack8.h>
     40 #endif
     41 
     42 #ifndef __MIDL_USER_DEFINED
     43 #define __MIDL_USER_DEFINED
     44 #define midl_user_allocate MIDL_user_allocate
     45 #define midl_user_free MIDL_user_free
     46 #endif
     47 
     48   typedef void *I_RPC_HANDLE;
     49   typedef __LONG32 RPC_STATUS;
     50 
     51 #define RPC_UNICODE_SUPPORTED
     52 #define __RPC_FAR
     53 #define __RPC_API __stdcall
     54 #define __RPC_USER __RPC_API
     55 #define __RPC_STUB __RPC_API
     56 #define RPC_ENTRY __RPC_API
     57 
     58 #ifndef DECLSPEC_IMPORT
     59 #define DECLSPEC_IMPORT __declspec(dllimport)
     60 #endif
     61 
     62 #ifndef _RPCRT4_
     63 #define RPCRTAPI DECLSPEC_IMPORT
     64 #else
     65 #define RPCRTAPI
     66 #endif
     67 
     68 #ifndef _RPCNS4_
     69 #define RPCNSAPI DECLSPEC_IMPORT
     70 #else
     71 #define RPCNSAPI
     72 #endif
     73 
     74 #include <rpcdce.h>
     75 #ifndef _KRPCENV_
     76 #include <rpcnsi.h>
     77 #endif
     78 #include <rpcnterr.h>
     79 #include <excpt.h>
     80 #include <winerror.h>
     81 
     82 /* TODO:  This isn't actual working on gcc.  Either we need to implement
     83    their __try/__except/__finally feature, or we need to do at least for x64
     84    emulation-code via inline-assembler ...  */
     85 #define RpcTryExcept __try {
     86 #define RpcExcept(expr) } __except(expr) {
     87 #define RpcEndExcept }
     88 #define RpcTryFinally __try {
     89 #define RpcFinally } __finally {
     90 #define RpcEndFinally }
     91 
     92 #define RpcExceptionCode() GetExceptionCode()
     93 #define RpcAbnormalTermination() AbnormalTermination()
     94 
     95 #ifndef RPC_NO_WINDOWS_H
     96 #include <rpcasync.h>
     97 #endif
     98 
     99 #ifdef __RPC_WIN64__
    100 #include <poppack.h>
    101 #endif
    102 
    103 #ifdef __cplusplus
    104 }
    105 #endif
    106 #endif
    107