Monday, May 22, 2017

[389-commits] [389-ds-base] 01/01: 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.

This is an automated email from the git hooks/post-receive script.

mreynolds pushed a commit to branch 389-ds-base-1.3.6
in repository 389-ds-base.

commit e39271283471c33e61b434ce069c7145ad20ff7f
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Mon May 22 12:12:13 2017 -0400

From 89e1b5a2f03f031ff2b9423df8d52f1c66de2566 Mon Sep 17 00:00:00 2001
From: William Brown <firstyear@redhat.com>
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: viktor & mreynolds

(cherry picked from commit adb18fa5b1ab417cdc57135f498b2009a27baef3)
---
configure.ac | 6 +++++-
ldap/servers/slapd/slapi_pal.c | 2 --
ldap/servers/slapd/slapi_pal.h | 8 --------
3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5fbf6ac..ab9cb41 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.c b/ldap/servers/slapd/slapi_pal.c
index 91576ca..52e914f 100644
--- a/ldap/servers/slapd/slapi_pal.c
+++ b/ldap/servers/slapd/slapi_pal.c
@@ -11,8 +11,6 @@
* specific issues.
*/

-/* Provide ch_malloc etc. */
-#include <slapi-plugin.h>
/* Provide slapi_log_err macro wrapper */
#include <slapi-private.h>
#include <slapi_pal.h>
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 <config.h>
-

No comments:

Post a Comment