* harbour/include/hbdefs.h
+ added HB_VMUINT_MAX macro
* harbour/src/vm/hvm.c
* harbour/src/vm/itemapi.c
% use conditional #if compilation for code which depends on
HB_SIZE range. It should eliminate dummy code and pacify
warnings in some compilers.
NOTE: do not forget to update such #if conditions when we
switch to signed HB_SIZE type.
* harbour/src/macro/macro.y
* harbour/src/macro/macro.yyh
* harbour/src/macro/macro.yyc
* harbour/src/macro/macrolex.c
* changed type of valChar.length from int to HB_SIZE
* src/vm/estack.c
* src/vm/debug.c
* src/vm/hvm.c
* src/vm/pvalue.c
* src/vm/arrays.c
* src/vm/proc.c
* src/vm/memvars.c
* src/vm/eval.c
* src/vm/classes.c
* include/hbstack.h
* include/hbapi.h
+ Win64 support for HVM stack and other related internals.
(HB_ULONG -> HB_SIZE, HB_LONG -> HB_ISIZ, long -> HB_ISIZ)
+ Using size API in debug functions.
; TOFIX: These two warnings remain in HVM (not counting dlmalloc):
---
hvm.c(10695) : warning C4244: 'argument' : conversion from 'HB_MAXINT' to 'double', possible loss of data
macro.c(1315) : warning C4310: cast truncates constant value
---
* src/vm/eval.c
* HB_FORNEXT() loop value can now be 64-bit values (was 32).
* src/vm/runner.c
* Formatting.
* include/hbhash.h
* src/common/hbhash.c
+ hash key changed from HB_ULONG to HB_SIZE.
* src/rtl/cdpapi.c
* src/compiler/hbmain.c
* Added casts to pacify long time msvc warnings.
* include/hbapi.h
! HB_IS_VALID_INDEX() macro fixed to use HB_SIZE.
* Changed hb_struRefer.offset structure member from HB_LONG to
HB_ISIZ, fixing one pending Win64 type mismatch.
The change doesn't modify HB_ITEM size.
* include/hbapicls.h
+ Added parameter name to one declaration.
* include/hbcomp.h
* include/hbcompdf.h
* include/hbexpra.c
* include/hbexprb.c
* include/hbexprop.h
* include/hbmacro.h
* src/common/expropt1.c
* src/common/expropt2.c
* src/compiler/genc.c
* src/compiler/gencc.c
* src/compiler/harbour.y
* src/compiler/harbour.yyc
* src/compiler/hbdbginf.c
* src/compiler/hbdead.c
* src/compiler/hbident.c
* src/compiler/hblbl.c
* src/compiler/hbmain.c
* src/compiler/hbopt.c
* src/compiler/hbpcode.c
* src/vm/macro.c
+ Adding Win64 support for compiler/macro subsystems.
* HB_ULONG -> HB_SIZE where applicable.
* HB_LONG -> HB_ISIZ where applicable.
* Some now unnecessary cast deleted.
* hb_compExprAsStringLen() return value changed to HB_SIZE from int.
* hb_compNOOPfill() 3rd parameter changed to HB_ISIZ from int.
- Deleted unused hb_compExprMacroListLen().
; TOFIX: Use '$<lNumber>$' (or maybe newly added sNumber)
instead of '$<iNumber>$' in .y code.
Przemek, what do you think?
* src/compiler/Makefile
* C files sorted.
* src/vm/hvm.c
! hb_vmStaticsCount() changed to use HB_SIZE instead of
HB_ULONG. Fixing pending warnings.
* include/hbapi.h
* Changed hb_struEnum.offset structure member from HB_LONG
to HB_ISIZ, fixing one more pending Win64 type mismatch
problem. The change doesn't modify HB_ITEM size.
Please verify me.
* src/vm/classes.c
! Using size API after above change.
; QUESTION: In itemapi asEnum.offset is stored using
hb_itemPutNInt(). Should this be changed to
hb_itemPutNS()?
* contrib/hbct/ctstr.c
+ Cleaned away some HB_ULONG casts and using HB_PFS format
strings instead.
* contrib/hbct/tab.c
! Fixed regression from 2010-06-20 12:34 UTC+0200 Viktor Szakats,
by deleting now unnecessary casts. Shown by mingw64 4.6.0exp.
I'd appreciate if someone could check me!!
* include/hbapi.h
* Changed hb_struRefer.value structure member from HB_LONG to
HB_ISIZ, fixing one pending Win64 type mismatch also signaled
by msvc64 warning. The change doesn't modify HB_ITEM size.
Please verify me.
* contrib/hbct/Makefile
* contrib/hbct/hbct.hbp
* contrib/hbct/ct.h
* contrib/hbct/charlist.c
+ contrib/hbct/charlish.c
! Moved non-CT3 (Harbour extension functions to separate
source file)
% Optimized code.
* Cleaned code and type usage.
* Changelog
! Fixed date in my today's commits.
* src/vm/thread.c
* Added casts to pacify msvc64 warnings.
Of some the ones related to pMutex->events I'm unsure of,
probably it's better to use 'int' instead of HB_ULONG for
internal variable in some cases to make it look cleaner,
though I assume there was a reason for it, so I left it.
Please check me.
* src/vm/classes.c
* Added casts to pacify msvc64 warnings.
* src/common/hbstr.c
* hb_str2number() changed to limit string size to 'int' internally.
This fixes the warnings and inconsistencies on Win64.
* src/rtl/hbcom.c
! Pacified msvc warnings on component boundary.
* src/vm/cmdarg.c
* src/vm/fm.c
* src/nortl/nortl.c
* src/rtl/fmhb.c
* include/hbapi.h
+ hb_xquery() return value changed from HB_ULONG to HB_SIZE.
Also fixes all msvc64 warnings
* src/vm/macro.c
* src/vm/estack.c
* src/vm/dynsym.c
* src/vm/hvm.c
* src/vm/set.c
* src/rdd/wafunc.c
* src/compiler/hbmain.c
* src/compiler/cmdcheck.c
* src/compiler/genc.c
* src/compiler/gencc.c
* src/compiler/harbour.yyc
* src/compiler/harbour.y
* include/hbexprb.c
+ Added strlen() casts to pacify msvc64 warnings
* src/vm/cmdarg.c
! Readded one '( void * )' cast. (I've only tested C++ mode
on Windows, this fell into *nix code). Thanks for checking it.
* src/rtl/hbgtcore.c
+ HB_SIZE -> HB_UINT, plus added necessary casts. Signaled by warnings
* contrib/hbmisc/spd.c
+ HB_SIZE -> HB_UINT, plus added necessary casts. Signaled by warnings
; In case of this function it'd be probably better to make it fully
HB_SIZE compatible, instead of stepping back like this.
* src/rdd/sdf1.c
* src/rdd/delim1.c
+ Added casts to pacify some msvc64 warnings
* src/rdd/hsx/hsx.c
! HB_SIZE -> HB_LONG. Resolves msvc64 warnings.
* config/win/pocc.mk
* config/win/pocc64.mk
! Fixed pocc64 build. The build setup was broken since
about 2.0.0beta2. One year without anyone noticing.
* src/rtl/hbsocket.c
! Readded once present (in old hbinet.c) ugly kludge for pocc64
to at least be able to build binaries instead of choking on a
missing Windows function. More in the source code.
Affecting both 5 and 6.
* external/zlib/Makefile
! Added ugly workaround to avoid quite strange pocc64 (both 5 and 6)
error when compiling crc32 for dynamic lib:
---
pocc.exe -I. -I../../../../../include -Ze -Go -MT -Tamd64-coff -Ot -DHB_LEGACY_TYPES_OFF -DUNICODE -Focrc32_dyn.obj -DHB_DYNLIB -DZLIB_DLL -c ../../../crc32.c
../../../crc32.c(209): error #3101: [asm] Invalid argument to 'GLOBAL'.
../../../crc32.c(209): error #3152: [asm] Expected ']'.
../../../crc32.c(209): error #3151: [asm] Syntax error.
../../../crc32.c(223): error #3101: [asm] Invalid argument to 'FUNCTION'.
../../../crc32.c(223): error #3152: [asm] Expected ']'.
../../../crc32.c(223): error #3151: [asm] Syntax error.
../../../crc32.c(223): error #3151: [asm] Syntax error.
---
* external/bzip2/Makefile
! Disabled for pocc64 (both 5 and 6), due to this error:
---
pocc.exe -I. -I../../../../../include -Ze -Go -MT -Tamd64-coff -Ot -DHB_LEGACY_TYPES_OFF -DUNICODE -Foblocksor.obj -c ../../../blocksor.c
../../../blocksor.c(583): error #3114: [asm] Invalid combination of opcode and operands.
---
* doc/whatsnew.txt
* Updated.
* INSTALL
* Updated mingw GNU Make links and GNU Make version requirement.
* contrib/hbmzip/hbmzip.c
* Pacified signedness warning.
* contrib/hbnf/fttext.c
* contrib/hbnf/dispc.c
* contrib/hbmisc/hb_f.c
+ Types cleaned to be Win64 compatible and to support large files,
where this was missing.
* Formatting.
* Deleted unnecessary casts.
* include/hbdefs.h
+ Adjusted HB_SIZE_MAX value for Win64 after recent changes.
* src/vm/hashfunc.c
* src/vm/hvm.c
* src/debug/dbgentry.c
* src/common/hbwin.c
* src/common/hbfsapi.c
* src/common/hbstr.c
* src/rtl/lennum.c
* src/rtl/hbzlibgz.c
* src/rtl/hbtoken.c
* src/rtl/hbmd5.c
* src/rtl/hbregex.c
* src/rtl/hbzlib.c
* src/rtl/gtpca/gtpca.c
* contrib/hbct/screen2.c
* contrib/hbct/token2.c
* contrib/hbct/charsprd.c
* contrib/hbct/charlist.c
* contrib/hbct/charsort.c
* contrib/hbct/maxline.c
* contrib/hbct/wordrepl.c
* contrib/hbct/charrepl.c
* contrib/hbct/charswap.c
* contrib/hbct/pos1.c
* contrib/hbct/token1.c
* contrib/hbct/charmirr.c
* contrib/hbct/relation.c
* contrib/hbct/atnum.c
* contrib/hbct/count.c
* contrib/hbct/ctstrfil.c
* contrib/hbct/posdiff.c
* contrib/hbct/addascii.c
* contrib/hbct/pos2.c
* contrib/hbct/numat.c
* contrib/hbct/atrepl.c
* contrib/hbct/print.c
* contrib/xhb/txtline.c
* contrib/hbgt/strright.c
* contrib/hbgt/chrtotal.c
* contrib/hbgt/strcount.c
* contrib/hbgt/ascposgt.c
* contrib/hbgt/strleft.c
* contrib/hbgt/chrcount.c
* contrib/hbgt/strcspn.c
* contrib/hbgt/atdiff.c
* contrib/hbbz2/hbbz2.c
* contrib/hbmemio/memio.c
* contrib/hbclipsm/num.c
* contrib/hbclipsm/date.c
* contrib/hbmisc/stringsx.c
* contrib/hbmisc/spd.c
+ Using new size API.
NOTE: This will be a longer process as there many current variations
to pass sizes (*nint(), *ni(), *nl()) and there is no warning
issued in several of these.
Please also note that not all updates files became fully clean.
I will post a list of remaining warnings.
+ Type cleanup:
int -> HB_ISIZ
+ Added casts at component boundaries.
% Deleted unnecessary '( HB_SIZE )' casts.
+ ULONG_MAX -> HB_SIZE_MAX
* 'hb_retl( 0 )' -> 'hb_retl( HB_FALSE )'
* 'hb_retl( 1 )' -> 'hb_retl( HB_TRUE )'
! CSETSAFETY() fixed to return and accept logical parameters
instead of returning numeric, checking for logical but retrieving
numeric.
* src/common/hbwin.c
* DWORD -> int to be in sync with Windows API declarations.
; NOTE: I left out RDDs and VM from the areas I scanned, please
modify them. F.e. we will need a hb_vmPushSize().
; Peer review (by as much eyeballs as possible) is appreciated.
* src/vm/itemapi.c
* src/vm/arrays.c
* src/vm/extend.c
* include/hbapi.h
* include/hbapiitm.h
* Changed new size API calls to use HB_ISIZ instead of HB_SIZE.
This is required until we switch HB_SIZE to be signed value,
and to not step backwards plus keep signedness compatibility
with 'long' API calls.
* contrib/xhb/xhbhasha.c
* contrib/hbcurl/hbcurl.c
+ Using size API.
* contrib/xhb/xhbhasha.c
! HAAGETREALPOS(): Fixed return value to be numeric.
* include/hbapi.h
* include/hbapiitm.h
* src/vm/itemapi.c
* src/vm/arrays.c
* src/vm/extend.c
+ Added hb_storvns().
+ Added hb_parvns().
; TOFIX: hb_itemPutNS() gives these (not quite unexpected) mingw warnings:
---
itemapi.c:993:8: warning: comparison between signed and unsigned integer expressions
itemapi.c:998:38: warning: comparison between signed and unsigned integer expressions
itemapi.c:1004:35: warning: comparison between signed and unsigned integer expressions
itemapi.c:1004:7: warning: comparison is always false due to limited range of data type
---
* src/rtl/philes.c
* src/rtl/mlcfunc.c
* src/rtl/rat.c
+ Using size APIs.
% Also deleting '( HB_SIZE )' casts along the way.
* src/rtl/oemansi.c
! Cast to make Win64 happy. Quite interesting that almost no
Windows API don't support proper 64-bit strings, so here
Windows will be the limitation, not Harbour.
* src/vm/arrayshb.c
* src/rtl/replic.c
* src/rtl/padr.c
* src/rtl/padc.c
* src/rtl/len.c
* src/rtl/padl.c
* src/rtl/right.c
* src/rtl/left.c
* src/rtl/space.c
* contrib/xhb/xhbat.c
* contrib/xhb/xhbarr.c
+ Started to use size APIs. Quite random, just to test the
feeling. Converted functions can properly handle > 4GB
strings and no. of array elements in .prg code.
(on Win64)
* include/hbapiitm.h
! Missed to do the renaming in declaration.
* src/vm/itemapi.c
- hb_itemGetNL() no longer works for date types.
INCOMPATIBLE. If you used it to retrieve date/time,
use hb_itemGetDL() instead.
! Fixed typo in prev addition.
* include/hbapi.h
* src/vm/arrays.c
+ Added hb_arrayGetNSize(), hb_arraySetNSize().
! Fixed old typo in TRACE() call of hb_arrayGetNInt().
* src/vm/extend.c
! Fixed typo in prev addition.
* src/rtl/filesys.c
! Applied fixed from Przemek to hb_fsReadAt()/hb_fsWriteAt()
code to be MT safe plus fix other problems.
; QUESTION: Shouls the same applied to hb_fsWriteLarge()/hb_fsReadLarge()
loops? (BTW inactive in 32-bit Harbour builds)
* contrib/hbct/screen2.c
! Type cleanup.
* contrib/hbct/pack.c
* contrib/xhb/hbxml.c
* contrib/xhb/hbxml.h
* contrib/hbgt/charmixg.c
* contrib/hbgt/charodd.c
* contrib/hbgt/strexpan.c
* contrib/hbgt/asciisgt.c
* contrib/hbgt/strright.c
* contrib/hbgt/strasint.c
* contrib/hbgt/strdiffg.c
* contrib/hbgt/chrtotal.c
* contrib/hbgt/strcount.c
* contrib/hbgt/strleft.c
* contrib/hbgt/chrfirst.c
* contrib/hbgt/chrcount.c
* contrib/hbgt/strpbrk.c
* contrib/hbgt/chareven.c
* contrib/hbgt/bitflags.c
* contrib/hbgt/strcspn.c
* contrib/hbgt/atdiff.c
* contrib/hbnf/proper.c
* contrib/hbnf/getenvrn.c
! Fixed to use Harbour size types.
* contrib/hbnf/dispc.c
! Started using Harbour type, but this is code is
deadly and needs further work. I still wonder how
to create code which mixes properly HB_FOFFSET and
HB_SIZE.
* contrib/xhb/cstructc.c
* Formatting.
* src/vm/runner.c
! Minor to prev.
* include/hbapi.h
* src/vm/extend.c
+ Added hb_parnsize(), hb_retnsize(), hb_stornsize() functions.
; NOTE: These should be used in place of hb_parnl(), hb_retnl(),
hb_stornl() when passing HB_SIZE types.
; TODO: Use them all accross Harbour if they are correct and
after being finalized.
* src/vm/itemapi.c
+ Added hb_itemGetNSize(), hb_itemPutNSize() functions.
* DATETIME stuff in hb_itemGetNL() marked as HB_LEGACY_LEVEL3.
; QUESTION: It's marked as to be deleted in the TODO, so maybe we should
rather delete it.
* include/hbapiitm.h
* src/rtl/filesys.c
+ hb_fsReadAt(), hb_fsWriteAt(): Added support for Win64 HB_SIZE.
; QUESTION: I assume these functions have the purpose of being
atomic seek + read without moving the file pointer,
which means current modification isn't safe. How
can this be solved given Windows doesn't seem to have
64-bit read/write API calls?
! Fixed old copy-paste typos in Windows OVERLAPPED initialization,
where the lines were ended with command instead of semicolon,
they didn't cause any harm though in their former location.
% Reverted a minor change from prev commit to make it
possibly a little bit faster, like it was before.
* src/rtl/hbzlib.c
+ Added casts (at external interface calls) and other fixes to
make it build for Win64 without warnings.
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbffpt/dbffpt1.c
* contrib/rddbmcdx/bmdbfcdx.c
* HB_ULONG -> HB_SIZE where appropriate to avoid Win64 errors
and some warnings. I'm still not comfortable to touch this
code, but it could certainly need a type cleanup.
* include/hbdefs.h
+ Added HB_PFS macro which holds the printf() format string
for HB_SIZE value.
; TODO: Use it all accross Harbour.
* contrib/hbmysql/mysql.c
* contrib/sddmy/sddmy.c
* contrib/hbmzip/hbmzip.c
* contrib/hbcurl/hbcurl.c
* contrib/hbhpdf/harupdf.c
* contrib/hbpgsql/postgres.c
* contrib/rddads/adsfunc.c
* contrib/rddads/ads1.c
* contrib/hbfimage/fi_wrp.c
* contrib/sddodbc/sddodbc.c
* contrib/hbgd/gdwrp.c
* contrib/hbwin/wapi_wingdi.c
* contrib/hbwin/wapi_winbase.c
* contrib/hbwin/wapi_winuser.c
* contrib/hbwin/win_bmp.c
* contrib/hbwin/win_prn1.c
* contrib/hbwin/win_regc.c
* contrib/hbssl/evpciph.c
* contrib/hbssl/ssl.c
* contrib/hbssl/bio.c
* contrib/hbssl/sslctx.c
* contrib/hbssl/evpenc.c
* contrib/hbssl/pem.c
* contrib/hbssl/rand.c
* contrib/hbssl/evp.c
+ Added necessary casts at external component boundaries to
make Win64 builds warning-free.
* contrib/hbct/ctstrfil.c
+ HB_ISIZ -> HB_FOFFSET, hb_fsSeek() usage, other type cleanup
to handle file offsets correctly.
* contrib/xhb/hbnxs.h
* contrib/xhb/hbcrypt.c
! Fixed warnings for Win64.
* contrib/hbwin/win_prn3.c
* contrib/xhb/dbf2txt.c
* contrib/xhb/fparse.c
* int -> HB_ISIZ for Win64.
* contrib/xhb/freadlin.c
* hb_fsSeek() -> hb_fsSeekLarge().
* contrib/sddfb/sddfb.c
* Minor type cleanup to make Win64 warning-free.
* contrib/hbsqlit3/hbsqlit3.c
+ Added necessary casts at external interface calls.
% Deleted one dummy operation from SQLITE3_FILE_TO_BUFF().
* contrib/rddsql/sqlmix.c
* contrib/rddads/adsx.c
* HB_ULONG -> HB_SIZE.
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* contrib/gtwvg/wvgcuig.c
* contrib/gtwvg/wvgwin.c
* contrib/gtwvg/wvgutils.c
* contrib/gtwvg/wvgcore.c
! int -> HB_ISIZ/HB_SIZE
+ Added necessary casts at external component boundaries to
make Win64 warning-free.
* contrib/rddads/ads1.c
* HB_ULONG -> HB_SIZE
* contrib/hbtip/utils.c
* int -> HB_ISIZ
! Fixed to use HB_FOFFSET type to save/restore file position.
* ChangeLog
+ Added missing item to previous log entry:
! Fixed hb_fsCurDirBuff() for Win64.
; It's quite large commit, nevertheless I'd highly appreciate
peer review, and certainly there will be places which need
better or different solution for Win64.
* contrib/hbide/hbide.ch
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/ideenviron.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/idefunctions.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/idesources.prg
* contrib/hbide/idetools.prg
+ Remodelled: ::aINI - hbide.ini variables container.
It is now encapsulated in a object - ::aINI => ::oINI.
This implementation has made this construct extendible to
any extent. Earlier it was a real mess to add one more
option on top of the existing one.
* src/rtl/filesys.c
* include/hbapifs.h
+ Added support for 64-bit HB_SIZE to hb_fsWriteLarge(),
hb_fsReadLarge().
* Some HB_SIZE variables renamed to have 'n' prefix.
* Minor cleanups in code layout in hb_fsWriteLarge(),
hb_fsReadLarge().
; Please review, I didn't make any real tests. Most code
was copied and adapted from similar code existing for
16-bit systems to support 32-bit HB_SIZE.
* src/vm/runner.c
% Adjusted scope of recently added variable.
* ChangeLog
! Fixed HB_COMPILER_VER values for MSVC for pre < 1000 versions
(requires zero prefix to work right) in:
2010-06-06 00:50 UTC+0200 Viktor Szakats
* src/rtl/filesys.c
* include/hbapifs.h
! hb_fsLock()/hb_fsSeek() to use HB_ULONG/HB_LONG, instead of
HB_SIZE/HB_ISIZ.
* Cleaned some casting in hb_fsLock(). Please check me.