From 8376e2691511f679759e4376676543f8e8d4ee9f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 8 Oct 2008 12:37:07 +0000 Subject: [PATCH] 2008-10-08 14:36 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * bin/bld.bat * bin/bld_os2.cmd + Added support for HB_INSTALL_PREFIX. + Added experimental support for 'set HB_MT=MT' flag, to create an MT executable. * source/rtl/seconds.c * Formatting. --- harbour/ChangeLog | 13 +++++++++++++ harbour/bin/bld.bat | 24 ++++++++++++++---------- harbour/bin/bld_os2.cmd | 14 +++++++++----- harbour/source/rtl/seconds.c | 6 +++--- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f32cbec16a..ece940cb3c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-08 14:36 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * bin/bld.bat + * bin/bld_os2.cmd + + Added support for HB_INSTALL_PREFIX. + + Added experimental support for 'set HB_MT=MT' flag, + to create an MT executable. + + * source/rtl/seconds.c + * Formatting. + 2008-10-08 12:28 UTC+0200 Maurilio Longo (maurilio.longo@libero.it) * harbour/source/rtl/seconds.c ! removed a couple of warnings. @@ -644,10 +654,12 @@ * bin/bld.bat % Added BCC optimization switches (the ones used for the Harbour release versions). + [TOMERGE 1.0] * bin/bld.bat * bin/bld_os2.cmd + Added -O3 to GCC compilation. + [TOMERGE 1.0] 2008-09-29 22:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/hvm.c @@ -696,6 +708,7 @@ + -O3 GCC optimization level made the default for all GCC builds. Those who wish to use lower optimization settings, pls use C_USR=-O2 or such. + [TOMERGE 1.0] 2008-09-29 13:59 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/workarea.c diff --git a/harbour/bin/bld.bat b/harbour/bin/bld.bat index d9b3f4c04e..2d9a3d66f3 100644 --- a/harbour/bin/bld.bat +++ b/harbour/bin/bld.bat @@ -23,9 +23,13 @@ rem --------------------------------------------------------------- rem if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=w32 rem if "%HB_COMPILER%" == "" set HB_COMPILER=mingw -if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=..\bin -if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=..\lib -if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include +if "%HB_INSTALL_PREFIX%" == "" set HB_INSTALL_PREFIX=.. +if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin +if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib +if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include + +if "%HB_MT%" == "MT" set _HBVM_LIB=hbvmmt +if not "%HB_MT%" == "MT" set _HBVM_LIB=hbvm :START @@ -109,7 +113,7 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include echo -lhblang >> build.tmp echo -lhbrdd >> build.tmp echo -lhbrtl >> build.tmp - echo -lhbvm >> build.tmp + echo -l%_HBVM_LIB% >> build.tmp echo -lhbmacro >> build.tmp echo -lhbpp >> build.tmp echo -lrddfpt >> build.tmp @@ -165,11 +169,11 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 - if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -OS -Ov -Oi -Oc -d %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% %1.c %HB_USER_LIBS% hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib gtcgi.lib gtgui.lib gtpca.lib gtstd.lib gtwin.lib gtwvt.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddfpt.lib rddntx.lib rddcdx.lib hbhsx.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib - if "%HB_COMPILER%" == "msvc" cl -TP -W3 %C_USR% -I%HB_INC_INSTALL% %1.c /link /subsystem:CONSOLE /LIBPATH:%HB_LIB_INSTALL% %HB_USER_LIBS% hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib gtcgi.lib gtgui.lib gtpca.lib gtstd.lib gtwin.lib gtwvt.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbhsx.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib user32.lib wsock32.lib advapi32.lib gdi32.lib - if "%HB_COMPILER%" == "mingw" gcc %1.c -O3 -o%1.exe %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -lgtcgi -lgtgui -lgtpca -lgtstd -lgtwin -lgtwvt -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbhsx -lhbsix -lhbcommon -lhbpcre -lhbzlib - if "%HB_COMPILER%" == "gcc" gcc %1.c -O3 -o%1.exe %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -lgtcgi -lgtgui -lgtpca -lgtstd -lgtwin -lgtwvt -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbhsx -lhbsix -lhbcommon -lhbpcre -lhbzlib - if "%HB_COMPILER%" == "rsxnt" gcc %1.c -O3 -Zwin32 %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -lgtcgi -lgtgui -lgtpca -lgtstd -lgtwin -lgtwvt -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbhsx -lhbsix -lhbcommon -lhbpcre -lhbzlib + if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -OS -Ov -Oi -Oc -d %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% %1.c %HB_USER_LIBS% hbcpage.lib hbdebug.lib %_HBVM_LIB%.lib hbrtl.lib gtcgi.lib gtgui.lib gtpca.lib gtstd.lib gtwin.lib gtwvt.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddfpt.lib rddntx.lib rddcdx.lib hbhsx.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib + if "%HB_COMPILER%" == "msvc" cl -TP -W3 %C_USR% -I%HB_INC_INSTALL% %1.c /link /subsystem:CONSOLE /LIBPATH:%HB_LIB_INSTALL% %HB_USER_LIBS% hbcpage.lib hbdebug.lib %_HBVM_LIB%.lib hbrtl.lib gtcgi.lib gtgui.lib gtpca.lib gtstd.lib gtwin.lib gtwvt.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbhsx.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib user32.lib wsock32.lib advapi32.lib gdi32.lib + if "%HB_COMPILER%" == "mingw" gcc %1.c -O3 -o%1.exe %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -l%_HBVM_LIB% -lhbrtl -lgtcgi -lgtgui -lgtpca -lgtstd -lgtwin -lgtwvt -lhblang -lhbrdd -lhbrtl -l%_HBVM_LIB% -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbhsx -lhbsix -lhbcommon -lhbpcre -lhbzlib + if "%HB_COMPILER%" == "gcc" gcc %1.c -O3 -o%1.exe %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -l%_HBVM_LIB% -lhbrtl -lgtcgi -lgtgui -lgtpca -lgtstd -lgtwin -lgtwvt -lhblang -lhbrdd -lhbrtl -l%_HBVM_LIB% -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbhsx -lhbsix -lhbcommon -lhbpcre -lhbzlib + if "%HB_COMPILER%" == "rsxnt" gcc %1.c -O3 -Zwin32 %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -l%_HBVM_LIB% -lhbrtl -lgtcgi -lgtgui -lgtpca -lgtstd -lgtwin -lgtwvt -lhblang -lhbrdd -lhbrtl -l%_HBVM_LIB% -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbhsx -lhbsix -lhbcommon -lhbpcre -lhbzlib :C_WATCOM @@ -180,7 +184,7 @@ if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 echo FILE %1.obj >> build.tmp echo LIB hbcpage.lib >> build.tmp echo LIB hbdebug.lib >> build.tmp - echo LIB hbvm.lib >> build.tmp + echo LIB %_HBVM_LIB%.lib >> build.tmp echo LIB hbrtl.lib >> build.tmp echo LIB gtcgi.lib >> build.tmp echo LIB gtgui.lib >> build.tmp diff --git a/harbour/bin/bld_os2.cmd b/harbour/bin/bld_os2.cmd index c9d03ed43a..ea5dff976d 100644 --- a/harbour/bin/bld_os2.cmd +++ b/harbour/bin/bld_os2.cmd @@ -22,9 +22,13 @@ rem --------------------------------------------------------------- if "%HB_COMPILER%" == "" set HB_COMPILER=gcc -if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=..\bin -if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=..\lib -if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include +if "%HB_INSTALL_PREFIX%" == "" set HB_INSTALL_PREFIX=.. +if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin +if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib +if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include + +if "%HB_MT%" == "MT" set _HBVM_LIB=hbvmmt +if not "%HB_MT%" == "MT" set _HBVM_LIB=hbvm :START @@ -67,8 +71,8 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include :A_DOS - if "%HB_COMPILER%" == "gcc" gcc %1.c -O3 %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -lgtcgi -lgtstd -lgtos2 -lgtpca -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib - if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %C_USR% -I%HB_INC_INSTALL% %1.c %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\gtcgi.lib %HB_LIB_INSTALL%\gtstd.lib %HB_LIB_INSTALL%\gtos2.lib %HB_LIB_INSTALL%\gtpca.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib %HB_LIB_INSTALL%\hbpcre.lib %HB_LIB_INSTALL%\hbzlib.lib + if "%HB_COMPILER%" == "gcc" gcc %1.c -O3 %C_USR% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -l_HBVM_LIB -lhbrtl -lgtcgi -lgtstd -lgtos2 -lgtpca -lhblang -lhbrdd -lhbrtl -l_HBVM_LIB -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib + if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %C_USR% -I%HB_INC_INSTALL% %1.c %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\_HBVM_LIB.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\gtcgi.lib %HB_LIB_INSTALL%\gtstd.lib %HB_LIB_INSTALL%\gtos2.lib %HB_LIB_INSTALL%\gtpca.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\_HBVM_LIB.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib %HB_LIB_INSTALL%\hbpcre.lib %HB_LIB_INSTALL%\hbzlib.lib goto END :CLEANUP diff --git a/harbour/source/rtl/seconds.c b/harbour/source/rtl/seconds.c index 27fc83406f..c83ebbdaa3 100644 --- a/harbour/source/rtl/seconds.c +++ b/harbour/source/rtl/seconds.c @@ -76,8 +76,8 @@ #define ftime _ftime #endif #if defined( HB_OS_OS2 ) -#define BUFSIZE 16 * 1024 -#include + #define BUFSIZE 16 * 1024 + #include #endif HB_EXPORT void hb_dateTimeStamp( LONG * plJulian, LONG * plMilliSec ) @@ -323,7 +323,7 @@ HB_EXPORT double hb_secondsCPU( int n ) if( rc == NO_ERROR ) { QSGREC * pGrec = * pBuf; - QSPREC * pPrec = (QSPREC *) ((ULONG) pGrec + sizeof( QSGREC )); + QSPREC * pPrec = ( QSPREC * ) ( ( ULONG ) pGrec + sizeof( QSGREC ) ); QSTREC * pTrec = pPrec->pThrdRec; int i;