From a6284ec5c13cd9751cb5f0d6e64f5b1353ecd6a8 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 27 Nov 2007 10:31:28 +0000 Subject: [PATCH] 2007-11-27 11:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/hbmain.c * make all hb_compI18n*() functions which do not need external access static - now only hb_compI18nAdd() is public function. If it will be necessary to make other functions public then we will make it but please always try to declare new functions as static if it's not necessary to access them externally - it helps in future modifications because we do not have to worry about external code which may access some functions. * harbour/config/hpux/gcc.cf * added commented -mlp64 GCC switch to CFLAGS and LDFLAGS - this switch forces 64-bit mode in HP-UX on IA64 * harbour/source/common/hbwince.c + added wrapper for LocalHandle() and direct translation for LocalLock() * harbour/config/w32/cemgw.cf + added commdlg, commctrl, luuid and ole32 to linked library list for some contrib code --- harbour/ChangeLog | 21 +++++++++++++++++++++ harbour/config/hpux/gcc.cf | 6 +++++- harbour/config/w32/cemgw.cf | 2 ++ harbour/source/common/hbwince.c | 9 ++++++--- harbour/source/compiler/hbmain.c | 8 +++----- 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 88bcc48f11..c673404f38 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,27 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-27 11:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/compiler/hbmain.c + * make all hb_compI18n*() functions which do not need external access + static - now only hb_compI18nAdd() is public function. If it will + be necessary to make other functions public then we will make it + but please always try to declare new functions as static if it's + not necessary to access them externally - it helps in future + modifications because we do not have to worry about external + code which may access some functions. + + * harbour/config/hpux/gcc.cf + * added commented -mlp64 GCC switch to CFLAGS and LDFLAGS - this + switch forces 64-bit mode in HP-UX on IA64 + + * harbour/source/common/hbwince.c + + added wrapper for LocalHandle() and direct translation for LocalLock() + + * harbour/config/w32/cemgw.cf + + added commdlg, commctrl, luuid and ole32 to linked library list + for some contrib code + 2007-11-27 10:36 UTC+0100 J. Lefebvre Mafact (jfl/at/mafact.com) * source/common/hbfsapi.c added a check for HB_WINCE for using "FILE_ATTRIBUTE_DEVICE" diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index a26a32ce20..79f3a64cfa 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -15,11 +15,15 @@ CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = -DHB_OS_HPUX -Wall -W +LDFLAGS = # uncomment this if you want to farce relocateable code for .so libs # it's necessary on some platforms but can reduce performance #CFLAGS += -fPIC +# uncomment this if you want to force creating 64bit binaries on IA64 +#CFLAGS += -mlp64 +#LDFLAGS = -mlp64 LD = $(HB_CCACHE) gcc LD_OUT = -o @@ -78,7 +82,7 @@ endif LINKLIBS += -lm -lrt -LDFLAGS = $(LINKPATHS) +LDFLAGS += $(LINKPATHS) AR = ar ARFLAGS = $(A_USR) diff --git a/harbour/config/w32/cemgw.cf b/harbour/config/w32/cemgw.cf index 01bf243fac..ccebd5c714 100644 --- a/harbour/config/w32/cemgw.cf +++ b/harbour/config/w32/cemgw.cf @@ -64,6 +64,8 @@ endif #SYSLIBS = -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 \ # -lole32 -loleaut32 -luuid -lmpr -lwsock32 -lws2_32 -lmapi32 SYSLIBS = -lwininet -lws2 +# for contribs +SYSLIBS += -lcommdlg -lcommctrl -luuid -lole32 # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every echo command will be separated by LF diff --git a/harbour/source/common/hbwince.c b/harbour/source/common/hbwince.c index e22662ca5f..d7548978d9 100644 --- a/harbour/source/common/hbwince.c +++ b/harbour/source/common/hbwince.c @@ -656,9 +656,7 @@ BOOL WINAPI SetKeyboardState( PBYTE p ) #if !defined( _MSC_VER ) || defined( __POCC__ ) || defined( __XCC__ ) PVOID WINAPI LocalLock( HLOCAL h ) { - HB_SYMBOL_UNUSED( h ); - - return NULL; + return ( PVOID ) h; } BOOL WINAPI LocalUnlock( HLOCAL h ) @@ -667,6 +665,11 @@ BOOL WINAPI LocalUnlock( HLOCAL h ) return FALSE; } + +HLOCAL WINAPI LocalHandle( LPCVOID p ) +{ + return ( HLOCAL ) p; +} #endif /* !_MSC_VER || __POCC__ || __XCC__ */ BOOL WINAPI Arc( HDC h, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8 ) diff --git a/harbour/source/compiler/hbmain.c b/harbour/source/compiler/hbmain.c index 09d496ea84..f2c4aa9d87 100644 --- a/harbour/source/compiler/hbmain.c +++ b/harbour/source/compiler/hbmain.c @@ -4012,7 +4012,7 @@ void hb_compCodeBlockRewind( HB_COMP_DECL ) #ifdef HB_I18N_SUPPORT /* ============================ I18N ============================ */ -PHB_I18NTABLE hb_compI18nCreate( void ) +static PHB_I18NTABLE hb_compI18nCreate( void ) { PHB_I18NTABLE pI18n; @@ -4023,8 +4023,7 @@ PHB_I18NTABLE hb_compI18nCreate( void ) return pI18n; } - -void hb_compI18nFree( PHB_I18NTABLE pI18n ) +static void hb_compI18nFree( PHB_I18NTABLE pI18n ) { UINT ui; @@ -4072,7 +4071,6 @@ static int hb_compI18nCompare( PHB_I18NSTRING pString, const char* pText, const return i; } - void hb_compI18nAdd( HB_COMP_DECL, const char* szText, const char* szContext, UINT uiLine ) { PHB_I18NTABLE pI18n; @@ -4150,7 +4148,7 @@ void hb_compI18nAdd( HB_COMP_DECL, const char* szText, const char* szContext, UI } -BOOL hb_compI18nSave( HB_COMP_DECL ) +static BOOL hb_compI18nSave( HB_COMP_DECL ) { PHB_I18NTABLE pI18n; PHB_I18NSTRING pString;