From 8edd46cb082440cf67e1389a2bf39c35ec92faf1 Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 18 Mar 2020 19:45:08 +0100 Subject: Add BSD compatibility functions and headers Original file locations in the OpenBSD tree: - lib/libc/stdlib/reallocarray.c - lib/libc/stdlib/strtonum.c - lib/libc/string/strlcat.c - lib/libc/string/strlcpy.c - sys/sys/queue.h --- calmwm.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'calmwm.h') diff --git a/calmwm.h b/calmwm.h index a0aeafa..521f8d8 100644 --- a/calmwm.h +++ b/calmwm.h @@ -21,6 +21,26 @@ #ifndef _CALMWM_H_ #define _CALMWM_H_ +#include "queue.h" + +void *reallocarray(void *, size_t, size_t); + +#ifdef strlcat +#define HAVE_STRLCAT +#else +size_t strlcat(char *, const char *, size_t); +#endif +#ifdef strlcpy +#define HAVE_STRLCPY +#else +size_t strlcpy(char *, const char *, size_t); +#endif +#ifdef strtonum +#define HAVE_STRTONUM +#else +long long strtonum(const char *, long long, long long, const char **); +#endif + #include #include #include -- cgit v1.2.3-2-gb3c3