2010-04-12 21:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/external/zlib/deflate.c
* harbour/external/zlib/gzread.c
* pacified warnings
* harbour/external/zlib/zutil.h
! fixed to compile with XCC
* harbour/external/zlib/zconf.h
! removed wrongly added #if 0 / #endif
* harbour/external/zlib/gzguts.h
! added missing header files to fix _ALL_ builds
* harbour/external/zlib/Makefile
* reenabled warnings - it's very danger to pacify warnings in such way
what recent ZLIB update clearly shows - it was seriously broken in all
builds due to missing header files with valid function declarations
but the problem was fully hidden because C++ mode and warnings were
disabled so no problem was reported at compile time.
Please also remember that many of Windows compilers does not fully
support pure ANSI C function declaration so this new library may
not work as expected.
* harbour/external/libhpdf/hpdfcfg.h
! removed setting for all platforms HAVE_UNISTD_H
this file was generated by autoconf on platform which has <unistd.h>
but we cannot leave it because it will break all code which uses
standard autoconf settings like HAVE_UNISTD_H and is compiled
on platform where <unistd.h> is not available
* harbour/contrib/hbmzip/ioapi.c
! fixed to include ioapi.h before any other header files - it uses
some feature macros which have to be set before including standard
C files
* harbour/contrib/hbmzip/ioapi.h
! removed from feature set macros setting of internal __USE_* ones
! do not set _LARGEFILE64_SOURCE in DOS and OS2 - macro with the same
name is used by new ZLIB 1.2.4 for explicit 64 bit gzip API.
* harbour/contrib/hbmzip/hbmzip.c
! fixed old typos in type of return value in hb_zipfileParam() and
hb_unzipfileParam()
NOTE: I haven't tested if this new mzip/zlib 64 bit file IO support
works. It's even possible that previously working code in 64 bit
platforms (except Win64 on all other 64 bit platforms 'long' is
64bit integer) stopped to work so please make real tests.
This commit is contained in:
@@ -17,6 +17,50 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-04-12 21:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/external/zlib/deflate.c
|
||||
* harbour/external/zlib/gzread.c
|
||||
* pacified warnings
|
||||
* harbour/external/zlib/zutil.h
|
||||
! fixed to compile with XCC
|
||||
* harbour/external/zlib/zconf.h
|
||||
! removed wrongly added #if 0 / #endif
|
||||
* harbour/external/zlib/gzguts.h
|
||||
! added missing header files to fix _ALL_ builds
|
||||
* harbour/external/zlib/Makefile
|
||||
* reenabled warnings - it's very danger to pacify warnings in such way
|
||||
what recent ZLIB update clearly shows - it was seriously broken in all
|
||||
builds due to missing header files with valid function declarations
|
||||
but the problem was fully hidden because C++ mode and warnings were
|
||||
disabled so no problem was reported at compile time.
|
||||
Please also remember that many of Windows compilers does not fully
|
||||
support pure ANSI C function declaration so this new library may
|
||||
not work as expected.
|
||||
|
||||
* harbour/external/libhpdf/hpdfcfg.h
|
||||
! removed setting for all platforms HAVE_UNISTD_H
|
||||
this file was generated by autoconf on platform which has <unistd.h>
|
||||
but we cannot leave it because it will break all code which uses
|
||||
standard autoconf settings like HAVE_UNISTD_H and is compiled
|
||||
on platform where <unistd.h> is not available
|
||||
|
||||
* harbour/contrib/hbmzip/ioapi.c
|
||||
! fixed to include ioapi.h before any other header files - it uses
|
||||
some feature macros which have to be set before including standard
|
||||
C files
|
||||
* harbour/contrib/hbmzip/ioapi.h
|
||||
! removed from feature set macros setting of internal __USE_* ones
|
||||
! do not set _LARGEFILE64_SOURCE in DOS and OS2 - macro with the same
|
||||
name is used by new ZLIB 1.2.4 for explicit 64 bit gzip API.
|
||||
* harbour/contrib/hbmzip/hbmzip.c
|
||||
! fixed old typos in type of return value in hb_zipfileParam() and
|
||||
hb_unzipfileParam()
|
||||
|
||||
NOTE: I haven't tested if this new mzip/zlib 64 bit file IO support
|
||||
works. It's even possible that previously working code in 64 bit
|
||||
platforms (except Win64 on all other 64 bit platforms 'long' is
|
||||
64bit integer) stopped to work so please make real tests.
|
||||
|
||||
2010-04-12 11:08 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added feature to allow -inc mode when using harbour compiler
|
||||
|
||||
@@ -102,7 +102,7 @@ static const HB_GC_FUNCS s_gcZipFileFuncs =
|
||||
};
|
||||
|
||||
|
||||
static gzFile hb_zipfileParam( int iParam )
|
||||
static zipFile hb_zipfileParam( int iParam )
|
||||
{
|
||||
zipFile* phZip = ( zipFile* ) hb_parptrGC( &s_gcZipFileFuncs, iParam );
|
||||
|
||||
@@ -132,7 +132,7 @@ static const HB_GC_FUNCS s_gcUnZipFileFuncs =
|
||||
};
|
||||
|
||||
|
||||
static gzFile hb_unzipfileParam( int iParam )
|
||||
static unzFile hb_unzipfileParam( int iParam )
|
||||
{
|
||||
unzFile* phUnzip = ( unzFile* ) hb_parptrGC( &s_gcUnZipFileFuncs, iParam );
|
||||
|
||||
|
||||
@@ -14,9 +14,8 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include "hbapifs.h"
|
||||
|
||||
#include "ioapi.h"
|
||||
#include "hbapifs.h"
|
||||
|
||||
voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
|
||||
{
|
||||
|
||||
@@ -21,23 +21,20 @@
|
||||
#ifndef _ZLIBIOAPI64_H
|
||||
#define _ZLIBIOAPI64_H
|
||||
|
||||
#if (!defined(_WIN32)) && (!defined(WIN32))
|
||||
#if !(defined(_WIN32) || defined(WIN32)) && \
|
||||
!(defined(__MSDOS__) || defined(MSDOS)) && \
|
||||
!(defined(OS_2) || defined(__OS2__) || defined(OS2))
|
||||
|
||||
// Linux needs this to support file operation on files larger then 4+GB
|
||||
// But might need better if/def to select just the platforms that needs them.
|
||||
|
||||
#ifndef __USE_FILE_OFFSET64
|
||||
#define __USE_FILE_OFFSET64
|
||||
#endif
|
||||
#ifndef __USE_LARGEFILE64
|
||||
#define __USE_LARGEFILE64
|
||||
#endif
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BIT
|
||||
#define _FILE_OFFSET_BIT 64
|
||||
#endif
|
||||
/* Linux needs this to support file operation on files larger then 4+GB
|
||||
* on 32bit platforms
|
||||
* But might need better if/def to select just the platforms that needs them.
|
||||
*/
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BIT
|
||||
#define _FILE_OFFSET_BIT 64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
2
harbour/external/libhpdf/hpdfcfg.h
vendored
2
harbour/external/libhpdf/hpdfcfg.h
vendored
@@ -34,7 +34,7 @@
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* define pi */
|
||||
#ifndef M_PI
|
||||
|
||||
1
harbour/external/zlib/Makefile
vendored
1
harbour/external/zlib/Makefile
vendored
@@ -8,7 +8,6 @@ include $(TOP)$(ROOT)config/global.mk
|
||||
|
||||
LIBNAME := hbzlib
|
||||
|
||||
HB_BUILD_WARN := no
|
||||
HB_BUILD_MODE := c
|
||||
|
||||
C_SOURCES := \
|
||||
|
||||
2
harbour/external/zlib/deflate.c
vendored
2
harbour/external/zlib/deflate.c
vendored
@@ -1748,7 +1748,7 @@ local block_state deflate_rle(s, flush)
|
||||
int flush;
|
||||
{
|
||||
int bflush; /* set if current block must be flushed */
|
||||
uInt prev; /* byte at distance one to match */
|
||||
Byte prev; /* byte at distance one to match */
|
||||
Bytef *scan, *strend; /* scan goes up to strend for length of run */
|
||||
|
||||
for (;;) {
|
||||
|
||||
12
harbour/external/zlib/gzguts.h
vendored
12
harbour/external/zlib/gzguts.h
vendored
@@ -27,9 +27,15 @@
|
||||
# define NO_GZCOMPRESS
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
# define vsnprintf _vsnprintf
|
||||
#if defined(MSDOS) || defined(OS2) || defined(WINDOWS) || defined(WIN32)
|
||||
# ifndef _WINCE
|
||||
# include <io.h>
|
||||
# if defined(_MSC_VER) && !defined(__XCC__)
|
||||
# define vsnprintf _vsnprintf
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
|
||||
16
harbour/external/zlib/gzread.c
vendored
16
harbour/external/zlib/gzread.c
vendored
@@ -166,12 +166,12 @@ local int gz_head(state)
|
||||
gz_error(state, Z_DATA_ERROR, "unknown header flags set");
|
||||
return -1;
|
||||
}
|
||||
NEXT(); /* modification time */
|
||||
NEXT();
|
||||
NEXT();
|
||||
NEXT();
|
||||
NEXT(); /* extra flags */
|
||||
NEXT(); /* operating system */
|
||||
(void) NEXT(); /* modification time */
|
||||
(void) NEXT();
|
||||
(void) NEXT();
|
||||
(void) NEXT();
|
||||
(void) NEXT(); /* extra flags */
|
||||
(void) NEXT(); /* operating system */
|
||||
if (flags & 4) { /* extra field */
|
||||
len = (unsigned)NEXT();
|
||||
len += (unsigned)NEXT() << 8;
|
||||
@@ -186,8 +186,8 @@ local int gz_head(state)
|
||||
while (NEXT() > 0)
|
||||
;
|
||||
if (flags & 2) { /* header crc */
|
||||
NEXT();
|
||||
NEXT();
|
||||
(void) NEXT();
|
||||
(void) NEXT();
|
||||
}
|
||||
/* an unexpected end of file is not checked for here -- it will be
|
||||
noticed on the first request for uncompressed data */
|
||||
|
||||
2
harbour/external/zlib/zconf.h
vendored
2
harbour/external/zlib/zconf.h
vendored
@@ -371,11 +371,9 @@ typedef uLong FAR uLongf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_HAVE_UNISTD_H
|
||||
# include <sys/types.h> /* for off_t */
|
||||
|
||||
3
harbour/external/zlib/zutil.h
vendored
3
harbour/external/zlib/zutil.h
vendored
@@ -217,7 +217,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
# ifdef WIN32
|
||||
/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
|
||||
# if !defined(vsnprintf) && !defined(NO_vsnprintf)
|
||||
# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
|
||||
# if !defined(_MSC_VER) || \
|
||||
( defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__XCC__) )
|
||||
# define vsnprintf _vsnprintf
|
||||
# endif
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user