Create replacement util.h if needed.

Remove #ifdef HAVE_UTIL_H wrapper.  ok djm@
This commit is contained in:
Darren Tucker
2025-09-05 17:27:43 +10:00
parent 5f09983d1e
commit 53887d8ebc
12 changed files with 7 additions and 30 deletions

View File

@@ -520,7 +520,6 @@ AC_CHECK_HEADERS([ \
ucred.h \
unistd.h \
usersec.h \
util.h \
utime.h \
utmp.h \
utmpx.h \
@@ -533,7 +532,7 @@ AC_CHECK_HEADERS([ \
# 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.
compatincludes=no
AC_CHECK_HEADERS([paths.h poll.h stdint.h], [], [
AC_CHECK_HEADERS([paths.h poll.h stdint.h util.h], [], [
compatincludes="`pwd`/openbsd-compat/include"
mkdir -p "$compatincludes"
case "$ac_header" in

View File

@@ -160,9 +160,7 @@
#include "ssherr.h"
#include "misc.h"
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
#ifdef USE_WTMPDB
# include <wtmpdb.h>

4
mux.c
View File

@@ -38,9 +38,7 @@
#include <poll.h>
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
#include <util.h>
#include "openbsd-compat/sys-queue.h"
#include "xmalloc.h"

View File

@@ -50,9 +50,7 @@
# include <fcntl.h>
#endif
#ifdef HAVE_UTIL_H
# include <util.h>
#endif /* HAVE_UTIL_H */
#include <util.h>
#ifdef HAVE_PTY_H
# include <pty.h>

View File

@@ -46,9 +46,7 @@
#else
# include "openbsd-compat/glob.h"
#endif
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
# include <vis.h>
#endif

4
scp.c
View File

@@ -100,9 +100,7 @@
#include <libgen.h>
#endif
#include <limits.h>
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
#include <util.h>
#include <locale.h>
#include <pwd.h>
#include <signal.h>

View File

@@ -37,9 +37,7 @@
#include <limits.h>
#include <stdarg.h>
#include <errno.h>
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
#ifdef USE_SYSTEM_GLOB
# include <glob.h>
#else

View File

@@ -37,9 +37,7 @@
#include <time.h>
#include <stdarg.h>
#include <unistd.h>
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
#include "xmalloc.h"
#include "ssherr.h"

4
sftp.c
View File

@@ -51,9 +51,7 @@ typedef void EditLine;
#include <string.h>
#include <unistd.h>
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
#include <util.h>
#include "xmalloc.h"
#include "log.h"

View File

@@ -66,9 +66,7 @@
#include <time.h>
#include <string.h>
#include <unistd.h>
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
#include <util.h>
#include "xmalloc.h"
#include "ssh.h"

View File

@@ -46,9 +46,7 @@
#include <string.h>
#include <resolv.h>
#include <time.h>
#ifdef HAVE_UTIL_H
#include <util.h>
#endif /* HAVE_UTIL_H */
#include "ssh2.h"
#include "ssherr.h"

View File

@@ -28,9 +28,7 @@
#include <stdio.h>
#include <string.h>
#include <termios.h>
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
#include <util.h>
#include <unistd.h>
#include "sshpty.h"