build: consistently include config.h unconditionally

Given that in most places config.h is included unconditionally,
there is no point in keeping remaining HAVE_CONFIG_H checks.

Public header files do not use config.h and therefore
are not affected by this change anyway.
This commit is contained in:
Dmitry V. Levin 2024-08-28 08:00:00 +00:00
parent 0b3eff3649
commit 214e97e115
46 changed files with 7 additions and 101 deletions

View File

@ -9,9 +9,7 @@
* distributed with this file.)
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <stdio.h>

View File

@ -9,9 +9,7 @@
* distributed with this file.)
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <string.h>
#include <stdio.h>

View File

@ -1,7 +1,5 @@
%{
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <stdio.h>

View File

@ -1,8 +1,6 @@
%{
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -7,9 +7,7 @@
#ifndef TEST_ASSERT_H
# define TEST_ASSERT_H
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
# include <config.h>
# include <limits.h>
# include <stdio.h>

View File

@ -33,9 +33,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
#include <errno.h>
#include <stdio.h>

View File

@ -33,9 +33,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
#include <time.h>
#include <errno.h>

View File

@ -34,9 +34,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(HAVE_CONFIG_H)
#include <config.h>
#endif
#include <pwd.h>
#include <shadow.h>

View File

@ -37,9 +37,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(HAVE_CONFIG_H)
#include <config.h>
#endif
#include <pwd.h>
#include <errno.h>

View File

@ -7,9 +7,7 @@
(at your option) any later version.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <dlfcn.h>
#include <stdio.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,10 +31,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <config.h>
#include <stdio.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -6,9 +6,7 @@
the Free Software Foundation in version 2 of the License.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <stdio.h>
#include <string.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -40,9 +40,7 @@
User is member of group tstpamaccess, pam_authenticate should pass.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -40,9 +40,7 @@
User is not member of group tstpamaccess, pam_authenticate should fail.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -40,9 +40,7 @@
pam_authenticate should pass for user tstpamaccess3
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -42,9 +42,7 @@
and fail again for localhost
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <strings.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -43,9 +43,7 @@
to tstpamgrp2.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <grp.h>
#include <stdio.h>

View File

@ -41,9 +41,7 @@
getrlimit should return soft=1 and hard=40.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -31,9 +31,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -38,9 +38,7 @@
* Try a new password, should succeed
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -41,9 +41,7 @@
User is pamtest or tstpamtest, both should succeed.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -41,9 +41,7 @@
User 'x' should not be able to login.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -35,9 +35,7 @@
* Test case: '!!' as password should not allow login
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -37,9 +37,7 @@
* Second use longer password, 9 characters
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -38,9 +38,7 @@
* Third use wrong password, 9 characters
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -35,9 +35,7 @@
* Check password change minimum days handling.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>