aboutsummaryrefslogtreecommitdiff
path: root/toys.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-12-04 21:29:51 -0600
committerRob Landley <rob@landley.net>2018-12-04 21:29:51 -0600
commit747e296ff656813340c9355d98b0a13cba8473bc (patch)
treee7ef2b20be56e2e5a2062168aa822fd6c6139b7d /toys.h
parent141a075c0e192dc9910e777270114b1864270bfd (diff)
downloadtoybox-747e296ff656813340c9355d98b0a13cba8473bc.tar.gz
Add FLAG(x) macro, expanding to (toys.optflags & FLAG_##x)
Diffstat (limited to 'toys.h')
-rw-r--r--toys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/toys.h b/toys.h
index 5e71e3fe..4083725a 100644
--- a/toys.h
+++ b/toys.h
@@ -119,6 +119,8 @@ extern char toybuf[4096], libbuf[4096];
extern char **environ;
+#define FLAG(x) (toys.optflags&FLAG_##x)
+
#define GLOBALS(...)
#define ARRAY_LEN(array) (sizeof(array)/sizeof(*array))
#define TAGGED_ARRAY(X, ...) {__VA_ARGS__}