summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2021-02-06 23:28:42 +0100
committerGuillem Jover <guillem@hadrons.org>2021-02-07 02:03:22 +0100
commit233cab9d649137b14bb0caac045a75e4a7a562c4 (patch)
treea772974498b2343e7ea0b11d639f3f6dedf9b620 /include
parent2462cd88889a79f50017d23eaa376de67affc59c (diff)
Add support for new LIBBSD_VIS_OPENBSD selection macro
This will make it possible to explicitly select the OpenBSD vis implementation (the current default) for code of OpenBSD origins.
Diffstat (limited to 'include')
-rw-r--r--include/bsd/vis.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/bsd/vis.h b/include/bsd/vis.h
index 84102b2..fb9ad27 100644
--- a/include/bsd/vis.h
+++ b/include/bsd/vis.h
@@ -99,8 +99,11 @@
* Provide both implementations and default for now on the historical one to
* avoid breakage, we will switch to the NetBSD one in libbsd 0.10.0 or so.
* Define LIBBSD_NETBSD_VIS to switch to the NetBSD one now.
+ * Define LIBBSD_OPENBSD_VIS to keep using the OpenBSD one.
*/
-#ifndef LIBBSD_NETBSD_VIS
+#if defined(LIBBSD_OPENBSD_VIS)
+#undef LIBBSD_NETBSD_VIS
+#elif !defined(LIBBSD_NETBSD_VIS)
#warning "NetBSD added incompatible strnvis() and strnunvis(), please see <bsd/vis.h> for more detils."
#endif