xref: /dflybsd-src/lib/libc/resolv/res_debug.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino /*
2*86d7f5d3SJohn Marino  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
3*86d7f5d3SJohn Marino  * Copyright (c) 1999 by Internet Software Consortium.
4*86d7f5d3SJohn Marino  *
5*86d7f5d3SJohn Marino  * Permission to use, copy, modify, and distribute this software for any
6*86d7f5d3SJohn Marino  * purpose with or without fee is hereby granted, provided that the above
7*86d7f5d3SJohn Marino  * copyright notice and this permission notice appear in all copies.
8*86d7f5d3SJohn Marino  *
9*86d7f5d3SJohn Marino  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*86d7f5d3SJohn Marino  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*86d7f5d3SJohn Marino  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*86d7f5d3SJohn Marino  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*86d7f5d3SJohn Marino  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*86d7f5d3SJohn Marino  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*86d7f5d3SJohn Marino  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*86d7f5d3SJohn Marino  */
17*86d7f5d3SJohn Marino 
18*86d7f5d3SJohn Marino #ifndef _RES_DEBUG_H_
19*86d7f5d3SJohn Marino #define _RES_DEBUG_H_
20*86d7f5d3SJohn Marino 
21*86d7f5d3SJohn Marino #ifndef DEBUG
22*86d7f5d3SJohn Marino #   define Dprint(cond, args) /*empty*/
23*86d7f5d3SJohn Marino #   define DprintQ(cond, args, query, size) /*empty*/
24*86d7f5d3SJohn Marino #   define Aerror(statp, file, string, error, address) /*empty*/
25*86d7f5d3SJohn Marino #   define Perror(statp, file, string, error) /*empty*/
26*86d7f5d3SJohn Marino #else
27*86d7f5d3SJohn Marino #   define Dprint(cond, args) if (cond) {fprintf args;} else {}
28*86d7f5d3SJohn Marino #   define DprintQ(cond, args, query, size) if (cond) {\
29*86d7f5d3SJohn Marino 			fprintf args;\
30*86d7f5d3SJohn Marino 			res_pquery(statp, query, size, stdout);\
31*86d7f5d3SJohn Marino 		} else {}
32*86d7f5d3SJohn Marino #endif
33*86d7f5d3SJohn Marino 
34*86d7f5d3SJohn Marino #endif /* _RES_DEBUG_H_ */
35*86d7f5d3SJohn Marino /*! \file */
36