integrated Eric Lavigne (sp???) contribution to build libxml2 on MacOS

* configure.in libxml.h parser.c testThreads.c macos/: integrated
  Eric Lavigne (sp???) contribution to build libxml2 on MacOS using
  CodeWarrior.
Daniel
diff --git a/ChangeLog b/ChangeLog
index 10a9ba2..1544995 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Dec  5 13:01:37 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+	* configure.in libxml.h parser.c testThreads.c macos/: integrated
+	  Eric Lavigne (sp???) contribution to build libxml2 on MacOS using
+	  CodeWarrior.
+
 Tue Dec  4 14:13:44 CET 2001 Daniel Veillard <daniel@veillard.com>
 
 	* xmllint.c: applied Geert Kloosterman's patch to fix
diff --git a/Makefile.am b/Makefile.am
index 5630ac9..6f06df1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -547,7 +547,7 @@
 
 dist-hook: libxml.spec
 	-cp libxml.spec $(distdir)
-	(cd $(srcdir) ; tar -cf - --exclude CVS win32 test result SAXresult ) | (cd $(distdir); tar xf -)
+	(cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -)
 
 cleantar:
 	@(rm -f libxslt*.tar.gz)
@@ -568,7 +568,6 @@
              libxml.m4 \
              example/Makefile.am example/gjobread.c example/gjobs.xml \
 	     $(man_MANS) libxml-2.0.pc.in \
-	     vms/build_libxml.com vms/config.vms \
 	     trionan.c trionan.h strio.c strio.h trio.c trio.h \
 	     triop.h triodef.h libxml.h
 
diff --git a/libxml.h b/libxml.h
index aaebf3b..6b7476f 100644
--- a/libxml.h
+++ b/libxml.h
@@ -11,6 +11,8 @@
 
 #if defined(WIN32) && !defined(__CYGWIN__)
 #include "win32config.h"
+#elif defined(macintosh)
+#include "config-mac.h"
 #else
 #include "config.h"
 #include <libxml/xmlversion.h>
diff --git a/macos/README b/macos/README
new file mode 100644
index 0000000..434aece
--- /dev/null
+++ b/macos/README
@@ -0,0 +1,8 @@
+This is a MacOS port contribution (not to be used for MacOS-X)
+for the CodeWarrior environment.
+Please contact the author directly in case of problems:
+   Eric <erlavigne@wanadoo.fr>
+
+  thanks,
+
+Daniel
diff --git a/macos/libxml2.mcp.xml.sit.hqx b/macos/libxml2.mcp.xml.sit.hqx
new file mode 100644
index 0000000..758554d
--- /dev/null
+++ b/macos/libxml2.mcp.xml.sit.hqx
Binary files differ
diff --git a/macos/src/XMLTestPrefix.h b/macos/src/XMLTestPrefix.h
new file mode 100644
index 0000000..3e84255
--- /dev/null
+++ b/macos/src/XMLTestPrefix.h
Binary files differ
diff --git a/macos/src/XMLTestPrefix2.h b/macos/src/XMLTestPrefix2.h
new file mode 100644
index 0000000..55df51e
--- /dev/null
+++ b/macos/src/XMLTestPrefix2.h
Binary files differ
diff --git a/macos/src/config-mac.h b/macos/src/config-mac.h
new file mode 100644
index 0000000..7317aef
--- /dev/null
+++ b/macos/src/config-mac.h
@@ -0,0 +1,201 @@
+/* config.h generated manually for macos.  */
+
+/* Define if you have the strftime function.  */
+#define HAVE_STRFTIME
+
+/* Define if you have the ANSI C header files.  */
+#define STDC_HEADERS
+
+#define PACKAGE
+#define VERSION
+
+#undef HAVE_LIBZ
+#undef HAVE_LIBM
+#undef HAVE_ISINF
+#undef HAVE_ISNAN
+#undef HAVE_LIBHISTORY
+#undef HAVE_LIBREADLINE
+
+#define SOCKLEN_T socklen_t
+#define HAVE_LIBPTHREAD
+#define HAVE_PTHREAD_H
+#define LIBXML_THREAD_ENABLED
+
+/* Define if you have the _stat function.  */
+#define HAVE__STAT
+
+/* Define if you have the class function.  */
+#undef HAVE_CLASS
+
+/* Define if you have the finite function.  */
+#undef HAVE_FINITE
+
+/* Define if you have the fp_class function.  */
+#undef HAVE_FP_CLASS
+
+/* Define if you have the fpclass function.  */
+#undef HAVE_FPCLASS
+
+/* Define if you have the fprintf function.  */
+#define HAVE_FPRINTF
+
+/* Define if you have the isnand function.  */
+#undef HAVE_ISNAND
+
+/* Define if you have the localtime function.  */
+#define HAVE_LOCALTIME
+
+/* Define if you have the printf function.  */
+#define HAVE_PRINTF
+
+/* Define if you have the signal function.  */
+#define HAVE_SIGNAL
+
+/* Define if you have the snprintf function.  */
+#define HAVE_SNPRINTF
+
+/* Define if you have the sprintf function.  */
+#define HAVE_SPRINTF
+
+/* Define if you have the sscanf function.  */
+#define HAVE_SSCANF
+
+/* Define if you have the stat function.  */
+#define HAVE_STAT
+
+/* Define if you have the strdup function.  */
+#define HAVE_STRDUP
+
+/* Define if you have the strerror function.  */
+#define HAVE_STRERROR
+
+/* Define if you have the strftime function.  */
+#define HAVE_STRFTIME
+
+/* Define if you have the strndup function.  */
+#define HAVE_STRNDUP
+
+/* Define if you have the vfprintf function.  */
+#define HAVE_VFPRINTF
+
+/* Define if you have the vsnprintf function.  */
+#define HAVE_VSNPRINTF
+
+/* Define if you have the vsprintf function.  */
+#define HAVE_VSPRINTF
+
+/* Define if you have the <ansidecl.h> header file.  */
+#define HAVE_ANSIDECL_H
+
+/* Define if you have the <arpa/inet.h> header file.  */
+#define HAVE_ARPA_INET_H
+
+/* Define if you have the <ctype.h> header file.  */
+#define HAVE_CTYPE_H
+
+/* Define if you have the <dirent.h> header file.  */
+#define HAVE_DIRENT_H
+
+/* Define if you have the <dlfcn.h> header file.  */
+#define HAVE_DLFCN_H
+
+/* Define if you have the <errno.h> header file.  */
+#define HAVE_ERRNO_H
+
+/* Define if you have the <fcntl.h> header file.  */
+#define HAVE_FCNTL_H
+
+/* Define if you have the <float.h> header file.  */
+#define HAVE_FLOAT_H
+
+/* Define if you have the <fp_class.h> header file.  */
+#define HAVE_FP_CLASS_H
+
+/* Define if you have the <ieeefp.h> header file.  */
+#define HAVE_IEEEFP_H
+
+/* Define if you have the <malloc.h> header file.  */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <math.h> header file.  */
+#define HAVE_MATH_H
+
+/* Define if you have the <nan.h> header file.  */
+#define HAVE_NAN_H
+
+/* Define if you have the <ndir.h> header file.  */
+#define HAVE_NDIR_H
+
+/* Define if you have the <netdb.h> header file.  */
+#define HAVE_NETDB_H
+
+/* Define if you have the <netinet/in.h> header file.  */
+#define HAVE_NETINET_IN_H
+
+/* Define if you have the <signal.h> header file.  */
+#define HAVE_SIGNAL_H
+
+/* Define if you have the <stdarg.h> header file.  */
+#define HAVE_STDARG_H
+
+/* Define if you have the <stdlib.h> header file.  */
+#define HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file.  */
+#define HAVE_STRING_H
+
+/* Define if you have the <sys/dir.h> header file.  */
+#define HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/mman.h> header file.  */
+#undef HAVE_SYS_MMAN_H
+
+/* Define if you have the <sys/ndir.h> header file.  */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/select.h> header file.  */
+#define HAVE_SYS_SELECT_H
+
+/* Define if you have the <sys/socket.h> header file.  */
+#define HAVE_SYS_SOCKET_H
+
+/* Define if you have the <sys/stat.h> header file.  */
+#define HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/time.h> header file.  */
+#define HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file.  */
+#define HAVE_SYS_TYPES_H
+
+/* Define if you have the <time.h> header file.  */
+#define HAVE_TIME_H
+
+/* Define if you have the <unistd.h> header file.  */
+#define HAVE_UNISTD_H
+
+/* Define if you have the <zlib.h> header file.  */
+#undef HAVE_ZLIB_H
+
+/* Define if you have the inet library (-linet).  */
+#undef HAVE_LIBINET
+
+/* Define if you have the nsl library (-lnsl).  */
+#undef HAVE_LIBNSL
+
+/* Define if you have the socket library (-lsocket).  */
+#undef HAVE_LIBSOCKET
+
+/* Name of package */
+#define PACKAGE
+
+/* Version number of package */
+#define VERSION
+
+/* Define if compiler has function prototypes */
+#define PROTOTYPES
+
+#include <libxml/xmlversion.h>
+#include <sys/types.h>
+#include <extra/stricmp.h>
+#include <extra/strdup.h>
diff --git a/macos/src/libxml2_GUSIConfig.cp b/macos/src/libxml2_GUSIConfig.cp
new file mode 100644
index 0000000..77d0c93
--- /dev/null
+++ b/macos/src/libxml2_GUSIConfig.cp
Binary files differ
diff --git a/macos/src/macos_main.c b/macos/src/macos_main.c
new file mode 100644
index 0000000..2625000
--- /dev/null
+++ b/macos/src/macos_main.c
Binary files differ
diff --git a/parser.c b/parser.c
index 16a5423..5e11c3e 100644
--- a/parser.c
+++ b/parser.c
@@ -7335,7 +7335,7 @@
 				   version);
 	}
 	if (ctxt->version != NULL)
-	    xmlFree(ctxt->version);
+	    xmlFree((void *) ctxt->version);
 	ctxt->version = version;
     }
 
diff --git a/testThreads.c b/testThreads.c
index 1c494ab..695bf2a 100644
--- a/testThreads.c
+++ b/testThreads.c
@@ -95,7 +95,7 @@
 
 	for (i = 0; i < num_threads; i++) {
 	    results[i] = NULL;
-	    tid[i] = -1;
+	    tid[i] = (pthread_t) -1;
 	}
 
 	for (i = 0; i < num_threads; i++) {