From 8cbbdda5a0219d91a42784c6dde33967b837211b Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Fri, 29 Apr 2005 05:04:48 +0000 Subject: [PATCH] __64__ define use to detect building for 64 bits when using Microsoft C compiler --- harbour/include/hbinit.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/harbour/include/hbinit.h b/harbour/include/hbinit.h index 04dee1f048..02379c043e 100644 --- a/harbour/include/hbinit.h +++ b/harbour/include/hbinit.h @@ -137,13 +137,27 @@ extern void HB_EXPORT hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ) #define HB_INIT_SYMBOLS_BEGIN( func ) \ static HB_SYMB symbols[] = { - #define HB_INIT_SYMBOLS_END( func ) }; \ - static int func( void ) \ - { \ - hb_vmProcessSymbols( symbols, sizeof( symbols ) / sizeof( HB_SYMB ) ); \ - return 1; \ - } + #ifndef __64__ + #define HB_INIT_SYMBOLS_END( func ) }; \ + static int func( void ) \ + { \ + hb_vmProcessSymbols( symbols, sizeof( symbols ) / sizeof( HB_SYMB ) ); \ + return 1; \ + } + + #else + + #define HB_INIT_SYMBOLS_END( func ) }; \ + static int func( void ) \ + { \ + hb_vmProcessSymbols( symbols, sizeof( symbols ) / sizeof( HB_SYMB ) ); \ + return 1; \ + } \ + static int static_int_##func = func(); + + #endif + #define HB_CALL_ON_STARTUP_BEGIN( func ) \ static int func( void ) {