diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5227f74135..ac508a4428 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-25 12:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbsetup.h + + use FORCEINLINE defined in compiler header files + + * harbour/src/vm/fm.c + * do not redefine FORCEINLINE if it's already defined in compiler + header files + 2010-03-25 10:38 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbsetup.h + added HB_FORCEINLINE macro diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 2eb2f36501..9e04ba7328 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -525,13 +525,16 @@ #define _HB_INLINE_ inline #endif -#if defined(__GNUC__) && ((__GNUC__ > 3) || \ - ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2))) +#if defined( __GNUC__ ) && \ + ( ( __GNUC__ > 3 ) || ( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 2 ) ) ) #define HB_FORCEINLINE __inline__ __attribute__((always_inline)) -#elif defined(_MSC_VER) && (_MSC_VER >= 1200) +#elif ( defined( _MSC_VER ) && ( _MSC_VER >= 1200 ) ) || \ + ( defined( __POCC__ ) && ( __POCC__ >= 300 ) ) #define HB_FORCEINLINE __forceinline -# else +#elif defined( FORCEINLINE ) + #define HB_FORCEINLINE FORCEINLINE +#else #define HB_FORCEINLINE _HB_INLINE_ -# endif +#endif #endif /* HB_SETUP_H_ */ diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index b00f78bd83..3f94d48889 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -139,7 +139,9 @@ /* # define NO_MALLINFO 1 */ /* # define INSECURE */ /* # define USE_DL_PREFIX */ -# define FORCEINLINE HB_FORCEINLINE +# if !defined( FORCEINLINE ) +# define FORCEINLINE HB_FORCEINLINE +# endif # define REALLOC_ZERO_BYTES_FREES # if defined( HB_MT_VM ) # if defined( HB_SPINLOCK_R )