Add wrappers for other ultrix headers.

Wrappers protect against multiple inclusions for headers that don't do
it themselves.
This commit is contained in:
Darren Tucker 2019-11-15 18:56:54 +11:00
parent 134a74f4e0
commit 39b87104cd

View File

@ -1207,17 +1207,19 @@ mips-sony-bsd|mips-sony-newsos4)
# DISABLE_FD_PASSING so that we call setpgrp as root, otherwise we # DISABLE_FD_PASSING so that we call setpgrp as root, otherwise we
# don't get a controlling tty. # don't get a controlling tty.
AC_DEFINE([DISABLE_FD_PASSING], [1], [Need to call setpgrp as root]) AC_DEFINE([DISABLE_FD_PASSING], [1], [Need to call setpgrp as root])
# On Ultrix netinet/ip.h is not protected against multiple includes, # On Ultrix some headers are not protected against multiple includes,
# so we create our own wrapper and put it where the compiler will # so we create wrappers and put it where the compiler will find it.
# find it. AC_MSG_WARN([creating compat wrappers for headers])
AC_MSG_WARN([creating compat wrapper for netinet/ip.h])
mkdir -p netinet mkdir -p netinet
cat >netinet/ip.h <<EOD for header in netinet/ip.h netdb.h resolv.h; do
#ifndef _SSH_COMPAT_NETINET_IP_H name=`echo $header | tr 'a-z/.' 'A-Z__'`
#define _SSH_COMPAT_NETINET_IP_H cat >$header <<EOD
#include "/usr/include/netinet/ip.h" #ifndef _SSH_COMPAT_${name}
#define _SSH_COMPAT_${name}
#include "/usr/include/${header}"
#endif #endif
EOD EOD
done
;; ;;
*-*-lynxos) *-*-lynxos)