From b308f56ac25f8b4570c4198ef36f0986311efdc4 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 10 Dec 2009 20:49:23 +0000 Subject: [PATCH] 2009-12-10 21:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbatomic.h * removed 'static inline' from OpenWatcom ASM functions defined by '#pragma aux ...' to make OpenWatcom < 1.8 happy. Version 1.8 ignores 'static inline' attributes in such declarations. * harbour/config/dos/watcom.mk * harbour/utils/hbmk2/hbmk2.prg * switched from DOS/4GW to DOS/32A extender. It's faster what is noticeable also in final Harbour binaries, does not have DOS4G command line limitations and has nice tools which allow to easy set different runtime parameters (ss.exe) or compress final executable (sc.exe) BTW people having problem with maximum command line size in OpenWatcom tools can replace DOS/4GW with DOS/32A in this tools It can be made also globally by coping dos32a.exe to dos4gw.exe. NOTE: I've found why DOS Harbour OpenWatcom application created in my Linux box were not working. Just simply the directory with DOS extender setup files was not in PATH. Creating DOS OpenWatcom applications in other systems (i.e. Linux or OS2) do not forget to add directory with DOS binaries '%WATCOM%\binw' to PATH after directory with platform native OpenWatcom binaries '%WATCOM%\bin*' or copy DOS extender (dos32a.exe) to one of PATH directories. * harbour/config/dos/watcom.mk * added workaround for not included automatically by linker CLIB library when Harbour is compiler in pure C mode. I hope it's only temporary hack which we can remove in the future. I haven't added it to hbmk2 so linking DOS applications using hbmk2 user will have to add -lclib3r to hbmk2 parameters. * harbour/config/common/watcom.mk * disable DOS/32A banner messages --- harbour/ChangeLog | 35 +++++++++++++++++++++++++++++++++ harbour/config/common/watcom.mk | 2 ++ harbour/config/dos/watcom.mk | 14 +++++++------ harbour/include/hbatomic.h | 6 +++--- harbour/utils/hbmk2/hbmk2.prg | 2 +- 5 files changed, 49 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c2861bd30e..c05ad85720 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,41 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-10 21:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbatomic.h + * removed 'static inline' from OpenWatcom ASM functions defined + by '#pragma aux ...' to make OpenWatcom < 1.8 happy. + Version 1.8 ignores 'static inline' attributes in such declarations. + + * harbour/config/dos/watcom.mk + * harbour/utils/hbmk2/hbmk2.prg + * switched from DOS/4GW to DOS/32A extender. It's faster what is + noticeable also in final Harbour binaries, does not have DOS4G + command line limitations and has nice tools which allow to easy + set different runtime parameters (ss.exe) or compress final + executable (sc.exe) + BTW people having problem with maximum command line size in + OpenWatcom tools can replace DOS/4GW with DOS/32A in this tools + It can be made also globally by coping dos32a.exe to dos4gw.exe. + NOTE: I've found why DOS Harbour OpenWatcom application created + in my Linux box were not working. Just simply the directory + with DOS extender setup files was not in PATH. + Creating DOS OpenWatcom applications in other systems (i.e. + Linux or OS2) do not forget to add directory with DOS binaries + '%WATCOM%\binw' to PATH after directory with platform native + OpenWatcom binaries '%WATCOM%\bin*' or copy DOS extender + (dos32a.exe) to one of PATH directories. + + * harbour/config/dos/watcom.mk + * added workaround for not included automatically by linker CLIB + library when Harbour is compiler in pure C mode. I hope it's only + temporary hack which we can remove in the future. I haven't added + it to hbmk2 so linking DOS applications using hbmk2 user will have + to add -lclib3r to hbmk2 parameters. + + * harbour/config/common/watcom.mk + * disable DOS/32A banner messages + 2009-12-10 21:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbqt_slots.h - Deleted unnecessary headers. diff --git a/harbour/config/common/watcom.mk b/harbour/config/common/watcom.mk index 4bd9721b0e..ea7195c5aa 100644 --- a/harbour/config/common/watcom.mk +++ b/harbour/config/common/watcom.mk @@ -94,6 +94,8 @@ ifeq ($(ANYDOS),yes) # disable DOS/4GW Banner export DOS4G := quiet + # disable DOS/32A Banner + export DOS32A := /NOC # work arround to DOS command line size limit ifeq ($(CC),wcc386) diff --git a/harbour/config/dos/watcom.mk b/harbour/config/dos/watcom.mk index d2ae1b4095..9a56bd4f11 100644 --- a/harbour/config/dos/watcom.mk +++ b/harbour/config/dos/watcom.mk @@ -51,12 +51,14 @@ LD := wlink ifeq ($(HB_BUILD_DEBUG),yes) LDFLAGS += DEBUG ALL endif -# different SYS values: dos4g (default), pmodew (commercial), causeway -ifeq ($(LIBNAME),hbpp) - # we force causeway here as workaround for reduced command line size in dos4g - LDFLAGS += SYS causeway -else - LDFLAGS += SYS dos4g OP stub=wstubq.exe + +# different SYS values: dos4g (default), pmodew (commercial), causeway, +# dos32a (DOS/32A LE executable), dos32x (DOS/32A LX executable) +LDFLAGS += SYS dos32a + +# workaround for not included automatically CLIB in pure C mode builds +ifeq ($(CC),wcc386) + LDFLAGS += LIB clib3r.lib endif LDLIBS := $(HB_USER_LIBS) diff --git a/harbour/include/hbatomic.h b/harbour/include/hbatomic.h index f8e4713e27..a3f5db1493 100644 --- a/harbour/include/hbatomic.h +++ b/harbour/include/hbatomic.h @@ -299,12 +299,12 @@ HB_EXTERN_BEGIN # if HB_COUNTER_SIZE == 4 - static inline void hb_atomic_inc32( volatile int * p ); + void hb_atomic_inc32( volatile int * p ); #pragma aux hb_atomic_inc32 = \ "lock inc dword ptr [eax]" \ parm [ eax ] modify exact [] ; - static inline unsigned char hb_atomic_dec32( volatile int * p ); + unsigned char hb_atomic_dec32( volatile int * p ); #pragma aux hb_atomic_dec32 = \ "lock dec dword ptr [eax]", \ "setne al" \ @@ -321,7 +321,7 @@ HB_EXTERN_BEGIN # endif - static inline int hb_spinlock_trylock( volatile int * p ); + int hb_spinlock_trylock( volatile int * p ); #pragma aux hb_spinlock_trylock = \ "mov eax, 1", \ "xchg eax, dword ptr [edx]" \ diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 9b2e3d6a63..6e75164d33 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2774,7 +2774,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) DO CASE CASE hbmk[ _HBMK_cPLAT ] == "linux" ; cOpt_Link := "OP quiet SYS linux {FL} NAME {OE} {LO} {DL} {LL} {LB}{SCRIPT}" CASE hbmk[ _HBMK_cPLAT ] == "win" ; cOpt_Link := "OP quiet {FL} NAME {OE} {LO} {DL} {LL} {LB} {LS}{SCRIPT}" - CASE hbmk[ _HBMK_cPLAT ] == "dos" ; cOpt_Link := "OP quiet SYS dos4g OP stub=wstubq.exe {FL} NAME {OE} {LO} {DL} {LL} {LB}{SCRIPT}" + CASE hbmk[ _HBMK_cPLAT ] == "dos" ; cOpt_Link := "OP quiet SYS dos32a {FL} NAME {OE} {LO} {DL} {LL} {LB}{SCRIPT}" CASE hbmk[ _HBMK_cPLAT ] == "os2" ; cOpt_Link := "OP quiet SYS os2v2 {FL} NAME {OE} {LO} {DL} {LL} {LB} {LS}{SCRIPT}" ENDCASE cBin_Dyn := cBin_Link