aboutsummaryrefslogtreecommitdiff
path: root/have
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-08 18:37:57 +0000
committerOmar Polo <op@omarpolo.com>2024-06-08 18:37:57 +0000
commit401030113e383542ae85f2e51bde9f94ff4015f8 (patch)
tree2f21d5f5c19c85e2ce3efb50b7d3f6a0407c6336 /have
parentfcf3f1fa9a0d6b30a189e7e71fc55348d72595ce (diff)
change the approach for strnvis
instead of making things more obscure via gmid_strnvis(), let's just check for strnvis with -Werror so we can swap the OS broken implementation with the bundled OpenBSD one.
Diffstat (limited to 'have')
-rw-r--r--have/Makefile3
-rw-r--r--have/broken-strnvis.c15
-rw-r--r--have/strnvis.c (renamed from have/vis.c)0
3 files changed, 1 insertions, 17 deletions
diff --git a/have/Makefile b/have/Makefile
index 1bdfc6b..bc9d7c5 100644
--- a/have/Makefile
+++ b/have/Makefile
@@ -7,7 +7,6 @@ DISTFILES = ASN1_time_parse.c \
X509_LOOKUP_mem.c \
arc4random.c \
arc4random_buf.c \
- broken-strnvis.c \
endian_h.c \
err.c \
explicit_bzero.c \
@@ -35,12 +34,12 @@ DISTFILES = ASN1_time_parse.c \
setresuid.c \
strlcat.c \
strlcpy.c \
+ strnvis.c \
strtonum.c \
sys_endian_h.c \
timingsafe_memcmp.c \
tree_h.c \
vasprintf.c \
- vis.c \
wait_any.c
all:
diff --git a/have/broken-strnvis.c b/have/broken-strnvis.c
deleted file mode 100644
index f2a9a59..0000000
--- a/have/broken-strnvis.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * public domain
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <vis.h>
-
-int
-main(void)
-{
- char buf[128];
-
- return strnvis(buf, sizeof(buf), "Hello, world!\n", 0);
-}
diff --git a/have/vis.c b/have/strnvis.c
index 85a4307..85a4307 100644
--- a/have/vis.c
+++ b/have/strnvis.c