[libxml2] minimize use of HAVE_CONFIG_H



commit 1f0453f71546071d13c1cb06b7b6799e63fd4f9f
Author: Roumen Petrov <bugtrack roumenpetrov info>
Date:   Mon Aug 13 16:56:11 2012 +0800

    minimize use of HAVE_CONFIG_H
    
    as build process for supported platforms provide "config.h" header file

 libxml.h                    |    5 +++++
 runsuite.c                  |    3 ---
 runtest.c                   |    3 ---
 runxmlconf.c                |    3 ---
 testapi.c                   |    3 ---
 testrecurse.c               |    3 ---
 win32/VC10/runsuite.vcxproj |    2 +-
 7 files changed, 6 insertions(+), 16 deletions(-)
---
diff --git a/libxml.h b/libxml.h
index fa3aea4..efe285b 100644
--- a/libxml.h
+++ b/libxml.h
@@ -29,6 +29,11 @@
 #include <win32config.h>
 #include <libxml/xmlversion.h>
 #else
+/*
+ * Currently supported platforms use either autoconf or
+ * copy to config.h own "preset" configuration file.
+ * As result ifdef HAVE_CONFIG_H is omited here.
+ */
 #include "config.h"
 #include <libxml/xmlversion.h>
 #endif
diff --git a/runsuite.c b/runsuite.c
index d1dc2ca..8ba5f6f 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -6,11 +6,8 @@
  * daniel veillard com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
diff --git a/runtest.c b/runtest.c
index c7214f2..7cde25b 100644
--- a/runtest.c
+++ b/runtest.c
@@ -11,11 +11,8 @@
  * daniel veillard com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
diff --git a/runxmlconf.c b/runxmlconf.c
index 52d50d7..a271343 100644
--- a/runxmlconf.c
+++ b/runxmlconf.c
@@ -6,11 +6,8 @@
  * daniel veillard com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #ifdef LIBXML_XPATH_ENABLED
 
diff --git a/testapi.c b/testapi.c
index 25e47be..99c536f 100644
--- a/testapi.c
+++ b/testapi.c
@@ -8,11 +8,8 @@
  * daniel veillard com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #include <stdlib.h> /* for putenv() */
 #include <string.h>
diff --git a/testrecurse.c b/testrecurse.c
index 5cfcc2c..efdccc0 100644
--- a/testrecurse.c
+++ b/testrecurse.c
@@ -10,11 +10,8 @@
  * daniel veillard com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
diff --git a/win32/VC10/runsuite.vcxproj b/win32/VC10/runsuite.vcxproj
index b4ccc37..83cc991 100644
--- a/win32/VC10/runsuite.vcxproj
+++ b/win32/VC10/runsuite.vcxproj
@@ -46,7 +46,7 @@
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14.vc10\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <DisableSpecificWarnings>4996</DisableSpecificWarnings>
-      <PreprocessorDefinitions>HAVE_CONFIG_H;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
       <MinimalRebuild>false</MinimalRebuild>
     </ClCompile>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]