00001 /* 00002 * Copyright (C) 2006 iptelorg GmbH 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 THE AUTHOR DISCLAIMS ALL WARRANTIES 00009 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 00010 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 00011 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 00012 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 00013 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 00014 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 */ 00016 00017 /* 00018 * History: 00019 * -------- 00020 * 2006-04-07 created by andrei 00021 */ 00022 00030 #ifndef _memdbg_h 00031 #define _memdbg_h 00032 00033 #include "../cfg/cfg.h" /* memdbg*/ 00034 00035 extern int memdbg; 00036 00037 #ifdef NO_DEBUG 00038 #ifdef __SUNPRO_C 00039 #define MDBG(...) 00040 #else 00041 #define MDBG(fmt, args...) 00042 #endif 00043 #else /* NO_DEBUG */ 00044 #ifdef __SUNPRO_C 00045 #define MDBG(...) LOG(cfg_get(core, core_cfg, memdbg), __VA_ARGS__) 00046 #else 00047 #define MDBG(fmt, args...) \ 00048 LOG(cfg_get(core, core_cfg, memdbg), fmt, ## args) 00049 #endif 00050 #endif /* NO_DEBUG */ 00051 00052 00053 #endif
1.7.1