From 9ef0571dd6320618a8d2e584cae8d93eddee0e72 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 1 Aug 2008 00:13:37 +0000 Subject: [PATCH] 2008-08-01 02:09 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbdefs.h ! Patch added to workaround following phoney warnings when using BCC 5.8 compiler (tested with 5.8.2): Warning W8017 C:\devl\BCC58\Include\stdint.h 77: Redefinition of 'INT16_MIN' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 78: Redefinition of 'INT32_MIN' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 79: Redefinition of 'INT64_MIN' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 82: Redefinition of 'INT16_MAX' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 83: Redefinition of 'INT32_MAX' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 84: Redefinition of 'INT64_MAX' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 87: Redefinition of 'UINT16_MAX' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 88: Redefinition of 'UINT32_MAX' is not identical Warning W8017 C:\devl\BCC58\Include\stdint.h 89: Redefinition of 'UINT64_MAX' is not identical Many thanks to Przemek for this patch. --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/include/hbdefs.h | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bfc1fa241a..d52f7f9a54 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,22 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-01 02:09 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * include/hbdefs.h + ! Patch added to workaround following phoney warnings + when using BCC 5.8 compiler (tested with 5.8.2): + Warning W8017 C:\devl\BCC58\Include\stdint.h 77: Redefinition of 'INT16_MIN' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 78: Redefinition of 'INT32_MIN' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 79: Redefinition of 'INT64_MIN' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 82: Redefinition of 'INT16_MAX' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 83: Redefinition of 'INT32_MAX' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 84: Redefinition of 'INT64_MAX' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 87: Redefinition of 'UINT16_MAX' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 88: Redefinition of 'UINT32_MAX' is not identical + Warning W8017 C:\devl\BCC58\Include\stdint.h 89: Redefinition of 'UINT64_MAX' is not identical + + Many thanks to Przemek for this patch. + 2008-07-31 23:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/hbsix/sxcompr.c * pacified warnings diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 9c4e27173c..cbb065fe82 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -64,9 +64,15 @@ #include "hbver.h" #if defined( __XCC__ ) || defined( __MINGW32__ ) || \ + ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 ) || \ ( defined( __GNUC__ ) && \ ( defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) ) ) -# include +# include + /* workaround for BCC 5.8 bug */ +# if ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 ) +# undef INT32_MIN +# define INT32_MIN ((int32_t) (-INT32_MAX-1)) +# endif #endif /*