+/* This file is part of centaur.
+ *
+ * centaur is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License 2 as
+ * published by the Free Software Foundation.
+
+ * centaur is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with centaur. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef __LIBELFU_GENERIC_H__
#define __LIBELFU_GENERIC_H__
-#include <libelf/gelf.h>
+#include <gelf.h>
+
+
+#ifndef MIN
+ #define MIN(x, y) ((x) < (y) ? (x) : (y))
+#endif
+
+#ifndef MAX
+ #define MAX(x, y) ((x) > (y) ? (x) : (y))
+#endif
+
+#ifndef ROUNDUP
+ #define ROUNDUP(x, align) ((x) + ((align) - ((x) % (align))) % (align))
+#endif
+
#define OFFS_END(off, sz) ((off) + (sz))