Artifact 03fdad9b5bd4d6abd386b3f1caadaf1a415dd0e0:
- File
src/win32/rpc.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /*************** 0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0d 0a 2a 20 20 20 20 ********\..* 0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0060: 20 20 20 20 20 20 20 20 20 20 20 20 20 72 70 63 rpc 0070: 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .d 0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0090: 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 20 *..* 00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d *. 00e0: 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .* 00f0: 20 20 20 20 20 20 20 20 20 57 69 6e 64 6f 77 73 Windows 0100: 20 41 50 49 20 68 65 61 64 65 72 20 6d 6f 64 75 API header modu 0110: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le 0120: 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 20 *..* 0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0170: 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 *..* 0180: 20 20 20 20 20 20 20 20 20 54 72 61 6e 73 6c 61 Transla 0190: 74 65 64 20 66 72 6f 6d 20 4d 69 6e 47 57 20 57 ted from MinGW W 01a0: 69 6e 64 6f 77 73 20 68 65 61 64 65 72 73 20 20 indows headers 01b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a * 01c0: 0d 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..* 01d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 01e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0200: 20 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 *..* 0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0220: 20 20 20 20 20 50 6c 61 63 65 64 20 69 6e 74 6f Placed into 0230: 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 6e 20 20 public domain 0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0250: 20 20 20 20 20 2a 0d 0a 5c 2a 2a 2a 2a 2a 2a 2a *..\******* 0260: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0270: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0280: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0290: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 02a0: 2f 0d 0a 6d 6f 64 75 6c 65 20 77 69 6e 33 32 2e /..module win32. 02b0: 72 70 63 3b 0d 0a 0d 0a 2f 2a 20 4d 6f 76 65 64 rpc;..../* Moved 02c0: 20 74 6f 20 72 70 63 64 65 63 70 20 28 64 75 70 to rpcdecp (dup 02d0: 6c 69 63 61 74 65 20 64 65 66 69 6e 69 74 69 6f licate definitio 02e0: 6e 29 2e 0d 0a 09 74 79 70 65 64 65 66 20 76 6f n)....typedef vo 02f0: 69 64 20 2a 49 5f 52 50 43 5f 48 41 4e 44 4c 45 id *I_RPC_HANDLE 0300: 3b 0d 0a 09 61 6c 69 61 73 20 6c 6f 6e 67 20 52 ;...alias long R 0310: 50 43 5f 53 54 41 54 55 53 3b 0d 0a 09 2f 2f 20 PC_STATUS;...// 0320: 4d 6f 76 65 64 20 74 6f 20 72 70 63 64 63 65 3a Moved to rpcdce: 0330: 0d 0a 09 52 70 63 49 6d 70 65 72 73 6f 6e 61 74 ...RpcImpersonat 0340: 65 43 6c 69 65 6e 74 0d 0a 09 52 70 63 52 65 76 eClient...RpcRev 0350: 65 72 74 54 6f 53 65 6c 66 0d 0a 2a 2f 0d 0a 0d ertToSelf..*/... 0360: 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 .public import w 0370: 69 6e 33 32 2e 75 6e 6b 6e 77 6e 3b 0d 0a 70 75 in32.unknwn;..pu 0380: 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 blic import win3 0390: 32 2e 72 70 63 64 63 65 3b 20 20 2f 2f 20 61 6c 2.rpcdce; // al 03a0: 73 6f 20 70 75 6c 6c 73 20 69 6e 20 72 70 63 64 so pulls in rpcd 03b0: 63 65 70 0d 0a 70 75 62 6c 69 63 20 69 6d 70 6f cep..public impo 03c0: 72 74 20 77 69 6e 33 32 2e 72 70 63 6e 73 69 3b rt win32.rpcnsi; 03d0: 0d 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 ..public import 03e0: 77 69 6e 33 32 2e 72 70 63 6e 74 65 72 72 3b 0d win32.rpcnterr;. 03f0: 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 .public import w 0400: 69 6e 33 32 2e 77 69 6e 65 72 72 6f 72 3b 0d 0a in32.winerror;.. 0410: 0d 0a 61 6c 69 61 73 20 4d 49 44 4c 5f 75 73 65 ..alias MIDL_use 0420: 72 5f 61 6c 6c 6f 63 61 74 65 20 6d 69 64 6c 5f r_allocate midl_ 0430: 75 73 65 72 5f 61 6c 6c 6f 63 61 74 65 3b 0d 0a user_allocate;.. 0440: 61 6c 69 61 73 20 4d 49 44 4c 5f 75 73 65 72 5f alias MIDL_user_ 0450: 66 72 65 65 20 6d 69 64 6c 5f 75 73 65 72 5f 66 free midl_user_f 0460: 72 65 65 3b 0d 0a 0d 0a 65 78 74 65 72 6e 20 28 ree;....extern ( 0470: 57 69 6e 64 6f 77 73 29 20 7b 0d 0a 09 69 6e 74 Windows) {...int 0480: 20 49 5f 52 70 63 4d 61 70 57 69 6e 33 32 53 74 I_RpcMapWin32St 0490: 61 74 75 73 28 52 50 43 5f 53 54 41 54 55 53 29 atus(RPC_STATUS) 04a0: 3b 0d 0a 7d 0d 0a ;..}..