Skip to content

Commit

Permalink
configure.ac, lib/: Use __has_include(<gshadow.h>) instead of HAVE_GS…
Browse files Browse the repository at this point in the history
…HADOW_H

Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar authored and hallyn committed Feb 8, 2025
1 parent 9eea4bc commit a8dd818
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])])

Expand Down
2 changes: 1 addition & 1 deletion lib/gshadow.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <config.h>

#if defined(SHADOWGRP) && !defined(HAVE_GSHADOW_H)
#if defined(SHADOWGRP) && !__has_include(<gshadow.h>)

#ident "$Id$"

Expand Down
4 changes: 2 additions & 2 deletions lib/gshadow_.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define SHADOW_INCLUDE_LIB_GSHADOW__H_


#if defined(HAVE_GSHADOW_H)
#if __has_include(<gshadow.h>)
# include <gshadow.h>
#else

Expand Down Expand Up @@ -41,5 +41,5 @@ int putsgent (const struct sgrp *, FILE *);
#define GSHADOW "/etc/gshadow"


#endif // !HAVE_GSHADOW_H
#endif // !__has_include(<gshadow.h>)
#endif // include guard

0 comments on commit a8dd818

Please sign in to comment.