aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 1d91a0a72..fcd0dfa31 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -255,6 +255,14 @@ extern char *xstrdup(const char *s);
255extern char *xstrndup(const char *s, int n); 255extern char *xstrndup(const char *s, int n);
256extern char *safe_strncpy(char *dst, const char *src, size_t size); 256extern char *safe_strncpy(char *dst, const char *src, size_t size);
257extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); 257extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
258// gcc-4.1.1 still isn't good enough at optimizing it
259// (+200 bytes compared to macro)
260//static ATTRIBUTE_ALWAYS_INLINE
261//int LONE_DASH(const char *s) { return s[0] == '-' && !s[1]; }
262//static ATTRIBUTE_ALWAYS_INLINE
263//int NOT_LONE_DASH(const char *s) { return s[0] != '-' || s[1]; }
264#define LONE_DASH(s) ((s)[0] == '-' && !(s)[1])
265#define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1])
258 266
259/* dmalloc will redefine these to it's own implementation. It is safe 267/* dmalloc will redefine these to it's own implementation. It is safe
260 * to have the prototypes here unconditionally. */ 268 * to have the prototypes here unconditionally. */