[Expat-checkins] expat/xmlwf codepage.c, 1.12, 1.13 readfilemap.c, 1.12, 1.13 xmlfile.c, 1.17, 1.18 xmlwf.c, 1.71, 1.72

Karl Waclawek kwaclaw at users.sourceforge.net
Sat Aug 5 19:00:40 CEST 2006


Update of /cvsroot/expat/expat/xmlwf
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8078/xmlwf

Modified Files:
	codepage.c readfilemap.c xmlfile.c xmlwf.c 
Log Message:
Applied patrch #1523242 - support for Open Watcom 1.5.

Index: codepage.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/codepage.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- codepage.c	19 Apr 2005 18:25:08 -0000	1.12
+++ codepage.c	5 Aug 2006 17:00:36 -0000	1.13
@@ -4,7 +4,7 @@
 
 #include "codepage.h"
 
-#ifdef WIN32
+#if (defined(WIN32) || (defined(__WATCOMC__) && defined(__NT__)))
 #define STRICT 1
 #define WIN32_LEAN_AND_MEAN 1
 

Index: readfilemap.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/readfilemap.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- readfilemap.c	28 Jun 2006 02:55:51 -0000	1.12
+++ readfilemap.c	5 Aug 2006 17:00:36 -0000	1.13
@@ -8,6 +8,14 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#ifdef __WATCOMC__
+#ifndef __linux__
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+#endif
+
 #ifdef __BEOS__
 #include <unistd.h>
 #endif

Index: xmlfile.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/xmlfile.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- xmlfile.c	14 Apr 2006 18:02:08 -0000	1.17
+++ xmlfile.c	5 Aug 2006 17:00:36 -0000	1.18
@@ -14,6 +14,8 @@
 #include "macconfig.h"
 #elif defined(__amigaos4__)
 #include "amigaconfig.h"
+#elif defined(__WATCOMC__)
+#include "watcomconfig.h"
 #elif defined(HAVE_EXPAT_CONFIG_H)
 #include <expat_config.h>
 #endif /* ndef COMPILED_FROM_DSP */
@@ -23,9 +25,11 @@
 #include "xmltchar.h"
 #include "filemap.h"
 
-#ifdef _MSC_VER
+#if (defined(_MSC_VER) || defined(__WATCOMC__))
+#ifndef __linux__
 #include <io.h>
 #endif
+#endif
 
 #ifdef AMIGA_SHARED_LIB
 #include <proto/expat.h>
@@ -85,7 +89,7 @@
     *retPtr = 1;
 }
 
-#ifdef WIN32
+#if (defined(WIN32) || defined(__WATCOMC__))
 
 static int
 isAsciiLetter(XML_Char c)
@@ -103,7 +107,7 @@
   *toFree = 0;
   if (!base
       || *systemId == T('/')
-#ifdef WIN32
+#if (defined(WIN32) || defined(__WATCOMC__))
       || *systemId == T('\\')
       || (isAsciiLetter(systemId[0]) && systemId[1] == T(':'))
 #endif
@@ -117,7 +121,7 @@
   s = *toFree;
   if (tcsrchr(s, T('/')))
     s = tcsrchr(s, T('/')) + 1;
-#ifdef WIN32
+#if (defined(WIN32) || defined(__WATCOMC__))
   if (tcsrchr(s, T('\\')))
     s = tcsrchr(s, T('\\')) + 1;
 #endif

Index: xmlwf.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/xmlwf.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- xmlwf.c	14 Apr 2006 17:53:03 -0000	1.71
+++ xmlwf.c	5 Aug 2006 17:00:36 -0000	1.72
@@ -607,7 +607,7 @@
   const XML_Feature *features = XML_GetFeatureList();
   while ((ch = *s) != 0) {
     if (ch == '/'
-#ifdef WIN32
+#if (defined(WIN32) || defined(__WATCOMC__))
         || ch == '\\'
 #endif
         )
@@ -780,7 +780,7 @@
       const XML_Char *file = useStdin ? T("STDIN") : argv[i];
       if (tcsrchr(file, T('/')))
         file = tcsrchr(file, T('/')) + 1;
-#ifdef WIN32
+#if (defined(WIN32) || defined(__WATCOMC__))
       if (tcsrchr(file, T('\\')))
         file = tcsrchr(file, T('\\')) + 1;
 #endif



More information about the Expat-checkins mailing list