xref: /netbsd-src/lib/libc/resolv/res_debug.h (revision c5e820cae412164fcbee52f470436200af5358ea)
1*c5e820caSchristos /*	$NetBSD: res_debug.h,v 1.2 2012/03/13 21:13:43 christos Exp $	*/
22b237084Schristos 
32b237084Schristos /*
42b237084Schristos  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
52b237084Schristos  * Copyright (c) 1999 by Internet Software Consortium.
62b237084Schristos  *
72b237084Schristos  * Permission to use, copy, modify, and distribute this software for any
82b237084Schristos  * purpose with or without fee is hereby granted, provided that the above
92b237084Schristos  * copyright notice and this permission notice appear in all copies.
102b237084Schristos  *
112b237084Schristos  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
122b237084Schristos  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
132b237084Schristos  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
142b237084Schristos  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
152b237084Schristos  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
162b237084Schristos  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
172b237084Schristos  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
182b237084Schristos  */
192b237084Schristos 
202b237084Schristos #ifndef _RES_DEBUG_H_
212b237084Schristos #define _RES_DEBUG_H_
222b237084Schristos 
232b237084Schristos #ifndef DEBUG
242b237084Schristos #   define Dprint(cond, args) /*empty*/
252b237084Schristos #   define DprintQ(cond, args, query, size) /*empty*/
262b237084Schristos #   define Aerror(statp, file, string, error, address) /*empty*/
272b237084Schristos #   define Perror(statp, file, string, error) /*empty*/
282b237084Schristos #else
292b237084Schristos #   define Dprint(cond, args) if (cond) {fprintf args;} else {}
302b237084Schristos #   define DprintQ(cond, args, query, size) if (cond) {\
312b237084Schristos 			fprintf args;\
32*c5e820caSchristos 			res_pquery(statp, (query), (int)(size), stdout);\
332b237084Schristos 		} else {}
342b237084Schristos #endif
352b237084Schristos 
362b237084Schristos #endif /* _RES_DEBUG_H_ */
378e42b6c9Schristos /*! \file */
38