Fixed zlib build for WEC7.
errno in zutil.c is leftover, and not used anymore -> removed. In gzguts.h qfunctions_wince.h are included. To use this header qglobal.h is needed. In qfunctions_wince.h a special define section is added for zlib. Task-number: QTBUG-22507 Change-Id: I78ec78d22e2930a03b349a47ab3a3ad077277c42 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
e9a201fee2
commit
10830e8446
5
src/3rdparty/zlib/gzguts.h
vendored
5
src/3rdparty/zlib/gzguts.h
vendored
@ -33,6 +33,9 @@
|
||||
#endif
|
||||
#if !defined(_WIN32_WCE)
|
||||
# include <fcntl.h>
|
||||
#else
|
||||
# include <qglobal.h>
|
||||
# include <qfunctions_wince.h>
|
||||
#endif
|
||||
|
||||
#ifdef NO_DEFLATE /* for compatibility with old definition */
|
||||
@ -40,7 +43,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if !defined(_WIN32_WCE)
|
||||
# include <io.h>
|
||||
# endif
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
|
8
src/3rdparty/zlib/zutil.c
vendored
8
src/3rdparty/zlib/zutil.c
vendored
@ -136,14 +136,6 @@ const char * ZEXPORT zError(err)
|
||||
return ERR_MSG(err);
|
||||
}
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
/* The Microsoft C Run-Time Library for Windows CE doesn't have
|
||||
* errno. We define it as a global variable to simplify porting.
|
||||
* Its value is always 0 and should not be used.
|
||||
*/
|
||||
int errno = 0;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMCPY
|
||||
|
||||
void ZLIB_INTERNAL zmemcpy(dest, source, len)
|
||||
|
@ -182,6 +182,16 @@ void qt_wince_rewind( FILE *stream );
|
||||
int qt_wince___fileno(FILE *);
|
||||
FILE *qt_wince_tmpfile( void );
|
||||
|
||||
//For zlib we need these helper functions, but they break the build when
|
||||
//set globally, so just set them for zlib use
|
||||
#ifdef ZLIB_H
|
||||
#define open qt_wince_open
|
||||
#define close qt_wince__close
|
||||
#define lseek qt_wince__lseek
|
||||
#define read qt_wince__read
|
||||
#define write qt_wince__write
|
||||
#endif
|
||||
|
||||
int qt_wince__mkdir(const char *dirname);
|
||||
int qt_wince__rmdir(const char *dirname);
|
||||
int qt_wince__access( const char *path, int pmode );
|
||||
|
Loading…
x
Reference in New Issue
Block a user