From 474db3774f91faf280c7d793fc92774fc80548e5 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sun, 8 Nov 2009 15:50:52 +0000 Subject: [PATCH] 2009-11-08 16:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbdefs.h ! fixed PHB_FUNC declaration. 'extern "C"' can be removed only for BORLAND and other buggy compilers which may not accept it but not for. In some platforms it's very important to keep correct declarations because without this flag final binaries will not work. --- harbour/ChangeLog | 8 ++++++++ harbour/include/hbdefs.h | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 67b73f36c1..443ba03dd6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-08 16:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbdefs.h + ! fixed PHB_FUNC declaration. 'extern "C"' can be removed only for + BORLAND and other buggy compilers which may not accept it but + not for. In some platforms it's very important to keep correct + declarations because without this flag final binaries will not + work. + 2009-11-08 09:42 UTC-0600 Teo Fonrouge (teo/at/windtelsoft/dot/com) * ChangeLog ! Fixed wrong placing of my previous entry on ChangeLog diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index f3211ffb79..f68ce3ee0a 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -1609,8 +1609,13 @@ typedef unsigned char HB_U8; #define HARBOUR void #endif -typedef HARBOUR ( * PHB_FUNC )( void ); -typedef PHB_FUNC HB_FUNC_PTR; +#if defined( __BORLANDC__ ) + typedef HARBOUR ( * PHB_FUNC )( void ); + typedef PHB_FUNC HB_FUNC_PTR; +#else + HB_EXTERN_C_ typedef HARBOUR ( * PHB_FUNC )( void ); + HB_EXTERN_C_ typedef PHB_FUNC HB_FUNC_PTR; +#endif typedef SHORT HB_SYMBOLSCOPE; /* stores symbol's scope */