mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Applied following patches from Robert Collins and make sure IN_LIBXML is
* libxml.h: Applied following patches from Robert Collins and make sure IN_LIBXML is defined when compiling it ------- * include/libxml/xmlversion.h.in (LIBXML_DLL_IMPORT): Use on Cygwin as well as Visual C. * parser.c (XML_DIR_SEP): Don't use '\\' for Cygwin. * parserInternals.c (XML_DIR_SEP): Don't use '\\' for Cygwin. * strio.c (PLATFORM_UNIX): Define for Cygwin. * triodef.h (TRIO_PLATFORM_UNIX): Define for Cygwin. * xmlIO.c (xmlFileOpen): Use unix behaviour for Cygwin. Use binary mode opens for Cygwin (xmlFileOpenW xmlParserGetDirectory xmlSysIDExists xmlNoNetExists). * xmllint.c: Don't include winsock2.h for Cygwin. Daniel
This commit is contained in:
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
|||||||
|
Tue Jan 8 11:32:30 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* libxml.h: Applied following patches from Robert Collins
|
||||||
|
and make sure IN_LIBXML is defined when compiling it
|
||||||
|
-------
|
||||||
|
* include/libxml/xmlversion.h.in (LIBXML_DLL_IMPORT): Use on Cygwin
|
||||||
|
as well as Visual C.
|
||||||
|
* parser.c (XML_DIR_SEP): Don't use '\\' for Cygwin.
|
||||||
|
* parserInternals.c (XML_DIR_SEP): Don't use '\\' for Cygwin.
|
||||||
|
* strio.c (PLATFORM_UNIX): Define for Cygwin.
|
||||||
|
* triodef.h (TRIO_PLATFORM_UNIX): Define for Cygwin.
|
||||||
|
* xmlIO.c (xmlFileOpen): Use unix behaviour for Cygwin.
|
||||||
|
Use binary mode opens for Cygwin (xmlFileOpenW xmlParserGetDirectory
|
||||||
|
xmlSysIDExists xmlNoNetExists).
|
||||||
|
* xmllint.c: Don't include winsock2.h for Cygwin.
|
||||||
|
|
||||||
Mon Jan 7 17:52:48 CET 2002 Daniel Veillard <daniel@veillard.com>
|
Mon Jan 7 17:52:48 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* parser.c: Jirka Kosek pointer out a bug in xmlParseTextDecl()
|
* parser.c: Jirka Kosek pointer out a bug in xmlParseTextDecl()
|
||||||
|
@ -198,7 +198,7 @@ extern void xmlCheckVersion(int version);
|
|||||||
* code which links against libxml statically.
|
* code which links against libxml statically.
|
||||||
*/
|
*/
|
||||||
#ifndef LIBXML_DLL_IMPORT
|
#ifndef LIBXML_DLL_IMPORT
|
||||||
#if defined(_MSC_VER) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
#if (defined(_MSC_VER) || defined(__CYGWIN__)) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||||
#define LIBXML_DLL_IMPORT __declspec(dllimport)
|
#define LIBXML_DLL_IMPORT __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
#define LIBXML_DLL_IMPORT
|
#define LIBXML_DLL_IMPORT
|
||||||
|
1
libxml.h
1
libxml.h
@ -30,5 +30,6 @@
|
|||||||
#define TRIO_REPLACE_STDIO
|
#define TRIO_REPLACE_STDIO
|
||||||
#include "trio.h"
|
#include "trio.h"
|
||||||
#endif
|
#endif
|
||||||
|
#define IN_LIBXML
|
||||||
|
|
||||||
#endif /* ! __XML_LIBXML_H__ */
|
#endif /* ! __XML_LIBXML_H__ */
|
||||||
|
2
parser.c
2
parser.c
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "libxml.h"
|
#include "libxml.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(WIN32) && !defined (__CYGWIN__)
|
||||||
#define XML_DIR_SEP '\\'
|
#define XML_DIR_SEP '\\'
|
||||||
#else
|
#else
|
||||||
#define XML_DIR_SEP '/'
|
#define XML_DIR_SEP '/'
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "libxml.h"
|
#include "libxml.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(WIN32) && !defined (__CYGWIN__)
|
||||||
#define XML_DIR_SEP '\\'
|
#define XML_DIR_SEP '\\'
|
||||||
#else
|
#else
|
||||||
#define XML_DIR_SEP '/'
|
#define XML_DIR_SEP '/'
|
||||||
|
2
strio.c
2
strio.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
static const char rcsid[] = "@(#)$Id$";
|
static const char rcsid[] = "@(#)$Id$";
|
||||||
|
|
||||||
#if defined(unix) || defined(__xlC__) || defined(__QNX__)
|
#if defined(unix) || defined(__xlC__) || defined(__QNX__) || defined(__CYGWIN__)
|
||||||
# define PLATFORM_UNIX
|
# define PLATFORM_UNIX
|
||||||
#elif defined(WIN32) || defined(_WIN32)
|
#elif defined(WIN32) || defined(_WIN32)
|
||||||
# define PLATFORM_WIN32
|
# define PLATFORM_WIN32
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
# define TRIO_PLATFORM_UNIX
|
# define TRIO_PLATFORM_UNIX
|
||||||
#elif defined(__QNX__)
|
#elif defined(__QNX__)
|
||||||
# define TRIO_PLATFORM_UNIX
|
# define TRIO_PLATFORM_UNIX
|
||||||
|
#elif defined(__CYGWIN__)
|
||||||
|
# define TRIO_PLATFORM_UNIX
|
||||||
#elif defined(AMIGA) && defined(TRIO_COMPILER_GCC)
|
#elif defined(AMIGA) && defined(TRIO_COMPILER_GCC)
|
||||||
# define TRIO_PLATFORM_UNIX
|
# define TRIO_PLATFORM_UNIX
|
||||||
#elif defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32)
|
#elif defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32)
|
||||||
|
16
xmlIO.c
16
xmlIO.c
@ -294,7 +294,7 @@ xmlFileOpen (const char *filename) {
|
|||||||
if (!strncmp(filename, "file://localhost", 16))
|
if (!strncmp(filename, "file://localhost", 16))
|
||||||
path = &filename[16];
|
path = &filename[16];
|
||||||
else if (!strncmp(filename, "file:///", 8)) {
|
else if (!strncmp(filename, "file:///", 8)) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
path = &filename[8];
|
path = &filename[8];
|
||||||
#else
|
#else
|
||||||
path = &filename[7];
|
path = &filename[7];
|
||||||
@ -307,7 +307,7 @@ xmlFileOpen (const char *filename) {
|
|||||||
if (!xmlCheckFilename(path))
|
if (!xmlCheckFilename(path))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(WIN32) || defined (__CYGWIN__)
|
||||||
fd = fopen(path, "rb");
|
fd = fopen(path, "rb");
|
||||||
#else
|
#else
|
||||||
fd = fopen(path, "r");
|
fd = fopen(path, "r");
|
||||||
@ -337,7 +337,7 @@ xmlFileOpenW (const char *filename) {
|
|||||||
if (!strncmp(filename, "file://localhost", 16))
|
if (!strncmp(filename, "file://localhost", 16))
|
||||||
path = &filename[16];
|
path = &filename[16];
|
||||||
else if (!strncmp(filename, "file:///", 8)) {
|
else if (!strncmp(filename, "file:///", 8)) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
path = &filename[8];
|
path = &filename[8];
|
||||||
#else
|
#else
|
||||||
path = &filename[7];
|
path = &filename[7];
|
||||||
@ -454,7 +454,7 @@ xmlGzfileOpen (const char *filename) {
|
|||||||
if (!strncmp(filename, "file://localhost", 16))
|
if (!strncmp(filename, "file://localhost", 16))
|
||||||
path = &filename[16];
|
path = &filename[16];
|
||||||
else if (!strncmp(filename, "file:///", 8)) {
|
else if (!strncmp(filename, "file:///", 8)) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
path = &filename[8];
|
path = &filename[8];
|
||||||
#else
|
#else
|
||||||
path = &filename[7];
|
path = &filename[7];
|
||||||
@ -496,7 +496,7 @@ xmlGzfileOpenW (const char *filename, int compression) {
|
|||||||
if (!strncmp(filename, "file://localhost", 16))
|
if (!strncmp(filename, "file://localhost", 16))
|
||||||
path = &filename[16];
|
path = &filename[16];
|
||||||
else if (!strncmp(filename, "file:///", 8)) {
|
else if (!strncmp(filename, "file:///", 8)) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
path = &filename[8];
|
path = &filename[8];
|
||||||
#else
|
#else
|
||||||
path = &filename[7];
|
path = &filename[7];
|
||||||
@ -2387,7 +2387,7 @@ xmlParserGetDirectory(const char *filename) {
|
|||||||
xmlRegisterDefaultInputCallbacks();
|
xmlRegisterDefaultInputCallbacks();
|
||||||
|
|
||||||
if (filename == NULL) return(NULL);
|
if (filename == NULL) return(NULL);
|
||||||
#ifdef WIN32
|
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||||
sep = '\\';
|
sep = '\\';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2430,7 +2430,7 @@ static int xmlSysIDExists(const char *URL) {
|
|||||||
if (!strncmp(URL, "file://localhost", 16))
|
if (!strncmp(URL, "file://localhost", 16))
|
||||||
path = &URL[16];
|
path = &URL[16];
|
||||||
else if (!strncmp(URL, "file:///", 8)) {
|
else if (!strncmp(URL, "file:///", 8)) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
path = &URL[8];
|
path = &URL[8];
|
||||||
#else
|
#else
|
||||||
path = &URL[7];
|
path = &URL[7];
|
||||||
@ -2617,7 +2617,7 @@ xmlNoNetExists(const char *URL)
|
|||||||
if (!xmlStrncmp(BAD_CAST URL, BAD_CAST "file://localhost", 16))
|
if (!xmlStrncmp(BAD_CAST URL, BAD_CAST "file://localhost", 16))
|
||||||
path = &URL[16];
|
path = &URL[16];
|
||||||
else if (!xmlStrncmp(BAD_CAST URL, BAD_CAST "file:///", 8)) {
|
else if (!xmlStrncmp(BAD_CAST URL, BAD_CAST "file:///", 8)) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
path = &URL[8];
|
path = &URL[8];
|
||||||
#else
|
#else
|
||||||
path = &URL[7];
|
path = &URL[7];
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) && !defined(__CYGWIN__)
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#pragma comment(lib, "ws2_32.lib")
|
#pragma comment(lib, "ws2_32.lib")
|
||||||
|
Reference in New Issue
Block a user