# platform. Usually these are just empty, but in some cases they'll include
# the equivalent file. This avoids having to wrap those includes in
# '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes.
+COMPATINCLUDESDIR="openbsd-compat/include"
COMPATINCLUDES=""
AC_CHECK_HEADERS([ \
endian.h \
sys/un.h \
time.h \
util.h], [], [
- COMPATINCLUDES="openbsd-compat/include"
+ COMPATINCLUDES="$COMPATINCLUDESDIR"
header="$COMPATINCLUDES/$ac_header"
dir=`dirname "$header"`
mkdir -p "$dir"
dnl Now create replacement headers for those that we always want to shim.
for include in sys/queue.h sys/tree.h; do
- COMPATINCLUDES="openbsd-compat/include"
+ COMPATINCLUDES="$COMPATINCLUDESDIR"
header="$COMPATINCLUDES/$include"
dir=`dirname "$header"`
mkdir -p "$dir"
# need to include the system one first, not our shim.
case "$host" in
*-*-dragonfly*)
- mkdir -p openbsd-compat/include/sys
+ COMPATINCLUDES="$COMPATINCLUDESDIR"
+ mkdir -p "$COMPATINCLUDES/sys"
echo '#include "/usr/include/sys/queue.h"'
echo '#include "/usr/include/sys/mount.h"'
;;
-esac > "openbsd-compat/include/sys/mount.h"
+esac > "$COMPATINCLUDES/sys/mount.h"
AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [
#ifdef HAVE_SYS_TYPES_H