OSDN Git Service

Apply LICENSE to all files as appropriate.
[mingw/mingw-org-wsl.git] / include / rtutils.h
1 /**
2  * @file rtutils.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 /*
25  * rtutils.h - Routing and Remote Access Services
26  *
27  * THIS SOFTWARE IS NOT COPYRIGHTED
28  *
29  * This source code is offered for use in the public domain.  You may use,
30  * modify or distribute it freely.
31  *
32  * This code is distributed in the hope that it will be useful but
33  * WITHOUT ANY WARRANTY.  ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
34  * DISCLAIMED.  This includes but is not limited to warranties of
35  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36  *
37  */
38 #ifndef _RTUTILS_H
39 #define _RTUTILS_H
40 #pragma GCC system_header
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /*--- Tracing Reference */
47 #if (_WIN32_WINNT >= 0x0500)
48 DWORD WINAPI TraceDeregisterA(DWORD);
49 DWORD WINAPI TraceDeregisterW(DWORD);
50 DWORD WINAPI TraceDeregisterExA(DWORD,DWORD);
51 DWORD WINAPI TraceDeregisterExW(DWORD,DWORD);
52 #define TRACE_NO_SYNCH 0x00000004
53 #define TraceDumpA(a,b,c,d,e,f) TraceDumpExA((a),0,(b),(c),(d),(e),(f))
54 #define TraceDumpW(a,b,c,d,e,f) TraceDumpExW((a),0,(b),(c),(d),(e),(f))
55 DWORD WINAPI TraceDumpExA(DWORD,DWORD,LPBYTE,DWORD,DWORD,BOOL,LPCSTR);
56 DWORD WINAPI TraceDumpExW(DWORD,DWORD,LPBYTE,DWORD,DWORD,BOOL,LPCWSTR);
57 DWORD WINAPI TracePrintfA(DWORD,LPCSTR,...);
58 DWORD WINAPI TracePrintfW(DWORD,LPCWSTR,...);
59 DWORD WINAPI TracePrintfExA(DWORD,DWORD,LPCSTR,...);
60 DWORD WINAPI TracePrintfExW(DWORD,DWORD,LPCWSTR,...);
61 #define TracePutsA(a,b) TracePutsExA((a),0,(b))
62 #define TracePutsW(a,b) TracePutsExW((a),0,(b))
63 DWORD WINAPI TracePutsExA(DWORD,DWORD,LPCSTR);
64 DWORD WINAPI TracePutsExW(DWORD,DWORD,LPCWSTR);
65 #define TraceRegisterA(a) TraceRegisterExA((a),0)
66 #define TraceRegisterW(a) TraceRegisterExW((a),0)
67 DWORD WINAPI TraceRegisterExA(LPCSTR,DWORD);
68 DWORD WINAPI TraceRegisterExW(LPCWSTR,DWORD);
69 #define TRACE_USE_FILE 0x00000001
70 #define TRACE_USE_CONSOLE 0x00000002
71 #define INVALID_TRACEID 0xFFFFFFFF
72 #define TraceVprintfA(a,b,c) TraceVprintfExA((a),0,(b),(c))
73 #define TraceVprintfW(a,b,c) TraceVprintfExW((a),0,(b),(c))
74 DWORD WINAPI TraceVprintfExA(DWORD,DWORD,LPCSTR,va_list);
75 DWORD WINAPI TraceVprintfExW(DWORD,DWORD,LPCWSTR,va_list);
76 #define TRACE_NO_STDINFO 0x00000001
77 #define TRACE_USE_MASK 0x00000002
78 #define TRACE_USE_MSEC 0x00000004
79 #ifdef UNICODE
80 #define TraceDeregister TraceDeregisterW
81 #define TraceDeregisterEx TraceDeregisterExW
82 #define TraceDump TraceDumpW
83 #define TraceDumpEx TraceDumpExW
84 #define TracePrintf TracePrintfW
85 #define TracePrintfEx TracePrintfExW
86 #define TracePuts TracePutsW
87 #define TracePutsEx TracePutsExW
88 #define TraceRegister TraceRegisterW
89 #define TraceRegisterEx TraceRegisterExW
90 #define TraceVprintf TraceVprintfW
91 #define TraceVprintfEx TraceVprintfExW
92 #else
93 #define TraceDeregister TraceDeregisterA
94 #define TraceDeregisterEx TraceDeregisterExA
95 #define TraceDump TraceDumpA
96 #define TraceDumpEx TraceDumpExA
97 #define TracePrintf TracePrintfA
98 #define TracePrintfEx TracePrintfExA
99 #define TracePuts TracePutsA
100 #define TracePutsEx TracePutsExA
101 #define TraceRegister TraceRegisterA
102 #define TraceRegisterEx TraceRegisterExA
103 #define TraceVprintf TraceVprintfA
104 #define TraceVprintfEx TraceVprintfExA
105 #endif
106 #endif /* (_WIN32_WINNT >= 0x0500) */
107
108 #ifdef __cplusplus
109 }
110 #endif
111 #endif