From 325d9186de574b0b85b79700372e6d60752fc8d2 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 12 Apr 2010 19:46:50 +0000 Subject: [PATCH] 2010-04-12 21:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * external/zlib/zlib.dif * contrib/hbmzip/minizip.dif * Updated .difs. + external/libhpdf/libhpdf.dif + Added new .dif. * contrib/hbide/ideprojmanager.prg % Deleted -hbcmp when creating .ppo. It was unnecessary since later -hbraw mode is selected. --- harbour/ChangeLog | 12 ++ harbour/contrib/hbide/ideprojmanager.prg | 1 - harbour/contrib/hbmzip/minizip.dif | 75 +++++--- harbour/external/libhpdf/libhpdf.dif | 13 ++ harbour/external/zlib/zlib.dif | 208 ++++++++++++++++++++--- 5 files changed, 260 insertions(+), 49 deletions(-) create mode 100644 harbour/external/libhpdf/libhpdf.dif diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7759003b7c..f9eae86656 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-12 21:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * external/zlib/zlib.dif + * contrib/hbmzip/minizip.dif + * Updated .difs. + + + external/libhpdf/libhpdf.dif + + Added new .dif. + + * contrib/hbide/ideprojmanager.prg + % Deleted -hbcmp when creating .ppo. It was unnecessary since + later -hbraw mode is selected. + 2010-04-12 21:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/external/zlib/deflate.c * harbour/external/zlib/gzread.c diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index aa6ccc939c..4a9a28604a 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -1188,7 +1188,6 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) IF ::lPPO IF !empty( oEdit := ::oEM:getEditorCurrent() ) IF hbide_isSourcePRG( oEdit:sourceFile ) - aadd( aHbp, "-hbcmp" ) aadd( aHbp, "-s" ) aadd( aHbp, "-p" ) aadd( aHbp, "-hbraw" ) diff --git a/harbour/contrib/hbmzip/minizip.dif b/harbour/contrib/hbmzip/minizip.dif index 6096f17aac..cfec3b7a9b 100644 --- a/harbour/contrib/hbmzip/minizip.dif +++ b/harbour/contrib/hbmzip/minizip.dif @@ -12,17 +12,16 @@ diff -u ori\crypt.h .\crypt.h } diff -u ori\ioapi.c .\ioapi.c --- ori\ioapi.c Mon Jan 04 11:31:24 2010 -+++ .\ioapi.c Fri Apr 09 20:09:02 2010 -@@ -14,6 +14,8 @@ - #define _CRT_SECURE_NO_WARNINGS ++++ .\ioapi.c Mon Apr 12 21:33:22 2010 +@@ -15,6 +15,7 @@ #endif -+#include "hbapifs.h" -+ #include "ioapi.h" ++#include "hbapifs.h" voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) -@@ -84,6 +86,9 @@ + { +@@ -84,6 +85,9 @@ { FILE* file = NULL; const char* mode_fopen = NULL; @@ -32,7 +31,7 @@ diff -u ori\ioapi.c .\ioapi.c if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) mode_fopen = "rb"; else -@@ -94,7 +99,7 @@ +@@ -94,7 +98,7 @@ mode_fopen = "wb"; if ((filename!=NULL) && (mode_fopen != NULL)) @@ -41,7 +40,7 @@ diff -u ori\ioapi.c .\ioapi.c return file; } -@@ -102,6 +107,9 @@ +@@ -102,6 +106,9 @@ { FILE* file = NULL; const char* mode_fopen = NULL; @@ -51,7 +50,7 @@ diff -u ori\ioapi.c .\ioapi.c if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) mode_fopen = "rb"; else -@@ -120,6 +128,9 @@ +@@ -120,6 +127,9 @@ static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) { uLong ret; @@ -61,7 +60,7 @@ diff -u ori\ioapi.c .\ioapi.c ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); return ret; } -@@ -127,6 +138,9 @@ +@@ -127,6 +137,9 @@ static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) { uLong ret; @@ -71,7 +70,7 @@ diff -u ori\ioapi.c .\ioapi.c ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); return ret; } -@@ -134,6 +148,9 @@ +@@ -134,6 +147,9 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) { long ret; @@ -81,7 +80,7 @@ diff -u ori\ioapi.c .\ioapi.c ret = ftell((FILE *)stream); return ret; } -@@ -142,14 +159,20 @@ +@@ -142,14 +158,20 @@ static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) { ZPOS64_T ret; @@ -103,7 +102,7 @@ diff -u ori\ioapi.c .\ioapi.c switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : -@@ -171,8 +194,11 @@ +@@ -171,8 +193,11 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { @@ -116,7 +115,7 @@ diff -u ori\ioapi.c .\ioapi.c switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : -@@ -198,6 +224,9 @@ +@@ -198,6 +223,9 @@ static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) { int ret; @@ -126,7 +125,7 @@ diff -u ori\ioapi.c .\ioapi.c ret = fclose((FILE *)stream); return ret; } -@@ -205,12 +234,14 @@ +@@ -205,12 +233,14 @@ static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) { int ret; @@ -145,21 +144,55 @@ diff -u ori\ioapi.c .\ioapi.c pzlib_filefunc_def->zread_file = fread_file_func; diff -u ori\ioapi.h .\ioapi.h --- ori\ioapi.h Mon Feb 15 05:59:40 2010 -+++ .\ioapi.h Sun Apr 11 13:49:40 2010 -@@ -44,6 +44,12 @@ ++++ .\ioapi.h Mon Apr 12 21:33:22 2010 +@@ -21,28 +21,31 @@ + #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 #include #include "zlib.h" - ++ +#if defined( __BORLANDC__ ) || \ + defined( __WATCOMC__ ) || \ + defined( __MINGW32CE__ ) +# define USE_FILE32API +#endif -+ + #if defined(USE_FILE32API) #define fopen64 fopen - #define ftello64 ftell -Only in .: minizip.dif Only in .: ori diff -u ori\unzip.c .\unzip.c --- ori\unzip.c Mon Feb 15 05:59:40 2010 diff --git a/harbour/external/libhpdf/libhpdf.dif b/harbour/external/libhpdf/libhpdf.dif new file mode 100644 index 0000000000..fec2ed848f --- /dev/null +++ b/harbour/external/libhpdf/libhpdf.dif @@ -0,0 +1,13 @@ +diff -u ori\hpdf_config.h .\hpdf_config.h +--- ori\hpdf_config.h Thu Sep 10 10:02:45 2009 ++++ .\hpdf_config.h Mon Apr 12 21:36:13 2010 +@@ -34,7 +34,7 @@ + #undef HAVE_SYS_TYPES_H + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++#undef HAVE_UNISTD_H + + /* define pi */ + #ifndef M_PI +Only in .: ori diff --git a/harbour/external/zlib/zlib.dif b/harbour/external/zlib/zlib.dif index 1f1686673d..d47f9c4af5 100644 --- a/harbour/external/zlib/zlib.dif +++ b/harbour/external/zlib/zlib.dif @@ -1,19 +1,57 @@ -diff -u ori\crc32.c .\crc32.c ---- ori\crc32.c Sun Apr 22 19:25:32 2007 -+++ .\crc32.c Fri Apr 09 14:31:57 2010 -@@ -19,6 +19,8 @@ - one thread to use crc32(). +diff -u ori\adler32.c .\adler32.c +--- ori\adler32.c Sun Aug 05 23:16:54 2007 ++++ .\adler32.c Fri Apr 09 14:44:23 2010 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h */ -+#define NOBYFOUR +-/* @(#) $Id$ */ ++/* @(#) $Id: adler32.c 14300 2010-04-09 12:44:20Z vszakats $ */ + + #include "zutil.h" + +diff -u ori\compress.c .\compress.c +--- ori\compress.c Sun Dec 11 12:27:30 2005 ++++ .\compress.c Fri Apr 09 14:44:23 2010 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: compress.c 14300 2010-04-09 12:44:20Z vszakats $ */ + + #define ZLIB_INTERNAL + #include "zlib.h" +diff -u ori\crc32.c .\crc32.c +--- ori\crc32.c Sun Apr 22 19:25:32 2007 ++++ .\crc32.c Fri Apr 09 14:44:23 2010 +@@ -9,7 +9,7 @@ + * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: crc32.c 14300 2010-04-09 12:44:20Z vszakats $ */ + + /* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore +@@ -18,6 +18,8 @@ + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + */ + ++#define NOBYFOUR + #ifdef MAKECRCH # include - # ifndef DYNAMIC_CRC_TABLE diff -u ori\deflate.c .\deflate.c --- ori\deflate.c Sat Feb 27 11:07:24 2010 -+++ .\deflate.c Fri Apr 09 14:40:46 2010 -@@ -51,6 +51,10 @@ ++++ .\deflate.c Mon Apr 12 21:33:16 2010 +@@ -47,10 +47,14 @@ + * + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: deflate.c 14324 2010-04-12 19:11:35Z druzus $ */ #include "deflate.h" @@ -50,16 +88,116 @@ diff -u ori\deflate.c .\deflate.c /* If the window is almost full and there is insufficient lookahead, * move the upper half to the lower one to make room in the upper half. */ +@@ -1743,7 +1748,7 @@ + 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 (;;) { +diff -u ori\deflate.h .\deflate.h +--- ori\deflate.h Sat Feb 27 11:06:28 2010 ++++ .\deflate.h Fri Apr 09 14:44:23 2010 +@@ -8,7 +8,7 @@ + subject to change. Applications should only use zlib.h. + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: deflate.h 14300 2010-04-09 12:44:20Z vszakats $ */ + + #ifndef DEFLATE_H + #define DEFLATE_H +diff -u ori\gzguts.h .\gzguts.h +--- ori\gzguts.h Sun Mar 14 10:23:52 2010 ++++ .\gzguts.h Mon Apr 12 21:33:16 2010 +@@ -27,9 +27,15 @@ + # define NO_GZCOMPRESS + #endif + +-#ifdef _MSC_VER +-# include +-# define vsnprintf _vsnprintf ++#if defined(MSDOS) || defined(OS2) || defined(WINDOWS) || defined(WIN32) ++# ifndef _WINCE ++# include ++# if defined(_MSC_VER) && !defined(__XCC__) ++# define vsnprintf _vsnprintf ++# endif ++# endif ++#else ++# include + #endif + + #ifndef local +diff -u ori\gzread.c .\gzread.c +--- ori\gzread.c Mon Mar 08 13:51:02 2010 ++++ .\gzread.c Mon Apr 12 21:33:16 2010 +@@ -166,12 +166,12 @@ + 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 @@ + 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 */ Only in .: ori -diff -u ori\zconf.h .\zconf.h ---- ori\zconf.h Sun Feb 21 16:38:24 2010 -+++ .\zconf.h Sat Apr 10 10:04:40 2010 +diff -u ori\trees.c .\trees.c +--- ori\trees.c Sat Feb 27 11:04:48 2010 ++++ .\trees.c Fri Apr 09 14:44:24 2010 +@@ -30,7 +30,7 @@ + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: trees.c 14300 2010-04-09 12:44:20Z vszakats $ */ + + /* #define GEN_TREES_H */ + +diff -u ori\uncompr.c .\uncompr.c +--- ori\uncompr.c Sun Jan 17 11:34:20 2010 ++++ .\uncompr.c Fri Apr 09 14:44:24 2010 @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id$ */ -+/* @(#) $Id: zconf.h 14300 2010-04-09 12:44:20Z vszakats $ */ ++/* @(#) $Id: uncompr.c 14300 2010-04-09 12:44:20Z vszakats $ */ + + #define ZLIB_INTERNAL + #include "zlib.h" +diff -u ori\zconf.h .\zconf.h +--- ori\zconf.h Sun Feb 21 16:38:24 2010 ++++ .\zconf.h Mon Apr 12 21:33:16 2010 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: zconf.h 14324 2010-04-12 19:11:35Z druzus $ */ #ifndef ZCONF_H #define ZCONF_H @@ -83,21 +221,18 @@ diff -u ori\zconf.h .\zconf.h # ifndef WIN32 # define WIN32 # endif -@@ -360,8 +371,10 @@ - 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 -Only in .: zlib.dif diff -u ori\zutil.c .\zutil.c --- ori\zutil.c Sat Jan 09 15:23:48 2010 -+++ .\zutil.c Fri Apr 09 14:35:47 2010 ++++ .\zutil.c Fri Apr 09 14:44:24 2010 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: zutil.c 14300 2010-04-09 12:44:20Z vszakats $ */ + + #include "zutil.h" + @@ -136,7 +136,7 @@ return ERR_MSG(err); } @@ -109,7 +244,16 @@ diff -u ori\zutil.c .\zutil.c * Its value is always 0 and should not be used. diff -u ori\zutil.h .\zutil.h --- ori\zutil.h Sun Mar 14 10:24:44 2010 -+++ .\zutil.h Fri Apr 09 14:37:01 2010 ++++ .\zutil.h Mon Apr 12 21:33:16 2010 +@@ -8,7 +8,7 @@ + subject to change. Applications should only use zlib.h. + */ + +-/* @(#) $Id$ */ ++/* @(#) $Id: zutil.h 14324 2010-04-12 19:11:35Z druzus $ */ + + #ifndef ZUTIL_H + #define ZUTIL_H @@ -17,7 +17,7 @@ #include "zlib.h" @@ -140,3 +284,13 @@ diff -u ori\zutil.h .\zutil.h # endif #endif +@@ -213,7 +217,8 @@ + # 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