From 02f58540b35b9d818e8472eaca9f5b03d01e719a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 27 Oct 2011 12:32:30 +0000 Subject: [PATCH] 2011-10-27 14:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbexpat/core.c ! fixed two errors in conditional code for <=1.95.8 expat versions ! fixed buggy version checking macro ; Patch by Raphael. Thank you. * contrib/hbhpdf/hbhpdf.h * contrib/hbgd/gdwrp.c ! applied above fix to similarly wrong version checking macros. --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/hbexpat/core.c | 6 +++--- harbour/contrib/hbgd/gdwrp.c | 2 +- harbour/contrib/hbhpdf/hbhpdf.h | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3af898b364..c8ac73c048 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2011-10-27 14:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbexpat/core.c + ! fixed two errors in conditional code for <=1.95.8 expat versions + ! fixed buggy version checking macro + ; Patch by Raphael. Thank you. + + * contrib/hbhpdf/hbhpdf.h + * contrib/hbgd/gdwrp.c + ! applied above fix to similarly wrong version checking macros. + 2011-10-27 12:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.h * harbour/src/rtl/gtxwc/gtxwc.c diff --git a/harbour/contrib/hbexpat/core.c b/harbour/contrib/hbexpat/core.c index 34ac0ab055..dae8149689 100644 --- a/harbour/contrib/hbexpat/core.c +++ b/harbour/contrib/hbexpat/core.c @@ -69,7 +69,7 @@ #include "expat.h" -#define HB_EXPAT_VERS( ma, mi, mu ) ( XML_MAJOR_VERSION >= ma && XML_MINOR_VERSION >= mi && XML_MICRO_VERSION >= mu ) +#define HB_EXPAT_VERS( ma, mi, mu ) ( XML_MAJOR_VERSION > ma || ( XML_MAJOR_VERSION == ma && ( XML_MINOR_VERSION > mi || ( XML_MINOR_VERSION == mi && XML_MICRO_VERSION >= mu ) ) ) ) #include "hbapi.h" #include "hbapiitm.h" @@ -1166,8 +1166,8 @@ HB_FUNC( XML_GETPARSINGSTATUS ) XML_GetParsingStatus( hb_expat->parser, &status ); - hb_storni( ( int ) status->parsing, 2 ); - hb_storl( ( HB_BOOL ) status->finalBuffer, 3 ); + hb_storni( ( int ) status.parsing, 2 ); + hb_storl( ( HB_BOOL ) status.finalBuffer, 3 ); #else hb_storni( -1, 2 ); hb_storl( HB_FALSE, 3 ); diff --git a/harbour/contrib/hbgd/gdwrp.c b/harbour/contrib/hbgd/gdwrp.c index 8cb722d82d..0db4b9d04a 100644 --- a/harbour/contrib/hbgd/gdwrp.c +++ b/harbour/contrib/hbgd/gdwrp.c @@ -76,7 +76,7 @@ #include "gdfontl.h" #include "gdfontg.h" -#define HB_GD_VERS( ma, mi, re ) ( GD_MAJOR_VERSION >= ma && GD_MINOR_VERSION >= mi && GD_RELEASE_VERSION >= re ) +#define HB_GD_VERS( ma, mi, mu ) ( GD_MAJOR_VERSION > ma || ( GD_MAJOR_VERSION == ma && ( GD_MINOR_VERSION > mi || ( GD_MINOR_VERSION == mi && GD_RELEASE_VERSION >= mu ) ) ) ) #define IMAGE_JPEG 1 #define IMAGE_GIF 2 diff --git a/harbour/contrib/hbhpdf/hbhpdf.h b/harbour/contrib/hbhpdf/hbhpdf.h index c854b051fe..7dca2c8062 100644 --- a/harbour/contrib/hbhpdf/hbhpdf.h +++ b/harbour/contrib/hbhpdf/hbhpdf.h @@ -56,7 +56,7 @@ #include "hpdf.h" -#define HB_HPDF_VERS( ma, mi, re ) ( HPDF_MAJOR_VERSION >= ma && HPDF_MINOR_VERSION >= mi && HPDF_BUGFIX_VERSION >= re ) +#define HB_HPDF_VERS( ma, mi, mu ) ( HPDF_MAJOR_VERSION > ma || ( HPDF_MAJOR_VERSION == ma && ( HPDF_MINOR_VERSION > mi || ( HPDF_MINOR_VERSION == mi && HPDF_BUGFIX_VERSION >= mu ) ) ) ) HB_EXTERN_BEGIN