setupapi: Use lowercase device paths.
[wine.git] / include / wine / debug.h
blob6aac7fe82e89e276611a374a47b4db70991c1b91
1 /*
2 * Wine debugging interface
4 * Copyright 1999 Patrik Stridvall
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_WINE_DEBUG_H
22 #define __WINE_WINE_DEBUG_H
24 #include <stdarg.h>
25 #include <stdio.h>
26 #include <windef.h>
27 #include <winbase.h>
28 #ifndef GUID_DEFINED
29 #include <guiddef.h>
30 #endif
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 struct _GUID;
39 * Internal definitions (do not use these directly)
42 enum __wine_debug_class
44 __WINE_DBCL_FIXME,
45 __WINE_DBCL_ERR,
46 __WINE_DBCL_WARN,
47 __WINE_DBCL_TRACE,
49 __WINE_DBCL_INIT = 7 /* lazy init flag */
52 struct __wine_debug_channel
54 unsigned char flags;
55 char name[15];
58 #ifndef WINE_NO_TRACE_MSGS
59 # define __WINE_GET_DEBUGGING_TRACE(dbch) ((dbch)->flags & (1 << __WINE_DBCL_TRACE))
60 #else
61 # define __WINE_GET_DEBUGGING_TRACE(dbch) 0
62 #endif
64 #ifndef WINE_NO_DEBUG_MSGS
65 # define __WINE_GET_DEBUGGING_WARN(dbch) ((dbch)->flags & (1 << __WINE_DBCL_WARN))
66 # define __WINE_GET_DEBUGGING_FIXME(dbch) ((dbch)->flags & (1 << __WINE_DBCL_FIXME))
67 #else
68 # define __WINE_GET_DEBUGGING_WARN(dbch) 0
69 # define __WINE_GET_DEBUGGING_FIXME(dbch) 0
70 #endif
72 /* define error macro regardless of what is configured */
73 #define __WINE_GET_DEBUGGING_ERR(dbch) ((dbch)->flags & (1 << __WINE_DBCL_ERR))
75 #define __WINE_GET_DEBUGGING(dbcl,dbch) __WINE_GET_DEBUGGING##dbcl(dbch)
77 #define __WINE_IS_DEBUG_ON(dbcl,dbch) \
78 (__WINE_GET_DEBUGGING##dbcl(dbch) && (__wine_dbg_get_channel_flags(dbch) & (1 << __WINE_DBCL##dbcl)))
80 #if defined(__GNUC__) || defined(__clang__)
82 #define __WINE_DPRINTF(dbcl,dbch) \
83 do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
84 struct __wine_debug_channel * const __dbch = (dbch); \
85 const enum __wine_debug_class __dbcl = __WINE_DBCL##dbcl; \
86 __WINE_DBG_LOG
88 #define __WINE_DBG_LOG(args...) \
89 wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0)
91 #if !defined(__WINE_USE_MSVCRT) || defined(__MINGW32__)
92 #define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
93 #else
94 #define __WINE_PRINTF_ATTR(fmt,args)
95 #endif
98 #ifdef WINE_NO_TRACE_MSGS
99 #define WINE_TRACE(args...) do { } while(0)
100 #define WINE_TRACE_(ch) WINE_TRACE
101 #endif
103 #ifdef WINE_NO_DEBUG_MSGS
104 #define WINE_WARN(args...) do { } while(0)
105 #define WINE_WARN_(ch) WINE_WARN
106 #define WINE_FIXME(args...) do { } while(0)
107 #define WINE_FIXME_(ch) WINE_FIXME
108 #endif
110 #elif defined(__SUNPRO_C)
112 #define __WINE_DPRINTF(dbcl,dbch) \
113 do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
114 struct __wine_debug_channel * const __dbch = (dbch); \
115 const enum __WINE_DEBUG_CLASS __dbcl = __WINE_DBCL##dbcl; \
116 __WINE_DBG_LOG
118 #define __WINE_DBG_LOG(...) \
119 wine_dbg_log( __dbcl, __dbch, __func__, __VA_ARGS__); } } while(0)
121 #define __WINE_PRINTF_ATTR(fmt,args)
123 #ifdef WINE_NO_TRACE_MSGS
124 #define WINE_TRACE(...) do { } while(0)
125 #define WINE_TRACE_(ch) WINE_TRACE
126 #endif
128 #ifdef WINE_NO_DEBUG_MSGS
129 #define WINE_WARN(...) do { } while(0)
130 #define WINE_WARN_(ch) WINE_WARN
131 #define WINE_FIXME(...) do { } while(0)
132 #define WINE_FIXME_(ch) WINE_FIXME
133 #endif
135 #else /* !__GNUC__ && !__SUNPRO_C */
137 #define __WINE_DPRINTF(dbcl,dbch) \
138 (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
139 (wine_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) ? \
140 (void)0 : (void)wine_dbg_printf
142 #define __WINE_PRINTF_ATTR(fmt, args)
144 #endif /* !__GNUC__ && !__SUNPRO_C */
146 extern int WINAPI __wine_dbg_write( const char *str, unsigned int len );
147 extern unsigned char __cdecl __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel );
148 extern const char * __cdecl __wine_dbg_strdup( const char *str );
149 extern int __cdecl __wine_dbg_output( const char *str );
150 extern int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
151 const char *function );
154 * Exported definitions and macros
157 /* These functions return a printable version of a string, including
158 quotes. The string will be valid for some time, but not indefinitely
159 as strings are re-used. */
161 #if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined(__GNUC__) && defined(__WINE_USE_MSVCRT)
162 # define __wine_dbg_cdecl __cdecl
163 # define __wine_dbg_va_list __builtin_ms_va_list
164 # define __wine_dbg_va_start(list,arg) __builtin_ms_va_start(list,arg)
165 # define __wine_dbg_va_end(list) __builtin_ms_va_end(list)
166 #else
167 # define __wine_dbg_cdecl
168 # define __wine_dbg_va_list va_list
169 # define __wine_dbg_va_start(list,arg) va_start(list,arg)
170 # define __wine_dbg_va_end(list) va_end(list)
171 #endif
173 static const char * __wine_dbg_cdecl wine_dbg_sprintf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2);
174 static inline const char * __wine_dbg_cdecl wine_dbg_sprintf( const char *format, ... )
176 char buffer[200];
177 __wine_dbg_va_list args;
179 __wine_dbg_va_start( args, format );
180 vsnprintf( buffer, sizeof(buffer), format, args );
181 __wine_dbg_va_end( args );
182 return __wine_dbg_strdup( buffer );
185 static int __wine_dbg_cdecl wine_dbg_printf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2);
186 static inline int __wine_dbg_cdecl wine_dbg_printf( const char *format, ... )
188 char buffer[1024];
189 __wine_dbg_va_list args;
191 __wine_dbg_va_start( args, format );
192 vsnprintf( buffer, sizeof(buffer), format, args );
193 __wine_dbg_va_end( args );
194 return __wine_dbg_output( buffer );
197 static int __wine_dbg_cdecl wine_dbg_log( enum __wine_debug_class cls,
198 struct __wine_debug_channel *channel, const char *func,
199 const char *format, ... ) __WINE_PRINTF_ATTR(4,5);
200 static inline int __wine_dbg_cdecl wine_dbg_log( enum __wine_debug_class cls,
201 struct __wine_debug_channel *channel,
202 const char *function, const char *format, ... )
204 char buffer[1024];
205 __wine_dbg_va_list args;
206 int ret;
208 if (*format == '\1') /* special magic to avoid standard prefix */
210 format++;
211 function = NULL;
213 if ((ret = __wine_dbg_header( cls, channel, function )) == -1) return ret;
215 __wine_dbg_va_start( args, format );
216 vsnprintf( buffer, sizeof(buffer), format, args );
217 __wine_dbg_va_end( args );
218 ret += __wine_dbg_output( buffer );
219 return ret;
222 static inline const char *wine_dbgstr_an( const char *str, int n )
224 static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
225 char buffer[300], *dst = buffer;
227 if (!str) return "(null)";
228 if (!((ULONG_PTR)str >> 16)) return wine_dbg_sprintf( "#%04x", LOWORD(str) );
229 #ifndef WINE_UNIX_LIB
230 if (IsBadStringPtrA( str, n )) return "(invalid)";
231 #endif
232 if (n == -1) for (n = 0; str[n]; n++) ;
233 *dst++ = '"';
234 while (n-- > 0 && dst <= buffer + sizeof(buffer) - 9)
236 unsigned char c = *str++;
237 switch (c)
239 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
240 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
241 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
242 case '"': *dst++ = '\\'; *dst++ = '"'; break;
243 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
244 default:
245 if (c < ' ' || c >= 127)
247 *dst++ = '\\';
248 *dst++ = 'x';
249 *dst++ = hex[(c >> 4) & 0x0f];
250 *dst++ = hex[c & 0x0f];
252 else *dst++ = c;
255 *dst++ = '"';
256 if (n > 0)
258 *dst++ = '.';
259 *dst++ = '.';
260 *dst++ = '.';
262 *dst = 0;
263 return __wine_dbg_strdup( buffer );
266 static inline const char *wine_dbgstr_wn( const WCHAR *str, int n )
268 static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
269 char buffer[300], *dst = buffer;
271 if (!str) return "(null)";
272 if (!((ULONG_PTR)str >> 16)) return wine_dbg_sprintf( "#%04x", LOWORD(str) );
273 #ifndef WINE_UNIX_LIB
274 if (IsBadStringPtrW( str, n )) return "(invalid)";
275 #endif
276 if (n == -1) for (n = 0; str[n]; n++) ;
277 *dst++ = 'L';
278 *dst++ = '"';
279 while (n-- > 0 && dst <= buffer + sizeof(buffer) - 10)
281 WCHAR c = *str++;
282 switch (c)
284 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
285 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
286 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
287 case '"': *dst++ = '\\'; *dst++ = '"'; break;
288 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
289 default:
290 if (c < ' ' || c >= 127)
292 *dst++ = '\\';
293 *dst++ = hex[(c >> 12) & 0x0f];
294 *dst++ = hex[(c >> 8) & 0x0f];
295 *dst++ = hex[(c >> 4) & 0x0f];
296 *dst++ = hex[c & 0x0f];
298 else *dst++ = (char)c;
301 *dst++ = '"';
302 if (n > 0)
304 *dst++ = '.';
305 *dst++ = '.';
306 *dst++ = '.';
308 *dst = 0;
309 return __wine_dbg_strdup( buffer );
312 static inline const char *wine_dbgstr_a( const char *s )
314 return wine_dbgstr_an( s, -1 );
317 static inline const char *wine_dbgstr_w( const WCHAR *s )
319 return wine_dbgstr_wn( s, -1 );
322 static inline const char *wine_dbgstr_guid( const GUID *id )
324 if (!id) return "(null)";
325 if (!((ULONG_PTR)id >> 16)) return wine_dbg_sprintf( "<guid-0x%04hx>", (WORD)(ULONG_PTR)id );
326 return wine_dbg_sprintf( "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
327 id->Data1, id->Data2, id->Data3,
328 id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
329 id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] );
332 static inline const char *wine_dbgstr_point( const POINT *pt )
334 if (!pt) return "(null)";
335 return wine_dbg_sprintf( "(%d,%d)", pt->x, pt->y );
338 static inline const char *wine_dbgstr_rect( const RECT *rect )
340 if (!rect) return "(null)";
341 return wine_dbg_sprintf( "(%d,%d)-(%d,%d)", rect->left, rect->top,
342 rect->right, rect->bottom );
345 static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
347 if (sizeof(ll) > sizeof(unsigned long) && ll >> 32)
348 return wine_dbg_sprintf( "%lx%08lx", (unsigned long)(ll >> 32), (unsigned long)ll );
349 else return wine_dbg_sprintf( "%lx", (unsigned long)ll );
352 #if defined(__oaidl_h__) && defined(V_VT)
354 static inline const char *wine_dbgstr_vt( VARTYPE vt )
356 static const char *const variant_types[] =
358 "VT_EMPTY","VT_NULL","VT_I2","VT_I4","VT_R4","VT_R8","VT_CY","VT_DATE",
359 "VT_BSTR","VT_DISPATCH","VT_ERROR","VT_BOOL","VT_VARIANT","VT_UNKNOWN",
360 "VT_DECIMAL","15","VT_I1","VT_UI1","VT_UI2","VT_UI4","VT_I8","VT_UI8",
361 "VT_INT","VT_UINT","VT_VOID","VT_HRESULT","VT_PTR","VT_SAFEARRAY",
362 "VT_CARRAY","VT_USERDEFINED","VT_LPSTR","VT_LPWSTR","32","33","34","35",
363 "VT_RECORD","VT_INT_PTR","VT_UINT_PTR","39","40","41","42","43","44","45",
364 "46","47","48","49","50","51","52","53","54","55","56","57","58","59","60",
365 "61","62","63","VT_FILETIME","VT_BLOB","VT_STREAM","VT_STORAGE",
366 "VT_STREAMED_OBJECT","VT_STORED_OBJECT","VT_BLOB_OBJECT","VT_CF","VT_CLSID",
367 "VT_VERSIONED_STREAM"
370 static const char *const variant_flags[16] =
373 "|VT_VECTOR",
374 "|VT_ARRAY",
375 "|VT_VECTOR|VT_ARRAY",
376 "|VT_BYREF",
377 "|VT_VECTOR|VT_BYREF",
378 "|VT_ARRAY|VT_BYREF",
379 "|VT_VECTOR|VT_ARRAY|VT_BYREF",
380 "|VT_RESERVED",
381 "|VT_VECTOR|VT_RESERVED",
382 "|VT_ARRAY|VT_RESERVED",
383 "|VT_VECTOR|VT_ARRAY|VT_RESERVED",
384 "|VT_BYREF|VT_RESERVED",
385 "|VT_VECTOR|VT_BYREF|VT_RESERVED",
386 "|VT_ARRAY|VT_BYREF|VT_RESERVED",
387 "|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED",
390 if (vt & ~VT_TYPEMASK)
391 return wine_dbg_sprintf( "%s%s", wine_dbgstr_vt(vt&VT_TYPEMASK), variant_flags[vt>>12] );
393 if (vt < sizeof(variant_types)/sizeof(*variant_types))
394 return variant_types[vt];
396 if (vt == VT_BSTR_BLOB)
397 return "VT_BSTR_BLOB";
399 return wine_dbg_sprintf( "vt(invalid %x)", vt );
402 static inline const char *wine_dbgstr_variant( const VARIANT *v )
404 if (!v)
405 return "(null)";
407 if (V_VT(v) & VT_BYREF) {
408 if (V_VT(v) == (VT_VARIANT|VT_BYREF))
409 return wine_dbg_sprintf( "%p {VT_VARIANT|VT_BYREF: %s}", v, wine_dbgstr_variant(V_VARIANTREF(v)) );
410 if (V_VT(v) == (VT_BSTR|VT_BYREF))
411 return wine_dbg_sprintf( "%p {VT_BSTR|VT_BYREF: %s}", v, V_BSTRREF(v) ? wine_dbgstr_w(*V_BSTRREF(v)) : "(none)" );
412 return wine_dbg_sprintf( "%p {%s %p}", v, wine_dbgstr_vt(V_VT(v)), V_BYREF(v) );
415 if (V_ISARRAY(v) || V_ISVECTOR(v))
416 return wine_dbg_sprintf( "%p {%s %p}", v, wine_dbgstr_vt(V_VT(v)), V_ARRAY(v) );
418 switch(V_VT(v)) {
419 case VT_EMPTY:
420 return wine_dbg_sprintf( "%p {VT_EMPTY}", v );
421 case VT_NULL:
422 return wine_dbg_sprintf( "%p {VT_NULL}", v );
423 case VT_I2:
424 return wine_dbg_sprintf( "%p {VT_I2: %d}", v, V_I2(v) );
425 case VT_I4:
426 return wine_dbg_sprintf( "%p {VT_I4: %d}", v, V_I4(v) );
427 case VT_R4:
428 return wine_dbg_sprintf( "%p {VT_R4: %f}", v, V_R4(v) );
429 case VT_R8:
430 return wine_dbg_sprintf( "%p {VT_R8: %lf}", v, V_R8(v) );
431 case VT_CY:
432 return wine_dbg_sprintf( "%p {VT_CY: %s}", v, wine_dbgstr_longlong(V_CY(v).int64) );
433 case VT_DATE:
434 return wine_dbg_sprintf( "%p {VT_DATE: %lf}", v, V_DATE(v) );
435 case VT_LPSTR:
436 return wine_dbg_sprintf( "%p {VT_LPSTR: %s}", v, wine_dbgstr_a((const char *)V_BSTR(v)) );
437 case VT_LPWSTR:
438 return wine_dbg_sprintf( "%p {VT_LPWSTR: %s}", v, wine_dbgstr_w(V_BSTR(v)) );
439 case VT_BSTR:
440 return wine_dbg_sprintf( "%p {VT_BSTR: %s}", v, wine_dbgstr_w(V_BSTR(v)) );
441 case VT_DISPATCH:
442 return wine_dbg_sprintf( "%p {VT_DISPATCH: %p}", v, V_DISPATCH(v) );
443 case VT_ERROR:
444 return wine_dbg_sprintf( "%p {VT_ERROR: %08x}", v, V_ERROR(v) );
445 case VT_BOOL:
446 return wine_dbg_sprintf( "%p {VT_BOOL: %x}", v, V_BOOL(v) );
447 case VT_UNKNOWN:
448 return wine_dbg_sprintf( "%p {VT_UNKNOWN: %p}", v, V_UNKNOWN(v) );
449 case VT_I1:
450 return wine_dbg_sprintf( "%p {VT_I1: %d}", v, V_I1(v) );
451 case VT_UI1:
452 return wine_dbg_sprintf( "%p {VT_UI1: %u}", v, V_UI1(v) );
453 case VT_UI2:
454 return wine_dbg_sprintf( "%p {VT_UI2: %d}", v, V_UI2(v) );
455 case VT_UI4:
456 return wine_dbg_sprintf( "%p {VT_UI4: %d}", v, V_UI4(v) );
457 case VT_I8:
458 return wine_dbg_sprintf( "%p {VT_I8: %s}", v, wine_dbgstr_longlong(V_I8(v)) );
459 case VT_UI8:
460 return wine_dbg_sprintf( "%p {VT_UI8: %s}", v, wine_dbgstr_longlong(V_UI8(v)) );
461 case VT_INT:
462 return wine_dbg_sprintf( "%p {VT_INT: %d}", v, V_INT(v) );
463 case VT_UINT:
464 return wine_dbg_sprintf( "%p {VT_UINT: %u}", v, V_UINT(v) );
465 case VT_VOID:
466 return wine_dbg_sprintf( "%p {VT_VOID}", v );
467 case VT_RECORD:
468 return wine_dbg_sprintf( "%p {VT_RECORD: %p %p}", v, V_RECORD(v), V_RECORDINFO(v) );
469 default:
470 return wine_dbg_sprintf( "%p {vt %s}", v, wine_dbgstr_vt(V_VT(v)) );
474 #endif /* defined(__oaidl_h__) && defined(V_VT) */
476 #ifndef WINE_TRACE
477 #define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
478 #define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch)
479 #endif
480 #define WINE_TRACE_ON(ch) __WINE_IS_DEBUG_ON(_TRACE,&__wine_dbch_##ch)
482 #ifndef WINE_WARN
483 #define WINE_WARN __WINE_DPRINTF(_WARN,__wine_dbch___default)
484 #define WINE_WARN_(ch) __WINE_DPRINTF(_WARN,&__wine_dbch_##ch)
485 #endif
486 #define WINE_WARN_ON(ch) __WINE_IS_DEBUG_ON(_WARN,&__wine_dbch_##ch)
488 #ifndef WINE_FIXME
489 #define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default)
490 #define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch)
491 #endif
492 #define WINE_FIXME_ON(ch) __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch)
494 #define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default)
495 #define WINE_ERR_(ch) __WINE_DPRINTF(_ERR,&__wine_dbch_##ch)
496 #define WINE_ERR_ON(ch) __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)
498 #define WINE_DECLARE_DEBUG_CHANNEL(ch) \
499 static struct __wine_debug_channel __wine_dbch_##ch = { 0xff, #ch }
500 #define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
501 static struct __wine_debug_channel __wine_dbch_##ch = { 0xff, #ch }; \
502 static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
504 #define WINE_MESSAGE wine_dbg_printf
506 #ifdef __WINESRC__
507 /* Wine uses shorter names that are very likely to conflict with other software */
509 static inline const char *debugstr_an( const char * s, int n ) { return wine_dbgstr_an( s, n ); }
510 static inline const char *debugstr_wn( const WCHAR *s, int n ) { return wine_dbgstr_wn( s, n ); }
511 static inline const char *debugstr_guid( const struct _GUID *id ) { return wine_dbgstr_guid(id); }
512 static inline const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); }
513 static inline const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
515 #if defined(__oaidl_h__) && defined(V_VT)
516 static inline const char *debugstr_vt( VARTYPE vt ) { return wine_dbgstr_vt( vt ); }
517 static inline const char *debugstr_variant( const VARIANT *v ) { return wine_dbgstr_variant( v ); }
518 #endif
520 #define TRACE WINE_TRACE
521 #define TRACE_(ch) WINE_TRACE_(ch)
522 #define TRACE_ON(ch) WINE_TRACE_ON(ch)
524 #define WARN WINE_WARN
525 #define WARN_(ch) WINE_WARN_(ch)
526 #define WARN_ON(ch) WINE_WARN_ON(ch)
528 #define FIXME WINE_FIXME
529 #define FIXME_(ch) WINE_FIXME_(ch)
530 #define FIXME_ON(ch) WINE_FIXME_ON(ch)
532 #undef ERR /* Solaris got an 'ERR' define in <sys/reg.h> */
533 #define ERR WINE_ERR
534 #define ERR_(ch) WINE_ERR_(ch)
535 #define ERR_ON(ch) WINE_ERR_ON(ch)
537 #define MESSAGE WINE_MESSAGE
539 #endif /* __WINESRC__ */
541 #ifdef __cplusplus
543 #endif
545 #endif /* __WINE_WINE_DEBUG_H */