1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-25 10:50:08 +03:00

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
This commit is contained in:
Daniel Veillard 2001-12-05 12:03:33 +00:00
parent a7866930c1
commit d3b08826fc
12 changed files with 225 additions and 4 deletions

View File

@ -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

View File

@ -547,7 +547,7 @@ Validtests : xmllint
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 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml.spec \
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

View File

@ -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>

8
macos/README Normal file
View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
int test_main(int argc, char **argv); #define main(X,Y) test_main(X,Y)

View File

@ -0,0 +1 @@
int test_main(int argc, char* argv[]); #define main() test_main(int argc, char* argv[])

201
macos/src/config-mac.h Normal file
View File

@ -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>

View File

@ -0,0 +1 @@
/**************** BEGIN GUSI CONFIGURATION **************************** * * GUSI Configuration section generated by GUSI Configurator * last modified: Wed Oct 31 17:07:45 2001 * * This section will be overwritten by the next run of Configurator. */ #define GUSI_SOURCE #include <GUSIConfig.h> #include <sys/cdefs.h> /* Declarations of Socket Factories */ __BEGIN_DECLS void GUSIwithInetSockets(); void GUSIwithLocalSockets(); void GUSIwithMTInetSockets(); void GUSIwithMTTcpSockets(); void GUSIwithMTUdpSockets(); void GUSIwithOTInetSockets(); void GUSIwithOTTcpSockets(); void GUSIwithOTUdpSockets(); void GUSIwithPPCSockets(); void GUSISetupFactories(); __END_DECLS /* Configure Socket Factories */ void GUSISetupFactories() { #ifdef GUSISetupFactories_BeginHook GUSISetupFactories_BeginHook #endif GUSIwithInetSockets(); #ifdef GUSISetupFactories_EndHook GUSISetupFactories_EndHook #endif } /* Declarations of File Devices */ __BEGIN_DECLS void GUSIwithNullSockets(); void GUSISetupDevices(); __END_DECLS /* Configure File Devices */ void GUSISetupDevices() { #ifdef GUSISetupDevices_BeginHook GUSISetupDevices_BeginHook #endif GUSIwithNullSockets(); #ifdef GUSISetupDevices_EndHook GUSISetupDevices_EndHook #endif } #ifndef __cplusplus #error GUSISetupConfig() needs to be written in C++ #endif GUSIConfiguration::FileSuffix sSuffices[] = { "", '????', '????' }; extern "C" void GUSISetupConfig() { GUSIConfiguration * config = GUSIConfiguration::CreateInstance(GUSIConfiguration::kNoResource); config->ConfigureDefaultTypeCreator('TEXT', 'CWIE'); config->ConfigureSuffices( sizeof(sSuffices)/sizeof(GUSIConfiguration::FileSuffix)-1, sSuffices); } /**************** END GUSI CONFIGURATION *************************/

1
macos/src/macos_main.c Normal file
View File

@ -0,0 +1 @@
#include <GUSICommandLine.h> #include <stdlib.h> #undef main DECLARE_MAIN(test) REGISTER_MAIN_START REGISTER_MAIN(test) REGISTER_MAIN_END int main() { (void) exec_commands(); return 0; }

View File

@ -7335,7 +7335,7 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
version);
}
if (ctxt->version != NULL)
xmlFree(ctxt->version);
xmlFree((void *) ctxt->version);
ctxt->version = version;
}

View File

@ -95,7 +95,7 @@ main()
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++) {