[Libvirt-cim] [PATCH 2 of 3] [CU] add cmpi void to check to libcmpiutil

Jay Gagnon grendel at linux.vnet.ibm.com
Mon Feb 25 20:54:30 UTC 2008


# HG changeset patch
# User Jay Gagnon <grendel at linux.vnet.ibm.com>
# Date 1203959115 18000
# Node ID ad33899f5782b926070a0290ec8622fe164b5a27
# Parent  f30365d472ed40da0af04d7ea3671ba3ac113580
[CU] add cmpi void to check to libcmpiutil

This used to be only required by libvirt-cim, but the new functionality in std_indication has made it necessary in libcmpiutil as well.

Signed-off-by: Jay Gagnon <grendel at linux.vnet.ibm.com>

diff -r f30365d472ed -r ad33899f5782 acinclude.m4
--- a/acinclude.m4	Mon Feb 25 11:36:57 2008 -0500
+++ b/acinclude.m4	Mon Feb 25 12:05:15 2008 -0500
@@ -92,6 +92,34 @@ AC_DEFUN([CHECK_BROKEN_CMPIFT],
 	]
 )])
 
+#
+# Check for void EnableIndications return
+#
+AC_DEFUN([CHECK_IND_VOID], [
+	AH_TEMPLATE([CMPI_EI_VOID],
+		    [Defined if return type of EnableIndications 
+		     should be void])
+	AC_MSG_CHECKING([return type for indications])
+	CFLAGS_TMP=$CFLAGS
+	CFLAGS="-Werror"
+	AC_TRY_COMPILE([
+		  #include <cmpift.h>
+		  static void ei(CMPIIndicationMI *mi, const CMPIContext *c) {
+		       return;
+		  }
+		],[ 
+		  struct _CMPIIndicationMIFT ft;
+		  ft.enableIndications = ei;
+		  return 0;
+	], [
+		echo "void"
+		AC_DEFINE_UNQUOTED([CMPI_EI_VOID], [yes])
+	], [
+		echo "CMPIStatus"
+	])
+	CFLAGS=$CFLAGS_TMP
+])
+
 AC_DEFUN([CHECK_LIBXML2],
         [
         PKG_CHECK_MODULES([LIBXML], [libxml-2.0])
diff -r f30365d472ed -r ad33899f5782 configure.ac
--- a/configure.ac	Mon Feb 25 11:36:57 2008 -0500
+++ b/configure.ac	Mon Feb 25 12:05:15 2008 -0500
@@ -4,6 +4,7 @@ AC_CONFIG_SRCDIR([libcmpiutil.h])
 AC_CONFIG_SRCDIR([libcmpiutil.h])
 
 CHECK_CMPI
+CHECK_IND_VOID
 
 AC_CHECK_HEADERS([cmpidt.h cmpift.h cmpimacs.h])
 
@@ -22,7 +23,7 @@ CC_WARNINGS="\
 
 CFLAGS="$CFLAGS $CC_WARNINGS -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE"
 
-#AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADER([config.h])
 
 topdir=`pwd`
 AC_SUBST(topdir)




More information about the Libvirt-cim mailing list