From a8dd818ba499c3598aa311a4bf8107a6cef59e6f Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 27 Jan 2025 13:23:57 +0100 Subject: [PATCH] configure.ac, lib/: Use __has_include() instead of HAVE_GSHADOW_H Signed-off-by: Alejandro Colomar --- configure.ac | 3 --- lib/gshadow.c | 2 +- lib/gshadow_.h | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0cb425a25..c4dde3a8b 100644 --- a/configure.ac +++ b/configure.ac @@ -36,9 +36,6 @@ LT_LIB_DLLOAD dnl Checks for libraries. -dnl Checks for header files. -AC_CHECK_HEADERS(gshadow.h) - dnl shadow now uses the libc's shadow implementation AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])]) diff --git a/lib/gshadow.c b/lib/gshadow.c index d1ca70706..2725e09eb 100644 --- a/lib/gshadow.c +++ b/lib/gshadow.c @@ -9,7 +9,7 @@ #include -#if defined(SHADOWGRP) && !defined(HAVE_GSHADOW_H) +#if defined(SHADOWGRP) && !__has_include() #ident "$Id$" diff --git a/lib/gshadow_.h b/lib/gshadow_.h index be1f0f1c2..2b38cb338 100644 --- a/lib/gshadow_.h +++ b/lib/gshadow_.h @@ -9,7 +9,7 @@ #define SHADOW_INCLUDE_LIB_GSHADOW__H_ -#if defined(HAVE_GSHADOW_H) +#if __has_include() # include #else @@ -41,5 +41,5 @@ int putsgent (const struct sgrp *, FILE *); #define GSHADOW "/etc/gshadow" -#endif // !HAVE_GSHADOW_H +#endif // !__has_include() #endif // include guard