aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.h
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-03-18 19:45:08 +0100
committerWolfgang Müller2021-04-27 12:28:22 +0200
commit8edd46cb082440cf67e1389a2bf39c35ec92faf1 (patch)
tree19b52d0e7a4daaf8ec6c7e5a61a61b79bd1eeb99 /calmwm.h
parent78e4541a97ee90145fd630a363a69318e4dc972d (diff)
downloadcwm-8edd46cb082440cf67e1389a2bf39c35ec92faf1.tar.gz
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
Diffstat (limited to '')
-rw-r--r--calmwm.h20
1 files changed, 20 insertions, 0 deletions
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 <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/Xft/Xft.h>