GPLv2 release
[centaur.git] / include / libelfu / generic.h
index 6a066348c637fe8586ad9e05ea9ba9e4f4fc8d7d..67e1bc66ba7bd572e68b55ea3ef7bfae7cd03c47 100644 (file)
@@ -1,7 +1,36 @@
+/* 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))