mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Fix windows build
This commit is contained in:
parent
74eb54b5b7
commit
6c61e0204b
9
xmlIO.c
9
xmlIO.c
@ -613,6 +613,7 @@ xmlWrapOpenUtf8(const char *path,int mode)
|
||||
return fd;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ZLIB_H
|
||||
static gzFile
|
||||
xmlWrapGzOpenUtf8(const char *path, const char *mode)
|
||||
{
|
||||
@ -638,6 +639,7 @@ xmlWrapGzOpenUtf8(const char *path, const char *mode)
|
||||
|
||||
return fd;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlWrapStatUtf8:
|
||||
@ -705,9 +707,10 @@ typedef int (* xmlWrapStatFunc) (const char *f, struct stat *s);
|
||||
static xmlWrapStatFunc xmlWrapStat = xmlWrapStatNative;
|
||||
typedef FILE* (* xmlWrapOpenFunc)(const char *f,int mode);
|
||||
static xmlWrapOpenFunc xmlWrapOpen = xmlWrapOpenNative;
|
||||
#ifdef HAVE_ZLIB_H
|
||||
typedef gzFile (* xmlWrapGzOpenFunc) (const char *f, const char *mode);
|
||||
static xmlWrapGzOpenFunc xmlWrapGzOpen = gzopen;
|
||||
|
||||
#endif
|
||||
/**
|
||||
* xmlInitPlatformSpecificIo:
|
||||
*
|
||||
@ -727,11 +730,15 @@ xmlInitPlatformSpecificIo(void)
|
||||
if(GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)) {
|
||||
xmlWrapStat = xmlWrapStatUtf8;
|
||||
xmlWrapOpen = xmlWrapOpenUtf8;
|
||||
#ifdef HAVE_ZLIB_H
|
||||
xmlWrapGzOpen = xmlWrapGzOpenUtf8;
|
||||
#endif
|
||||
} else {
|
||||
xmlWrapStat = xmlWrapStatNative;
|
||||
xmlWrapOpen = xmlWrapOpenNative;
|
||||
#ifdef HAVE_ZLIB_H
|
||||
xmlWrapGzOpen = gzopen;
|
||||
#endif
|
||||
}
|
||||
|
||||
xmlPlatformIoInitialized = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user