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#ifndef XA_H 7#define XA_H 8 9#define XIDDATASIZE 128 10#define MAXGTRIDSIZE 64 11#define MAXBQUALSIZE 64 12 13#ifndef _XID_T_DEFINED 14#define _XID_T_DEFINED 15struct xid_t { 16 __LONG32 formatID; 17 __LONG32 gtrid_length; 18 __LONG32 bqual_length; 19 char data[XIDDATASIZE]; 20}; 21#endif 22 23typedef struct xid_t XID; 24 25#ifdef _TMPROTOTYPES 26extern int __cdecl ax_reg(int,XID *,__LONG32); 27extern int __cdecl ax_unreg(int,__LONG32); 28#else 29extern int __cdecl ax_reg(); 30extern int __cdecl ax_unreg(); 31#endif 32 33#define RMNAMESZ 32 34 35#define MAXINFOSIZE 256 36 37#ifndef _XA_SWITCH_T_DEFINED 38#define _XA_SWITCH_T_DEFINED 39struct xa_switch_t { 40 char name[RMNAMESZ]; 41 __LONG32 flags; 42 __LONG32 version; 43 int (__cdecl *xa_open_entry)(char *,int,__LONG32); 44 int (__cdecl *xa_close_entry)(char *,int,__LONG32); 45 int (__cdecl *xa_start_entry)(XID *,int,__LONG32); 46 int (__cdecl *xa_end_entry)(XID *,int,__LONG32); 47 int (__cdecl *xa_rollback_entry)(XID *,int,__LONG32); 48 int (__cdecl *xa_prepare_entry)(XID *,int,__LONG32); 49 int (__cdecl *xa_commit_entry)(XID *,int,__LONG32); 50 int (__cdecl *xa_recover_entry)(XID *,__LONG32,int,__LONG32); 51 52 int (__cdecl *xa_forget_entry)(XID *,int,__LONG32); 53 int (__cdecl *xa_complete_entry)(int *,int *,int,__LONG32); 54 55}; 56 57typedef struct xa_switch_t xa_switch_t; 58#endif 59 60#define TMNOFLAGS __MSABI_LONG(0x00000000) 61#define TMREGISTER __MSABI_LONG(0x00000001) 62#define TMNOMIGRATE __MSABI_LONG(0x00000002) 63#define TMUSEASYNC __MSABI_LONG(0x00000004) 64 65#define TMASYNC __MSABI_LONG(0x80000000) 66#define TMONEPHASE __MSABI_LONG(0x40000000) 67#define TMFAIL __MSABI_LONG(0x20000000) 68#define TMNOWAIT __MSABI_LONG(0x10000000) 69#define TMRESUME __MSABI_LONG(0x08000000) 70#define TMSUCCESS __MSABI_LONG(0x04000000) 71#define TMSUSPEND __MSABI_LONG(0x02000000) 72#define TMSTARTRSCAN __MSABI_LONG(0x01000000) 73#define TMENDRSCAN __MSABI_LONG(0x00800000) 74#define TMMULTIPLE __MSABI_LONG(0x00400000) 75#define TMJOIN __MSABI_LONG(0x00200000) 76#define TMMIGRATE __MSABI_LONG(0x00100000) 77 78#define TM_JOIN 2 79#define TM_RESUME 1 80#define TM_OK 0 81#define TMER_TMERR (-1) 82#define TMER_INVAL (-2) 83#define TMER_PROTO (-3) 84 85#define XA_RBBASE 100 86#define XA_RBROLLBACK XA_RBBASE 87#define XA_RBCOMMFAIL XA_RBBASE+1 88#define XA_RBDEADLOCK XA_RBBASE+2 89#define XA_RBINTEGRITY XA_RBBASE+3 90#define XA_RBOTHER XA_RBBASE+4 91#define XA_RBPROTO XA_RBBASE+5 92#define XA_RBTIMEOUT XA_RBBASE+6 93#define XA_RBTRANSIENT XA_RBBASE+7 94#define XA_RBEND XA_RBTRANSIENT 95 96#define XA_NOMIGRATE 9 97#define XA_HEURHAZ 8 98#define XA_HEURCOM 7 99#define XA_HEURRB 6 100#define XA_HEURMIX 5 101#define XA_RETRY 4 102#define XA_RDONLY 3 103#define XA_OK 0 104#define XAER_ASYNC (-2) 105#define XAER_RMERR (-3) 106#define XAER_NOTA (-4) 107#define XAER_INVAL (-5) 108#define XAER_PROTO (-6) 109#define XAER_RMFAIL (-7) 110#define XAER_DUPID (-8) 111#define XAER_OUTSIDE (-9) 112 113typedef int (__cdecl *XA_OPEN_EPT)(char *,int,__LONG32); 114typedef int (__cdecl *XA_CLOSE_EPT)(char *,int,__LONG32); 115typedef int (__cdecl *XA_START_EPT)(XID *,int,__LONG32); 116typedef int (__cdecl *XA_END_EPT)(XID *,int,__LONG32); 117typedef int (__cdecl *XA_ROLLBACK_EPT)(XID *,int,__LONG32); 118typedef int (__cdecl *XA_PREPARE_EPT)(XID *,int,__LONG32); 119typedef int (__cdecl *XA_COMMIT_EPT)(XID *,int,__LONG32); 120typedef int (__cdecl *XA_RECOVER_EPT)(XID *,__LONG32,int,__LONG32); 121typedef int (__cdecl *XA_FORGET_EPT)(XID *,int,__LONG32); 122typedef int (__cdecl *XA_COMPLETE_EPT)(int *,int *,int,__LONG32); 123 124#endif 125