From 89e1b5a2f03f031ff2b9423df8d52f1c66de2566 Mon Sep 17 00:00:00 2001 From: William Brown Date: Mon, 22 May 2017 15:44:26 +1000 Subject: [PATCH] Ticket 48864 - remove config.h from spal header. Bug Description: In spal header we required config.h, but descentdant plugins in other projects may not provide it. As a result we should not rely on it. Fix Description: Remove the config check in spal. Additionally, we need to be stricter on inttypes.h in configure.ac. https://pagure.io/389-ds-base/issue/48864 Author: wibrown Review by: ??? --- configure.ac | 6 +++++- ldap/servers/slapd/slapi_pal.h | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index a64c9bd..ce1589c 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,11 @@ AC_PROG_LIBTOOL AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h syslog.h unistd.h inttypes.h mntent.h sys/sysinfo.h]) +AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h syslog.h unistd.h mntent.h sys/sysinfo.h]) + +# These are *required* headers without option. +AC_CHECK_HEADERS([inttypes.h], [], AC_MSG_ERROR([unable to locate required header inttypes.h])) + # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT diff --git a/ldap/servers/slapd/slapi_pal.h b/ldap/servers/slapd/slapi_pal.h index 307679d..976b2bd 100644 --- a/ldap/servers/slapd/slapi_pal.h +++ b/ldap/servers/slapd/slapi_pal.h @@ -19,15 +19,7 @@ #pragma once -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef HAVE_INTTYPES_H #include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ /** * Structure that contains our system memory information in bytes and pages. -- 1.8.3.1