mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
Remove __DJGPP__ checks
Drop broken support for DJGPP.
This commit is contained in:
parent
2489c1d024
commit
3f8655db97
@ -627,7 +627,7 @@ parseSAXFile(char *filename) {
|
||||
if (push) {
|
||||
FILE *f;
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
@ -657,7 +657,7 @@ parseSAXFile(char *filename) {
|
||||
fclose(f);
|
||||
}
|
||||
if (!noout) {
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
@ -721,7 +721,7 @@ parseAndPrintFile(char *filename) {
|
||||
if (push) {
|
||||
FILE *f;
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
|
@ -1012,7 +1012,7 @@ parseAndPrintFile(char *filename) {
|
||||
/*
|
||||
* Empty callbacks for checking
|
||||
*/
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
@ -1041,7 +1041,7 @@ parseAndPrintFile(char *filename) {
|
||||
/*
|
||||
* Debug callback
|
||||
*/
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
|
38
xmlIO.c
38
xmlIO.c
@ -190,7 +190,7 @@ static const char *IOerr[] = {
|
||||
"unknown address family", /* EAFNOSUPPORT */
|
||||
};
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
/**
|
||||
* __xmlIOWin32UTF8ToWChar:
|
||||
* @u8String: uft-8 string
|
||||
@ -595,7 +595,7 @@ xmlPopOutputCallbacks(void)
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
|
||||
/**
|
||||
* xmlWrapOpenUtf8:
|
||||
@ -696,7 +696,7 @@ int
|
||||
xmlCheckFilename (const char *path)
|
||||
{
|
||||
#ifdef HAVE_STAT
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
struct _stat stat_buffer;
|
||||
#else
|
||||
struct stat stat_buffer;
|
||||
@ -706,7 +706,7 @@ xmlCheckFilename (const char *path)
|
||||
return(0);
|
||||
|
||||
#ifdef HAVE_STAT
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
/*
|
||||
* On Windows stat and wstat do not work with long pathname,
|
||||
* which start with '\\?\'
|
||||
@ -837,20 +837,20 @@ xmlFileOpen_real (const char *filename) {
|
||||
}
|
||||
|
||||
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) {
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[17];
|
||||
#else
|
||||
path = &filename[16];
|
||||
#endif
|
||||
} else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[8];
|
||||
#else
|
||||
path = &filename[7];
|
||||
#endif
|
||||
} else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) {
|
||||
/* lots of generators seems to lazy to read RFC 1738 */
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[6];
|
||||
#else
|
||||
path = &filename[5];
|
||||
@ -863,7 +863,7 @@ xmlFileOpen_real (const char *filename) {
|
||||
return(NULL);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
fd = xmlWrapOpenUtf8(path, 0);
|
||||
#else
|
||||
fd = fopen(path, "r");
|
||||
@ -919,13 +919,13 @@ xmlFileOpenW (const char *filename) {
|
||||
}
|
||||
|
||||
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[17];
|
||||
#else
|
||||
path = &filename[16];
|
||||
#endif
|
||||
else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[8];
|
||||
#else
|
||||
path = &filename[7];
|
||||
@ -936,7 +936,7 @@ xmlFileOpenW (const char *filename) {
|
||||
if (path == NULL)
|
||||
return(NULL);
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
fd = xmlWrapOpenUtf8(path, 1);
|
||||
#elif(__MVS__)
|
||||
fd = fopen(path, "w");
|
||||
@ -1109,13 +1109,13 @@ xmlGzfileOpen_real (const char *filename) {
|
||||
}
|
||||
|
||||
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[17];
|
||||
#else
|
||||
path = &filename[16];
|
||||
#endif
|
||||
else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[8];
|
||||
#else
|
||||
path = &filename[7];
|
||||
@ -1128,7 +1128,7 @@ xmlGzfileOpen_real (const char *filename) {
|
||||
if (!xmlCheckFilename(path))
|
||||
return(NULL);
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
fd = xmlWrapGzOpenUtf8(path, "rb");
|
||||
#else
|
||||
fd = gzopen(path, "rb");
|
||||
@ -1188,13 +1188,13 @@ xmlGzfileOpenW (const char *filename, int compression) {
|
||||
}
|
||||
|
||||
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[17];
|
||||
#else
|
||||
path = &filename[16];
|
||||
#endif
|
||||
else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &filename[8];
|
||||
#else
|
||||
path = &filename[7];
|
||||
@ -1205,7 +1205,7 @@ xmlGzfileOpenW (const char *filename, int compression) {
|
||||
if (path == NULL)
|
||||
return(NULL);
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
fd = xmlWrapGzOpenUtf8(path, mode);
|
||||
#else
|
||||
fd = gzopen(path, mode);
|
||||
@ -3891,13 +3891,13 @@ static int xmlNoNetExists(const char *URL) {
|
||||
return(0);
|
||||
|
||||
if (!xmlStrncasecmp(BAD_CAST URL, BAD_CAST "file://localhost/", 17))
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &URL[17];
|
||||
#else
|
||||
path = &URL[16];
|
||||
#endif
|
||||
else if (!xmlStrncasecmp(BAD_CAST URL, BAD_CAST "file:///", 8)) {
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#if defined (_WIN32)
|
||||
path = &URL[8];
|
||||
#else
|
||||
path = &URL[7];
|
||||
|
@ -2202,7 +2202,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
||||
if ((filename[0] == '-') && (filename[1] == 0)) {
|
||||
f = stdin;
|
||||
} else {
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#elif defined(__OS400__)
|
||||
f = fopen(filename, "rb");
|
||||
@ -2278,7 +2278,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
||||
if ((filename[0] == '-') && (filename[1] == 0)) {
|
||||
f = stdin;
|
||||
} else {
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#elif defined(__OS400__)
|
||||
f = fopen(filename, "rb");
|
||||
@ -2327,7 +2327,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
||||
} else {
|
||||
FILE *f;
|
||||
|
||||
#if defined(_WIN32) || defined (__DJGPP__)
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#elif defined(__OS400__)
|
||||
f = fopen(filename, "rb");
|
||||
|
Loading…
x
Reference in New Issue
Block a user