mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
Porting libxml2 on zOS encoding of code
First set of patches for zOS - entities.c parser.c tree.c xmlschemas.c xmlschemastypes.c xpath.c xpointer.c: ask conversion of code to ISO Latin 1 to avoid having the compiler assume EBCDIC codepoint for characters. - xmlmodule.c: make sure we have support for modules - xmlIO.c: zOS path names are special avoid dsome of the expectstions from Unix/Windows
This commit is contained in:
parent
3aca7f31cb
commit
454e397eb7
@ -6,6 +6,11 @@
|
||||
* daniel@veillard.com
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
5
parser.c
5
parser.c
@ -30,6 +30,11 @@
|
||||
* daniel@veillard.com
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
5
tree.c
5
tree.c
@ -10,6 +10,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
9
xmlIO.c
9
xmlIO.c
@ -926,8 +926,11 @@ xmlFileOpen_real (const char *filename) {
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Do not check DDNAME on zOS ! */
|
||||
#if !defined(__MVS__)
|
||||
if (!xmlCheckFilename(path))
|
||||
return(NULL);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
||||
fd = xmlWrapOpen(path, 0);
|
||||
@ -1004,11 +1007,13 @@ xmlFileOpenW (const char *filename) {
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
||||
fd = xmlWrapOpen(path, 1);
|
||||
#elif(__MVS__)
|
||||
fd = fopen(path, "w");
|
||||
#else
|
||||
fd = fopen(path, "wb");
|
||||
fd = fopen(path, "wb");
|
||||
#endif /* WIN32 */
|
||||
|
||||
if (fd == NULL) xmlIOErr(0, path);
|
||||
if (fd == NULL) xmlIOErr(0, path);
|
||||
return((void *) fd);
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
@ -8,6 +8,11 @@
|
||||
* http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html
|
||||
*/
|
||||
|
||||
/* In order RTLD_GLOBAL and RTLD_NOW to be defined on zOS */
|
||||
#if defined(__MVS__)
|
||||
#define _UNIX03_SOURCE
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
@ -44,6 +44,12 @@
|
||||
* but is done here due to performance. Move it to an other layer
|
||||
* is schema construction via an API is implemented.
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
@ -7,6 +7,11 @@
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
5
xpath.c
5
xpath.c
@ -14,6 +14,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
@ -14,6 +14,11 @@
|
||||
* daniel@veillard.com
|
||||
*/
|
||||
|
||||
/* To avoid EBCDIC trouble when parsing on zOS */
|
||||
#if defined(__MVS__)
|
||||
#pragma convert("ISO8859-1")
|
||||
#endif
|
||||
|
||||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user