1 /* This file is part of centaur.
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.
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.
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/>.
16 #ifndef __LIBELFU_DEBUG_H_
17 #define __LIBELFU_DEBUG_H_
22 #define ELFU_DEBUG(...) do { fprintf(stdout, __VA_ARGS__); } while(0)
24 #define ELFU_INFO(...) do { fprintf(stdout, __VA_ARGS__); } while(0)
26 #define ELFU_WARN(...) do { fprintf(stderr, __VA_ARGS__); } while(0)
28 #define ELFU_WARNELF(function_name) ELFU_WARN(function_name "() failed: %s\n", elf_errmsg(-1))