xref: /titanic_50/usr/src/lib/libast/amd64/include/ast/debug.h (revision 3eae19d9cf3390cf5b75e10c9c1945fd36ad856a)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *           Copyright (c) 1985-2007 AT&T Knowledge Ventures            *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                      by AT&T Knowledge Ventures                      *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * common ast debug definitions
27  * include after the ast headers
28  */
29 
30 #ifndef _DEBUG_H
31 #if !defined(__PROTO__)
32 #include <prototyped.h>
33 #endif
34 #if !defined(__LINKAGE__)
35 #define __LINKAGE__		/* 2004-08-11 transition */
36 #endif
37 
38 #define _DEBUG_H
39 
40 #include <ast.h>
41 #include <error.h>
42 
43 #if DEBUG || _BLD_DEBUG
44 #define debug(x)	x
45 #define message(x)	do if (error_info.trace < 0) { error x; } while (0)
46 #define messagef(x)	do if (error_info.trace < 0) { errorf x; } while (0)
47 #else
48 #define debug(x)
49 #define message(x)
50 #define messagef(x)
51 #endif
52 
53 #if _BLD_ast && defined(__EXPORT__)
54 #undef __MANGLE__
55 #define __MANGLE__ __LINKAGE__		__EXPORT__
56 #endif
57 
58 extern __MANGLE__ void		systrace __PROTO__((const char*));
59 
60 #undef __MANGLE__
61 #define __MANGLE__ __LINKAGE__
62 
63 #endif
64