From 0573ff8ab9bcc565c3bfcf693dadb19d4d5ce885 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 11 Sep 2009 17:35:07 +0000 Subject: [PATCH] 2009-09-11 19:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h * contrib/hbfimage/fi_wrp.c * contrib/hbfimage/Makefile ! Reverted prev. It does all sort of strange things. ; TODO: So the only way is the proper fix: Cleaning Harbour source from BOOL, BYTE, LONG, ULONG and all other 'legacy' types. --- harbour/ChangeLog | 9 +++++++++ harbour/contrib/hbfimage/Makefile | 4 ++-- harbour/contrib/hbfimage/fi_wrp.c | 7 ------- harbour/include/hbdefs.h | 18 +++++++++--------- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 473f8ef43a..d36d2700a5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-11 19:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbdefs.h + * contrib/hbfimage/fi_wrp.c + * contrib/hbfimage/Makefile + ! Reverted prev. It does all sort of strange things. + ; TODO: So the only way is the proper fix: Cleaning Harbour + source from BOOL, BYTE, LONG, ULONG and all other + 'legacy' types. + 2009-09-11 17:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h * Using #define instead of typedef for legacy core types. diff --git a/harbour/contrib/hbfimage/Makefile b/harbour/contrib/hbfimage/Makefile index 2f5fdea33b..1dcecc1d26 100644 --- a/harbour/contrib/hbfimage/Makefile +++ b/harbour/contrib/hbfimage/Makefile @@ -20,8 +20,8 @@ PRG_HEADERS := \ _DET_DSP_NAME := freeimage _DET_VAR_INC_ := HB_INC_FREEIMAGE _DET_VAR_HAS_ := HB_HAS_FREEIMAGE -# on dos and os2 it doesn't compile with watcom -_DET_FLT_PLAT := !dos !os2 +# disabled until a proper solution is found for type collision (except for dos where it's not supported at all) +_DET_FLT_PLAT := !dos !os2 !linux !darwin _DET_FLT_COMP := _DET_INC_DEFP := /usr/include /opt/local/include _DET_INC_HEAD := /FreeImage.h diff --git a/harbour/contrib/hbfimage/fi_wrp.c b/harbour/contrib/hbfimage/fi_wrp.c index afd64a30a8..b38980ebec 100644 --- a/harbour/contrib/hbfimage/fi_wrp.c +++ b/harbour/contrib/hbfimage/fi_wrp.c @@ -65,13 +65,6 @@ #include "config.h" #endif -#if ! defined( HB_OS_WIN ) - /* NOTE: Terrible hack until we clean Harbour from these types completely. */ - #undef BOOL - #undef BYTE - #undef LONG -#endif - #include "FreeImage.h" /* ************************* WRAPPED FUNCTIONS ****************************** */ diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index a319c03ee6..1ca693bbd0 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -189,36 +189,36 @@ #if ! defined( HB_DONT_DEFINE_BOOL ) #undef BOOL /* boolean */ - #define BOOL int + typedef int BOOL; #endif #undef UINT /* varies with platform */ - #define UINT unsigned int + typedef unsigned int UINT; #undef SCHAR /* 1 byte signed */ - #define SCHAR signed char + typedef signed char SCHAR; #undef UCHAR /* 1 byte unsigned */ - #define UCHAR unsigned char + typedef unsigned char UCHAR; #if ! defined( HB_DONT_DEFINE_BYTE ) #undef BYTE /* 1 byte unsigned */ - #define BYTE unsigned char + typedef unsigned char BYTE; #endif #undef SHORT /* 2 bytes signed */ - #define SHORT signed short int + typedef signed short int SHORT; #undef USHORT /* 2 bytes unsigned */ - #define USHORT unsigned short int + typedef unsigned short int USHORT; #if ! defined( HB_DONT_DEFINE_LONG ) #undef LONG /* 4 or 8 bytes signed */ - #define LONG long + typedef long LONG; #endif #undef ULONG /* 4 or 8 bytes unsigned */ - #define ULONG unsigned long + typedef unsigned long ULONG; #undef FALSE #define FALSE 0