2010-06-14 14:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbffind.c
* src/rtl/fstemp.c
* src/rtl/filesys.c
* src/rtl/fssize.c
! Fixed to use '#define _LARGEFILE64_SOURCE 1' instead of
'define _LARGEFILE64_SOURCE' to fix compilation on QNX.
This replaced previously added hack for stat64 in two
locations.
* src/rtl/hbzlibgz.c
! Protected gzungetc() and gzclearerr() calls with 'ZLIB_VERNUM >= 0x1202'
; QNX 6.2.1 ships with zlib 1.1.3.
* src/rtl/gttrm/gttrm.c
! Added fix to compile when SA_RESTART is not available (in QNX).
; TOFIX: Replace this with some more meaningful solution.
* src/rtl/hbzlib.c
! Fixed to compile when compressBound() is not available.
The detection is hackish because proper zlib version detection
is not available here yet.
* src/rtl/hbznet.c
! Fixed to build with older zlib versions where Z_RLE and/or
Z_FIXED are not available.
* include/hbdefs.h
! Fixed stdint handling for QNX.
This commit is contained in:
@@ -16,6 +16,36 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-14 14:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/common/hbffind.c
|
||||
* src/rtl/fstemp.c
|
||||
* src/rtl/filesys.c
|
||||
* src/rtl/fssize.c
|
||||
! Fixed to use '#define _LARGEFILE64_SOURCE 1' instead of
|
||||
'define _LARGEFILE64_SOURCE' to fix compilation on QNX.
|
||||
This replaced previously added hack for stat64 in two
|
||||
locations.
|
||||
|
||||
* src/rtl/hbzlibgz.c
|
||||
! Protected gzungetc() and gzclearerr() calls with 'ZLIB_VERNUM >= 0x1202'
|
||||
; QNX 6.2.1 ships with zlib 1.1.3.
|
||||
|
||||
* src/rtl/gttrm/gttrm.c
|
||||
! Added fix to compile when SA_RESTART is not available (in QNX).
|
||||
; TOFIX: Replace this with some more meaningful solution.
|
||||
|
||||
* src/rtl/hbzlib.c
|
||||
! Fixed to compile when compressBound() is not available.
|
||||
The detection is hackish because proper zlib version detection
|
||||
is not available here yet.
|
||||
|
||||
* src/rtl/hbznet.c
|
||||
! Fixed to build with older zlib versions where Z_RLE and/or
|
||||
Z_FIXED are not available.
|
||||
|
||||
* include/hbdefs.h
|
||||
! Fixed stdint handling for QNX.
|
||||
|
||||
2010-06-14 11:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* INSTALL
|
||||
* include/hbsetup.h
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
( __DJGPP__ > 2 || ( __DJGPP__ == 2 && __DJGPP_MINOR__ >= 4 ) ) ) || \
|
||||
defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) || \
|
||||
defined( HB_OS_BSD ) || defined( HB_OS_SUNOS ) || \
|
||||
defined( HB_OS_BEOS ) ) )
|
||||
defined( HB_OS_BEOS ) || defined( HB_OS_QNX ) ) )
|
||||
#include <stdint.h>
|
||||
/* workaround for BCC 5.8 bug */
|
||||
#if ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 )
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
*/
|
||||
|
||||
#if !defined( _LARGEFILE64_SOURCE )
|
||||
# define _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include "hbapi.h"
|
||||
@@ -729,7 +729,7 @@ static HB_BOOL hb_fsFindNextLow( PHB_FFIND ffind )
|
||||
{
|
||||
time_t ftime;
|
||||
struct tm lt;
|
||||
#if defined( HB_USE_LARGEFILE64 ) && ! defined( HB_OS_QNX )
|
||||
#if defined( HB_USE_LARGEFILE64 )
|
||||
struct stat64 sStat;
|
||||
if( stat64( dirname, &sStat ) == 0 )
|
||||
#else
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
/* *nixes */
|
||||
#if !defined( _LARGEFILE64_SOURCE )
|
||||
# define _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
#if !defined( _GNU_SOURCE )
|
||||
# define _GNU_SOURCE
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
*/
|
||||
|
||||
#if !defined( _LARGEFILE64_SOURCE )
|
||||
# define _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include "hbapi.h"
|
||||
@@ -96,7 +96,7 @@ HB_FOFFSET hb_fsFSize( const char * pszFileName, HB_BOOL bUseDirEntry )
|
||||
hb_fsFindClose( ffind );
|
||||
return size;
|
||||
}
|
||||
#elif defined( HB_USE_LARGEFILE64 ) && ! defined( HB_OS_QNX )
|
||||
#elif defined( HB_USE_LARGEFILE64 )
|
||||
char * pszFree;
|
||||
HB_BOOL fResult;
|
||||
struct stat64 statbuf;
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/* *nixes */
|
||||
#if !defined( _LARGEFILE64_SOURCE )
|
||||
# define _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
#if !defined( _GNU_SOURCE )
|
||||
# define _GNU_SOURCE
|
||||
|
||||
@@ -641,7 +641,11 @@ static void set_sig_handler( int iSig )
|
||||
|
||||
sigaction( iSig, 0, &act );
|
||||
act.sa_handler = sig_handler;
|
||||
#if defined( SA_RESTART )
|
||||
act.sa_flags = SA_RESTART | ( iSig == SIGCHLD ? SA_NOCLDSTOP : 0 );
|
||||
#else
|
||||
act.sa_flags = ( iSig == SIGCHLD ? SA_NOCLDSTOP : 0 );
|
||||
#endif
|
||||
sigaction( iSig, &act, 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
/* Try to figure if we have this function. Z_RLE was introduced in 1.2.0.1,
|
||||
while compressBound() was added in 1.2.0. This means we have to miss
|
||||
compressBound() when using zlib 1.2.0. [vszakats] */
|
||||
#if defined( Z_RLE )
|
||||
#define _HB_Z_COMPRESSBOUND
|
||||
#endif
|
||||
|
||||
static HB_SIZE hb_zlibUncompressedSize( const char * szSrc, HB_SIZE ulLen,
|
||||
int * piResult )
|
||||
{
|
||||
@@ -112,9 +119,17 @@ HB_FUNC( HB_ZLIBVERSION )
|
||||
HB_FUNC( HB_ZCOMPRESSBOUND )
|
||||
{
|
||||
if( HB_ISCHAR( 1 ) )
|
||||
#if defined( _HB_Z_COMPRESSBOUND )
|
||||
hb_retnint( compressBound( hb_parclen( 1 ) ) );
|
||||
#else
|
||||
hb_retnint( 0 );
|
||||
#endif
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
#if defined( _HB_Z_COMPRESSBOUND )
|
||||
hb_retnint( compressBound( ( uLong ) hb_parnint( 1 ) ) );
|
||||
#else
|
||||
hb_retnint( 0 );
|
||||
#endif
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
@@ -172,7 +187,11 @@ HB_FUNC( HB_ZCOMPRESS )
|
||||
else
|
||||
{
|
||||
ulDstLen = HB_ISNUM( 2 ) ? ( uLong ) hb_parnint( 2 ) :
|
||||
#if defined( _HB_Z_COMPRESSBOUND )
|
||||
compressBound( ulLen );
|
||||
#else
|
||||
0;
|
||||
#endif
|
||||
pDest = ( char * ) hb_xalloc( ulDstLen + 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -276,9 +276,11 @@ HB_FUNC( HB_GZUNGETC )
|
||||
{
|
||||
if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
#if ZLIB_VERNUM >= 0x1202
|
||||
gzFile gz = hb_gzParam( 2 );
|
||||
if( gz )
|
||||
hb_retni( gzungetc( hb_parni( 1 ), gz ) );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -372,7 +374,9 @@ HB_FUNC( HB_GZERROR )
|
||||
*/
|
||||
HB_FUNC( HB_GZCLEARERR )
|
||||
{
|
||||
#if ZLIB_VERNUM >= 0x1202
|
||||
gzFile gz = hb_gzParam( 1 );
|
||||
if( gz )
|
||||
gzclearerr( gz );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -125,9 +125,13 @@ PHB_ZNETSTREAM hb_znetOpen( int level, int strategy )
|
||||
level = Z_DEFAULT_COMPRESSION;
|
||||
|
||||
if( strategy != Z_FILTERED &&
|
||||
strategy != Z_HUFFMAN_ONLY &&
|
||||
#if defined( Z_RLE )
|
||||
strategy != Z_RLE &&
|
||||
strategy != Z_FIXED )
|
||||
#endif
|
||||
#if defined( Z_FIXED )
|
||||
strategy != Z_FIXED &&
|
||||
#endif
|
||||
strategy != Z_HUFFMAN_ONLY )
|
||||
strategy = Z_DEFAULT_STRATEGY;
|
||||
|
||||
if( deflateInit2( &pStream->wr, level,
|
||||
|
||||
Reference in New Issue
Block a user