diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b7b1f27e66..473f8ef43a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,21 @@ past entries belonging to author(s): Viktor Szakats. */ +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. + This is needed to allow for ugly hack to disable these. + + * contrib/hbfimage/fi_wrp.c + ! Added terrible hack to make them build on non-win platforms. + ; dos/djgpp and probably os2/gcc would work, but there I wasn't + interested enough to add extra logic to handle each special + case. + ; non-linux/darwin *nixes should be tested. + + * contrib/hbfimage/Makefile + + Enabled for linux and darwin. + 2009-09-11 16:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbfbird/Makefile * contrib/rddsql/sddfb/Makefile diff --git a/harbour/contrib/hbfimage/Makefile b/harbour/contrib/hbfimage/Makefile index 1dcecc1d26..2f5fdea33b 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 -# 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 +# on dos and os2 it doesn't compile with watcom +_DET_FLT_PLAT := !dos !os2 _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 b38980ebec..afd64a30a8 100644 --- a/harbour/contrib/hbfimage/fi_wrp.c +++ b/harbour/contrib/hbfimage/fi_wrp.c @@ -65,6 +65,13 @@ #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 1ca693bbd0..a319c03ee6 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -189,36 +189,36 @@ #if ! defined( HB_DONT_DEFINE_BOOL ) #undef BOOL /* boolean */ - typedef int BOOL; + #define BOOL int #endif #undef UINT /* varies with platform */ - typedef unsigned int UINT; + #define UINT unsigned int #undef SCHAR /* 1 byte signed */ - typedef signed char SCHAR; + #define SCHAR signed char #undef UCHAR /* 1 byte unsigned */ - typedef unsigned char UCHAR; + #define UCHAR unsigned char #if ! defined( HB_DONT_DEFINE_BYTE ) #undef BYTE /* 1 byte unsigned */ - typedef unsigned char BYTE; + #define BYTE unsigned char #endif #undef SHORT /* 2 bytes signed */ - typedef signed short int SHORT; + #define SHORT signed short int #undef USHORT /* 2 bytes unsigned */ - typedef unsigned short int USHORT; + #define USHORT unsigned short int #if ! defined( HB_DONT_DEFINE_LONG ) #undef LONG /* 4 or 8 bytes signed */ - typedef long LONG; + #define LONG long #endif #undef ULONG /* 4 or 8 bytes unsigned */ - typedef unsigned long ULONG; + #define ULONG unsigned long #undef FALSE #define FALSE 0