From: Alejandro Colomar Date: Mon, 27 Jan 2025 12:23:57 +0000 (+0100) Subject: configure.ac, lib/: Use __has_include() instead of HAVE_GSHADOW_H X-Git-Tag: 4.17.3~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8dd818ba499c3598aa311a4bf8107a6cef59e6f;p=thirdparty%2Fshadow.git configure.ac, lib/: Use __has_include() instead of HAVE_GSHADOW_H Signed-off-by: Alejandro Colomar --- 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