Back to index

glibc  2.9
res_debug.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999 by Internet Software Consortium.
00003  *
00004  * Permission to use, copy, modify, and distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
00009  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
00010  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
00011  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
00012  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
00013  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
00014  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00015  * SOFTWARE.
00016  */
00017 
00018 #ifndef _RES_DEBUG_H_
00019 #define _RES_DEBUG_H_
00020 
00021 #ifndef DEBUG
00022 #   define Dprint(cond, args) /*empty*/
00023 #   define DprintQ(cond, args, query, size) /*empty*/
00024 #   define Aerror(statp, file, string, error, address) /*empty*/
00025 #   define Perror(statp, file, string, error) /*empty*/
00026 #else
00027 #   define Dprint(cond, args) if (cond) {fprintf args;} else {}
00028 #   define DprintQ(cond, args, query, size) if (cond) {\
00029                      fprintf args;\
00030                      res_pquery(statp, query, size, stdout);\
00031               } else {}
00032 #endif
00033 
00034 #endif /* _RES_DEBUG_H_ */