summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libshouldbeinlibc/argp-fmtstream.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libshouldbeinlibc/argp-fmtstream.c b/libshouldbeinlibc/argp-fmtstream.c
index 042b10be..3f6474a0 100644
--- a/libshouldbeinlibc/argp-fmtstream.c
+++ b/libshouldbeinlibc/argp-fmtstream.c
@@ -22,16 +22,25 @@
/* This package emulates glibc `line_wrap_stream' semantics for systems that
don't have that. */
+/* Get some gnu features: isblank, vsnprintf */
+#undef _GNU_SOURCE
+#define _GNU_SOURCE
+
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdarg.h>
+#include <ctype.h>
#include "argp-fmtstream.h"
#include "argp-namefrob.h"
#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
+#ifndef isblank
+#define isblank(ch) ((ch)==' ' || (ch)=='\t')
+#endif
+
#define INIT_BUF_SIZE 200
#define PRINTF_SIZE_GUESS 150