+#include <stddef.h>
+
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+typedef uint_least32_t dx_u32;
+#else
+#include <limits.h>
+#if UINT_MAX >= 0xffffffff
+typedef unsigned dx_u32;
+#else
+typedef unsigned long dx_u32;
+#endif
+#endif
+
+#define BSEARCH_ARRAY(key, arr, cmp) \
+ bsearch(key, arr, sizeof (arr) / sizeof *(arr), sizeof *(arr), cmp)