GPLv2 release
[centaur.git] / include / libelfu / debug.h
1 /* This file is part of centaur.
2  *
3  * centaur is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License 2 as
5  * published by the Free Software Foundation.
6
7  * centaur is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11
12  * You should have received a copy of the GNU General Public License
13  * along with centaur.  If not, see <http://www.gnu.org/licenses/>.
14  */
15
16 #ifndef __LIBELFU_DEBUG_H_
17 #define __LIBELFU_DEBUG_H_
18
19 #include <stdio.h>
20
21
22 #define ELFU_DEBUG(...) do { fprintf(stdout, __VA_ARGS__); } while(0)
23
24 #define ELFU_INFO(...) do { fprintf(stdout, __VA_ARGS__); } while(0)
25
26 #define ELFU_WARN(...) do { fprintf(stderr, __VA_ARGS__); } while(0)
27
28 #define ELFU_WARNELF(function_name) ELFU_WARN(function_name "() failed: %s\n", elf_errmsg(-1))
29
30 #endif