applied suggestion from Miloslav Trmac (see Bug 130419) and eliminated
* xmlmemory.c: applied suggestion from Miloslav Trmac (see
Bug 130419) and eliminated xmlInitMemoryDone. More
improvement needed.
* xml2-config.in: added an additional flag (--exec-prefix) to
allow library directory to be different from include directory
(Bug 129558).
diff --git a/ChangeLog b/ChangeLog
index c171d90..e4fdbb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Jan 4 08:57:51 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlmemory.c: applied suggestion from Miloslav Trmac (see
+ Bug 130419) and eliminated xmlInitMemoryDone. More
+ improvement needed.
+
+ * xml2-config.in: added an additional flag (--exec-prefix) to
+ allow library directory to be different from include directory
+ (Bug 129558).
+
Fri Jan 2 21:22:18 CET 2004 Daniel Veillard <daniel@veillard.com>
* error.c: applied patch from Stéphane Bidoul for structured error
diff --git a/xml2-config.in b/xml2-config.in
index b44d19a..cddd1a8 100644
--- a/xml2-config.in
+++ b/xml2-config.in
@@ -13,6 +13,7 @@
Known values for OPTION are:
--prefix=DIR change libxml prefix [default $prefix]
+ --exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
--libs print library linking information
--libtool-libs print linking information for use with libtool
--cflags print pre-processor and compiler flags
@@ -47,6 +48,15 @@
echo $prefix
;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ libdir=$exec_prefix/lib
+ ;;
+
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+
--version)
echo @VERSION@
exit 0
diff --git a/xmlmemory.c b/xmlmemory.c
index 55831d7..ccd8f55 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -769,8 +769,6 @@
* *
****************************************************************/
-static int xmlInitMemoryDone = 0;
-
/**
* xmlInitMemory:
*
@@ -784,9 +782,12 @@
#ifdef HAVE_STDLIB_H
char *breakpoint;
#endif
-
+ /*
+ This is really not good code (see Bug 130419). Suggestions for
+ improvement will be welcome!
+ */
+ if (xmlMemInitialized) return(-1);
xmlMemInitialized = 1;
- if (xmlInitMemoryDone) return(-1);
xmlMemMutex = xmlNewMutex();
#ifdef HAVE_STDLIB_H
@@ -806,7 +807,6 @@
xmlGenericError(xmlGenericErrorContext,
"xmlInitMemory() Ok\n");
#endif
- xmlInitMemoryDone = 1;
return(0);
}