summaryrefslogtreecommitdiff
path: root/compat/isascii.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/isascii.c')
-rw-r--r--compat/isascii.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/compat/isascii.c b/compat/isascii.c
new file mode 100644
index 000000000000..8a4ab3743110
--- /dev/null
+++ b/compat/isascii.c
@@ -0,0 +1,15 @@
+/* Just a replacement, if the original isascii is not
+ present */
+
+#if HAVE_CONFIG_H
+#include <ldns/config.h>
+#endif
+
+int isascii(int c);
+
+/* true if character is ascii. */
+int
+isascii(int c)
+{
+ return c >= 0 && c < 128;
+}