From 9adb84e2586e094aa6dff74837b7596dd019d6b5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 8 May 2010 22:57:30 +0000 Subject: [PATCH] 2010-05-09 00:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added Ubuntu 10.4 as tested version. * include/common.ch + Added HB_HMERGE_* constant for HB_HMERGE() function. * package/winuni/mpkg_win_uni_extra_copy.bat * Commented line not necessary for official mingw build. * contrib/hbsqlit3/tests/hooks.prg * contrib/hbsqlit3/tests/authoriz.prg * contrib/hbsqlit3/tests/backup.prg + Added missing '()'s from :__enum* accesses. * config/win/mingw.mk ! Fixed after last minute change breaking it when HB_COMPILER_VER is not set. * examples/httpsrv/uhttpd.prg % Replaced 'var:__enumValue()' with 'var' in FOR EACH loops. --- harbour/ChangeLog | 22 +++++++++++++++++++ harbour/INSTALL | 2 +- harbour/config/win/mingw.mk | 8 ++++--- harbour/contrib/hbsqlit3/tests/authoriz.prg | 6 ++--- harbour/contrib/hbsqlit3/tests/backup.prg | 4 ++-- harbour/contrib/hbsqlit3/tests/hooks.prg | 4 ++-- harbour/examples/httpsrv/uhttpd.prg | 8 +++---- harbour/include/common.ch | 6 +++++ .../winuni/mpkg_win_uni_extra_copy.bat | 4 ++-- 9 files changed, 47 insertions(+), 17 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7e55d5b8e2..8c5f6a3012 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,28 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-09 00:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + + Added Ubuntu 10.4 as tested version. + + * include/common.ch + + Added HB_HMERGE_* constant for HB_HMERGE() function. + + * package/winuni/mpkg_win_uni_extra_copy.bat + * Commented line not necessary for official mingw build. + + * contrib/hbsqlit3/tests/hooks.prg + * contrib/hbsqlit3/tests/authoriz.prg + * contrib/hbsqlit3/tests/backup.prg + + Added missing '()'s from :__enum* accesses. + + * config/win/mingw.mk + ! Fixed after last minute change breaking it when HB_COMPILER_VER + is not set. + + * examples/httpsrv/uhttpd.prg + % Replaced 'var:__enumValue()' with 'var' in FOR EACH loops. + 2010-05-08 11:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Extended -mkimplib option for windows gcc compilers (mingw/cygwin) diff --git a/harbour/INSTALL b/harbour/INSTALL index 45b7ca4009..d2de99281a 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -365,7 +365,7 @@ HARBOUR Linux (.deb based distros: Debian, Ubuntu) ------------------------------------------ - (tested with Ubuntu 7.04, 8.04, 9.04, 9.10) + (tested with Ubuntu 7.04, 8.04, 9.04, 9.10, 10.4) You'll need these base packages to build/package/test/use Harbour: diff --git a/harbour/config/win/mingw.mk b/harbour/config/win/mingw.mk index f14fe007cd..affd600fd9 100644 --- a/harbour/config/win/mingw.mk +++ b/harbour/config/win/mingw.mk @@ -26,9 +26,11 @@ endif # It is also supported by official mingw 4.4.x and mingw64 4.4.x, # but not supported by mingw tdm 4.4.x, so I only enable it on or # above 4.5.0. -ifeq ($(filter $(HB_COMPILER_VER),29 34 40 41 42 43 44),) - LDFLAGS += -Wl,--nxcompat -Wl,--dynamicbase - DFLAGS += -Wl,--nxcompat -Wl,--dynamicbase +ifneq ($(HB_COMPILER_VER),) + ifeq ($(filter $(HB_COMPILER_VER),29 34 40 41 42 43 44),) + LDFLAGS += -Wl,--nxcompat -Wl,--dynamicbase + DFLAGS += -Wl,--nxcompat -Wl,--dynamicbase + endif endif ifneq ($(HB_BUILD_WARN),no) diff --git a/harbour/contrib/hbsqlit3/tests/authoriz.prg b/harbour/contrib/hbsqlit3/tests/authoriz.prg index 41ed0f428e..6852503723 100644 --- a/harbour/contrib/hbsqlit3/tests/authoriz.prg +++ b/harbour/contrib/hbsqlit3/tests/authoriz.prg @@ -248,9 +248,9 @@ STATIC FUNCTION PrepareDB( cFile ) FOR EACH enum IN hPerson sqlite3_reset( pStmt ) - sqlite3_bind_text( pStmt, 1, enum:__enumKey ) - sqlite3_bind_int( pStmt, 2, enum:__enumValue ) - sqlite3_bind_text( pStmt, 3, hb_md5(enum:__enumKey) ) + sqlite3_bind_text( pStmt, 1, enum:__enumKey() ) + sqlite3_bind_int( pStmt, 2, enum:__enumValue() ) + sqlite3_bind_text( pStmt, 3, hb_md5( enum:__enumKey() ) ) sqlite3_step( pStmt ) NEXT diff --git a/harbour/contrib/hbsqlit3/tests/backup.prg b/harbour/contrib/hbsqlit3/tests/backup.prg index ec2afc4d56..01ee6b75c7 100644 --- a/harbour/contrib/hbsqlit3/tests/backup.prg +++ b/harbour/contrib/hbsqlit3/tests/backup.prg @@ -225,8 +225,8 @@ STATIC FUNCTION PrepareDB( cFile ) FOR EACH enum IN hPerson sqlite3_reset( pStmt ) - sqlite3_bind_text( pStmt, 1, enum:__enumKey ) - sqlite3_bind_int( pStmt, 2, enum:__enumValue ) + sqlite3_bind_text( pStmt, 1, enum:__enumKey() ) + sqlite3_bind_int( pStmt, 2, enum:__enumValue() ) sqlite3_step( pStmt ) NEXT diff --git a/harbour/contrib/hbsqlit3/tests/hooks.prg b/harbour/contrib/hbsqlit3/tests/hooks.prg index a97804b337..dc9b049fa6 100644 --- a/harbour/contrib/hbsqlit3/tests/hooks.prg +++ b/harbour/contrib/hbsqlit3/tests/hooks.prg @@ -240,8 +240,8 @@ STATIC FUNCTION PrepareDB( cFile ) FOR EACH enum IN hPerson sqlite3_reset( pStmt ) - sqlite3_bind_text( pStmt, 1, enum:__enumKey ) - sqlite3_bind_int( pStmt, 2, enum:__enumValue ) + sqlite3_bind_text( pStmt, 1, enum:__enumKey() ) + sqlite3_bind_int( pStmt, 2, enum:__enumValue() ) sqlite3_step( pStmt ) NEXT diff --git a/harbour/examples/httpsrv/uhttpd.prg b/harbour/examples/httpsrv/uhttpd.prg index be92a966bf..098cbd7ae3 100644 --- a/harbour/examples/httpsrv/uhttpd.prg +++ b/harbour/examples/httpsrv/uhttpd.prg @@ -1410,7 +1410,7 @@ STATIC FUNCTION MakeResponse() cRet += cReturnCode + CR_LF FOR EACH v IN _HTTP_RESPONSE - cRet += v:__enumKey() + ": " + v:__enumValue() + CR_LF + cRet += v:__enumKey() + ": " + v + CR_LF NEXT //AEVAL( t_aHeader, {|x| cRet += x[1] + ": " + x[2] + CR_LF } ) @@ -1576,7 +1576,7 @@ STATIC FUNCTION CGIExec( cProc, /*@*/ cOutPut ) // Sending POST variables to CGI via STD_IN cSend := "" FOR EACH v IN _POST - cSend += v:__enumKey() + "=" + LTrim( hb_cStr( v:__enumValue() ) ) + IIF( v:__enumIndex() < Len( _POST ), "&", "" ) + cSend += v:__enumKey() + "=" + LTrim( hb_cStr( v ) ) + IIF( v:__enumIndex() < Len( _POST ), "&", "" ) NEXT FWrite( hIn, cSend ) //hb_toOutDebug( "Sending: %s\n\r", cSend ) @@ -2121,7 +2121,7 @@ STATIC PROCEDURE Define_Env( hmServer ) LOCAL v FOR EACH v IN hmServer - hb_SetEnv( v:__enumKey(), v:__enumValue() ) + hb_SetEnv( v:__enumKey(), v ) NEXT RETURN @@ -2527,7 +2527,7 @@ STATIC FUNCTION FileUnAlias( cScript ) // Checking if the request contains an alias FOR EACH x IN s_hAliases IF x:__enumKey() == Left( cScript, Len( x:__enumKey() ) ) - cFileName := x:__enumValue() + SubStr( cScript, Len( x:__enumKey() ) + 1 ) + cFileName := x + SubStr( cScript, Len( x:__enumKey() ) + 1 ) // substitute macros cFileName := StrTran( cFileName, "$(DOCROOT_DIR)", _SERVER[ "DOCUMENT_ROOT" ] ) diff --git a/harbour/include/common.ch b/harbour/include/common.ch index 71e97b605b..e80011bd72 100644 --- a/harbour/include/common.ch +++ b/harbour/include/common.ch @@ -85,4 +85,10 @@ #define HB_HAUTOADD_ALWAYS ( HB_HAUTOADD_ACCESS + HB_HAUTOADD_ASSIGN ) #define HB_HAUTOADD_REFERENCE HB_HAUTOADD_ALWAYS +/* HB_HMERGE() modes */ +#define HB_HMERGE_UNION 0 /* logical OR on items in two hash tables (default) */ +#define HB_HMERGE_INTERSECT 1 /* logical AND on items in two hash tables */ +#define HB_HMERGE_DIFFERENCE 2 /* logical XOR on items in two hash tables */ +#define HB_HMERGE_REMOVE 3 /* h1 & ( h1 ^ h2 ) */ + #endif /* HB_COMMON_CH_ */ diff --git a/harbour/package/winuni/mpkg_win_uni_extra_copy.bat b/harbour/package/winuni/mpkg_win_uni_extra_copy.bat index d71e66e6f9..16eb40eb89 100644 --- a/harbour/package/winuni/mpkg_win_uni_extra_copy.bat +++ b/harbour/package/winuni/mpkg_win_uni_extra_copy.bat @@ -49,8 +49,8 @@ rem ; Using msvc64 because mingw64 .dll handling is broken. xcopy /y "%HB_DIR_UPX%upx.exe" F:\hb\hb21\bin\ copy /y "%HB_DIR_UPX%LICENSE" F:\hb\hb21\bin\upx_LICENSE.txt -xcopy /y /s /e F:\devl\MinGW-441-tdm F:\hb\hb21\comp\mingw\ -del F:\hb\hb21\comp\mingw\tdm-mingw-1.908.0-4.4.1-2.exe +xcopy /y /s /e F:\devl\MinGW-450 F:\hb\hb21\comp\mingw\ +rem del F:\hb\hb21\comp\mingw\tdm-mingw-1.908.0-4.4.1-2.exe pushd