aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-09 05:53:40 -0400
committerMike Frysinger <vapier@gentoo.org>2009-03-09 05:53:40 -0400
commit7fa9c03083e90cdb8476ff3dc8154572d71aa852 (patch)
tree6dc4b55c5c123fede5d55459ef36c54c26bee2b1
parenttests: do not sscanf("%i", mode_t) (diff)
downloadsandbox-7fa9c03083e90cdb8476ff3dc8154572d71aa852.tar.gz
sandbox-7fa9c03083e90cdb8476ff3dc8154572d71aa852.tar.bz2
sandbox-7fa9c03083e90cdb8476ff3dc8154572d71aa852.zip
bump common macros up to localdecls.h so tests can use them
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--libsbutil/sbutil.h13
-rw-r--r--localdecls.h13
2 files changed, 13 insertions, 13 deletions
diff --git a/libsbutil/sbutil.h b/libsbutil/sbutil.h
index 3e2d1bf..7a0db55 100644
--- a/libsbutil/sbutil.h
+++ b/libsbutil/sbutil.h
@@ -16,19 +16,6 @@
#include "headers.h"
#include "include/rcscripts/rcutil.h"
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
-#endif
-#ifndef MAX
-#define MAX(x, y) ((x) < (y) ? (y) : (x))
-#endif
-#ifndef MIN
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-#endif
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
#define SANDBOX_CONF_FILE ETCDIR "/sandbox.conf"
#define SANDBOX_CONFD_DIR ETCDIR "/sandbox.d"
diff --git a/localdecls.h b/localdecls.h
index 2567ccd..595a5ac 100644
--- a/localdecls.h
+++ b/localdecls.h
@@ -63,6 +63,19 @@ typedef __sighandler_t sighandler_t;
# endif
#endif
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
+#endif
+#ifndef MAX
+#define MAX(x, y) ((x) < (y) ? (y) : (x))
+#endif
+#ifndef MIN
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
+#endif
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
/* If the system is old and does not support *at funcs, then define
* it ourself. Shouldn't matter based on how we use it.
*/