* harbour/contrib/hbwin/axcore.c
! removed the hack I added in previous commit with interface enumeration
which was accepting any interface without validation its ID.
+ added 3-rd parameter to __AXREGISTERHANDLER() as Mindaugas proposed.
Now this function has the following syntax:
__AXREGISTERHANDLER( <pDisp>, <bHandler> | <hHandlers>
[, <cIID> ] ) -> <pDisp>
default value for <cIID> is IID_IDispatch.
* harbour/source/compiler/hbmain.c
! added missing pFunc initialization in symbol structure.
It was causing GPF when C code was attached to .prg file using
HB_INLINE() {} or #pragma BEGIN/ENDDUMP with HB_FUNC_STATIC()
inside. Many thanks to Andi for information about the problem.
* harbour/contrib/hbwin/axcore.c
+ added alternative method to look for connection point if
FindConnectionPoint() method fails when new AX control is created.
Such method is used by HWGUI and GTWVG.
Mindaugas please verify it, windows users please test it.
* harbour/source/common/hbver.c
! added additional hack for conditional code used for Windows detection
to work with VC98.
Viktor please verify it but this condition:
( !defined( _MSC_VER ) || _MSC_VER >= 1400 )
was not enough.
* harbour/source/vm/runner.c
! fixed possible GPF after loading .hrb module - clear function
address if dynamic symbol does not exist
* harbour/source/compiler/hbmain.c
! fixed typo in conditional compilation in last commit
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/genhrb.c
+ added support for compiling multiple .prg modules into single
compilation unit with repeated static or init/exit functions
with the same name.
Now Harbour compiler compiling .prg code from different .prg modules
included by @<name>.clp or by SET PROCEDURE TO ... / DO ... [ WITH ... ]
works exactly like Clipper. It supports separated file wide definitions
for each compiled .prg module when -n switch is used and allows to
use static or init/exit functions/procedures with the same names but
in different modules.
It resolves incompatibility often reported by [x]Harbour users.
Now it's not longer necessary to update existing Clipper code.
@.clp files and SET PROCEDURE TO ... / DO ... [ WITH ... ] are
fully functional like in Clipper.
AFAIR it was the last unintentional incompatibility with Clipper.
TODO: add support for multiple static functions with the same name
in .HRB files - it's necessary to change used format so I'll
probably to that with .HRL support. Now when -gh switch is used
harbour and such functions exists then compiler generates:
Error E0002 Redefinition of procedure or function ...
TODO: modify hbmk2 to pass @<name>.clp files directly to Harbour
compiler so it can compile them just like Clipper does and
generate single output file: <name>.<ext>
* harbour/config/instsh.mk
* disabled install command echo
* harbour/config/lib.mk
* harbour/config/bin.mk
* harbour/config/header.mk
* harbour/config/dyn.mk
* harbour/config/doc.mk
* harbour/config/instsh.mk
! rewritten install rules so now they work without any problem when
more then one target .mk file is included, i.e. lib.mk and header.mk
* harbour/source/pp/Makefile
* harbour/source/dynlib/mt/Makefile
* harbour/source/dynlib/Makefile
* harbour/contrib/hbmysql/Makefile
* harbour/contrib/hbct/Makefile
* harbour/contrib/xhb/Makefile
* harbour/contrib/hbodbc/Makefile
* harbour/contrib/hbtpathy/Makefile
* harbour/contrib/hbsqlit3/Makefile
* harbour/contrib/hbmzip/Makefile
* harbour/contrib/hbblat/Makefile
* harbour/contrib/hbqt/Makefile
* harbour/contrib/hbxbp/Makefile
* harbour/contrib/xpp/Makefile
* harbour/contrib/hbnf/Makefile
* harbour/contrib/hbcurl/Makefile
* harbour/contrib/gtqtc/Makefile
* harbour/contrib/rddsql/sddmy/Makefile
* harbour/contrib/rddsql/sddpg/Makefile
* harbour/contrib/rddsql/sddfb/Makefile
* harbour/contrib/rddsql/sddodbc/Makefile
* harbour/contrib/hbhpdf/Makefile
* harbour/contrib/rddado/Makefile
* harbour/contrib/gtwvg/Makefile
* harbour/contrib/hbpgsql/Makefile
* harbour/contrib/hbclipsm/Makefile
* harbour/contrib/rddads/Makefile
* harbour/contrib/hbfimage/Makefile
* harbour/contrib/hbgd/Makefile
* harbour/contrib/hbtip/Makefile
* harbour/contrib/hbwin/Makefile
* harbour/contrib/hbvpdf/Makefile
* harbour/contrib/hbbtree/Makefile
* harbour/contrib/hbssl/Makefile
* harbour/external/libhpdf/Makefile
* removed not longer necessary workaround for overwritten by different
targets INSTALL_RULE
Possible TODO: clean up some other rules in config .mk files to remove
hacks from pp and dynlib Makefile(s).
Above modifications should fully resolve the problems with repeated
install actions and also build problems with some more restrictive
POSIX SHELLs.
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/genhrb.c
% removed FUNCALLS internal structures and functions.
It simplifies compiler code, reduce memory usage and
increase performance due to eliminating unnecessary
structures which were update and scanned in previous.
Now we have all necessary information in symbol table.
* harbour/contrib/hbnetio/netiocli.c
+ added support for DNS addresses
* harbour/source/rtl/hbsocket.c
! added sock_init()/sock_exit() calls to DOS builds.
! use select_s() and close_s() instead of select() and close()
in DOS builds.
* harbour/contrib/hbnetio/netiocli.c
* harbour/contrib/hbnetio/netiosrv.c
! initialize socket library automatically - it's necessary for some
platforms.
* harbour/harbour.spec
* harbour/harbour-win-spec
* harbour/harbour-wce-spec
* harbour/bin/hb-func.sh
* harbour/contrib/Makefile
+ harbour/contrib/hbnetio
+ harbour/contrib/hbnetio/netio.h
+ harbour/contrib/hbnetio/netiomt.prg
+ harbour/contrib/hbnetio/netiocli.c
+ harbour/contrib/hbnetio/netiosrv.c
+ harbour/contrib/hbnetio/Makefile
+ added new library: HBNETIO.
It implements alternative RDD IO API which uses own TCP/IP sockets
to exchange data between client and server.
This library contains client and server code and is fully MT safe.
On client side it's enough to execute:
NETIO_CONNECT( [<cServer>], [<cPort>], [<nTimeOut>] ) -> <lOK>
function to register alternative NETIO RDD API and set default
server address and port.
<cServer> - server addres (default 127.0.0.1)
<cPort> - server port (default 2941)
<nTimeOut> - connection timeout (default -1 - not timeout)
Above settings are thread local and parameters of the 1-st successful
connection are used as default values for each new thread.
After registering NETIO client by above function each file starting
"net:" prefix is automatically redirected to given NETIO server, i.e.
use "net:mytable"
It's also possible to pass NETIO server and port as part of file name,
i.e.:
use "net:192.168.0.1:10005:mytable"
On the server side the following functions are available:
create NETIO listen socket:
NETIO_LISTEN( [<nPort>], [<cAddress>], [<cRootDir>] )
-> <pListenSocket> | NIL
accept new connection on NETIO listen socket:
NETIO_ACCEPT( <pListenSocket> [, <nTimeOut>] )
-> <pConnectionSocket> | NIL
start connection server:
NETIO_SERVER( <pConnectionSocket> ) -> NIL
stop connection accepting or connection server:
NETIO_SERVERSTOP( <pListenSocket> | <pConnectionSocket>, <lStop> )
-> NIL
activate MT NETIO server (it needs MT HVM):
NETIO_MTSERVER( [<nPort>], [<cAddress>] ) -> <pListenSocket> | NIL
To create NETIO server is enough to compile and link with MT HVM
this code:
proc main()
local pListenSocket
pListenSocket := netio_mtserver()
if empty( pListenSocket )
? "Cannot start server."
else
wait "Press any key to stop NETIO server."
netio_serverstop( pListenSocket )
pListenSocket := NIL
endif
return
NETIO works with all core RDDs (DBF, DBFFPT, DBFBLOB, DBFNTX, DBFCDX,
DBFNSX, SDF, DELIM) and any other RDD which inherits from above or
use standard RDD IO API (hb_file*() functions).
Without touching even single line in RDD code it gives the same
functionality as REDBFCDX in xHarbour but for all RDDs.
It's possible that such direct TCP/IP connection is faster then
file server protocols especially if they need more then one IP frame
to exchange data so it's one of the reason to use it in such cases.
Please make real speed tests.
The second reason to use NETIO server is resolving problem with
concurrent access to the same files using Harbour applications
compiled for different platforms, i.e. DOS, LINUX, Windows and OS2.
It's very hard to configure all client stations to use correct
locking system. NETIO fully resolves this problem so it can be
interesting alternative also for MS-Windows users only if they
do not want to play with oplocks setting on each station.
I'm interesting in user opinions about real life NETIO usage.
Have a fun with this new toy ;-)
+ harbour/contrib/hbnetio/tests
+ harbour/contrib/hbnetio/tests/netiotst.prg
+ harbour/contrib/hbnetio/tests/netiotst.hbp
+ harbour/contrib/hbnetio/tests/data
+ added simple test code for NETIO. It activates NETIO MT server
and then connects to this server to create and browse table with
memo file and production index with few tags.
* harbour/config/dos/djgpp.mk
! added watt library to linked library list when TCP support is
enabled in DOS builds
TODO: make the same for watcom builds - I would like to leave it
for Viktor because I'm not sure where exactly I should add it
for new watcom .mk files to not break Viktor's build concept.
* harbour/config/detect.mk
* harbour/source/rtl/Makefile
* harbour/source/rtl/hbsocket.c
+ added support for TCPIP in DOS builds using WATTCP/WATT-32 library.
The latest release of Watt-32 is available at
http://www.bgnett.no/~giva/
* contrib/hbqt/hbqt_slots.cpp
! Completely reworked events management. It now supports multi-threads.
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpgeneric.prg
! Reworked event management to support multi threads.
* contrib/hbxbp/tests/demoxbp.prg
! Demonstrated the MT support. Click on <Dialogs> on main menu and play
with more than one dialog.
/* Still there are few glitches in MT mode and I do request Przemek to
look into the code and suggest us what else is required.
*/
* contrib/gtwvg/gtwvg.c
! A small fix in caret handelling. Under certain circumstances,
when other modal consoles are opened, HideCaret() is issued multiple
time and hence caret is diappeared. For normal console it was ok.
* contrib/gtwvg/wvgsink.c
! Some optimizations and formatting.
* harbour/source/pp/Makefile
* harbour/source/main/Makefile
! hacked the order of linked library list to resolve problem with
potential cross references between libraries on platforms which do
not support library grouping
* harbour/source/nortl/nortl.c
! added missing include hbmemory.ch
* harbour/source/compiler/hbmain.c
! added protection against multiple init function freeing
* source/pp/hbpp.c
+ Added command to HB_DYNLIB guard.
* source/pp/Makefile
! Deleted wildcard check before hbpp obj deletion. It's wrong
because hbpp obj isn't there when the rule is validated, so
the deletion would never take place. (For some reason it was
still deleted on some platforms though - apparently not on
OS/2 GNU Make.). Anyhow addition of $(wildcard) call at this
spot was not critical anyway. See: 2009-08-22 11:59
* utils/hbmk2/hbmk2.prg
! Fixed checking wrong dependencies when non-.prg extension was
used for .prg source files in incremental mode.
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
! fixed typo in -m parameter handling
! fixed old memory leak exploited by compile time error in code with
static variables
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbdbginf.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/gencobj.c
- removed old "AutoOpen" code used for @<name>.clp, SET PROCEDURE TO ...
and DO <func> [ WITH <args,...> ] statements
It was neither Clipper compatible not working correctly in some cases.
+ added new code for multi .prg module compilation into single unit
with support for multiple file wide declarations just like Cipper
does doe @.clp files and SET PROCEDURE TO / DO ... [ WITH ... ]
% cleaned redundant code used in harbour compiler to execute grammar
parser with different conditions. Now it's much shorter and simpler
and hb_compparse() is called only from one place.
! fixed possible multiple declarations in symbol table for ANNOUNCE
function
% rewritten C code generation to increase speed and make it independent
from some internal compiler structures. Now it's shorter and faster
but it strongly uses scope attributes in symbol table so they have
to be properly set during compilation and new code for .c file
generation should help in their validation.
% few other optimizations and cleanups
Now Harbour can compile code like:
/*** t01.prg ***/
static s_var := "main sVar"
proc main()
? procname(), "->", sVar
do t02
return
/*** t02.prg ***/
static s_var := "t02 sVar"
proc t02()
? procname(), "->", sVar
return
by simpe:
harbour -n -w -es2 t01
or using tst.clp:
t01
t02
and:
harbour -n -w -es2 @tst
in both cases it works just like Clipper. Please note that in the
second version generated file inherits (like in Clipper) name from
.clp file and is called "tst.c". The .clp file name is also used
as module handler signature.
TODO: add support for multiple static functions with the same name
but coming from different .prg modules compiled into single
unit using @.clp files or SET PROCEDURE TO / DO ... [ WITH ... ]
In above modifications I already implemented it partially but
I haven't made one very important extension which strongly
interacts with symbol table usage during compilation and can
be source of really bad problems if I made sth wrong so I plan
to finish when above changes will have been tested.
* contrib/hbssl/bio.c
- Disabled feature which doesn't seem to be exported via
implibs.
+ contrib/hbssl/hbssls.hbc
+ contrib/hbssl/hbssls
+ contrib/hbssl/hbssls/Makefile
* contrib/hbssl/hbssl.hbc
* contrib/hbssl/Makefile
* Default hbssl lib is now created to link dynamically (on Windows).
+ Added static build of hbssl by the name hbssls, with new .hbc
file linking to static OpenSSL libs.
* contrib/hbssl/Makefile
+ contrib/hbssl/hbssls.hbc
* contrib/hbssl/hbssl.hbc
* bin/hb-func.sh
- Commented creation of dynamic libs. Now it's done on GNU Make
level.
* config/os2/gcc.mk
- Disabled os2/gcc .dll creation. If someone comes up with a working
solution we can readd it, but in current form it just broke os2/gcc
target with no short-term hope for a solution.
* source/common/hbver.c
+ Added "Embarcadero" to Borland C compiler name.
Borrowed from xhb / Andi Jahja
+ Readded also "Borland" to both Embarcadero and CodeGear compiler
names. Probably for most ppl "Borland" tells a hell lot more than
these names which keep changing every second year.
* contrib/gtwvg/Makefile
* contrib/hbtip/Makefile
* contrib/hbtip/hbtipssl/Makefile
* Formatting.
* INSTALL
* Updated Ubuntu external pkg list.
+ Added slang to darwin external pkg list.
* config/darwin/libs.mk
+ Added two syslib paths required for slang (gtsln).
* utils/hbmk2/hbmk2.prg
! Fixed to add user GTs before the list of user libs.
This is to ensure proper linkage with linkers which need
this (mingw f.e. and all which used lib grouping switches
before they were removed from hbmk2/make in Harbour)
* config/bin.mk
* config/dyn.mk
+ Added new HB_LINKING_VMMT variable, which is set to non-empty
if hbvmmt is to be linked. It makes it possible to add
MT dependent libs to sys lib list, if needed.
* config/linux/libs.mk
+ Adding pthread lib when HB_LINKING_VMMT is set. This isn't
needed on my *nix systems (Ubuntu and Darwin), but was used
for all platforms in postinst.sh dynlib creation logic, so
please speak up if we should add this lib to other *nix
platforms, or we can delete it from Linux.
* bin/hb-func.sh
! Fixed recent mistake in gpm detection at postinst (now redundant)
dynlib generation phase.
* source/rtl/fssize.c
! Fixed warnings shown by mingw64 4.5.0.
* config/detfun.mk
+ Now accepting HB_WITH_* control variables in place of HB_INC_* once.
If HB_WITH_* is set it overrides HB_INC_*. Experimental yet.
* Minor in comments.
* config/detect.mk
* Minor correction for conf.mk inclusion.
* config/rules.mk
* config/dos/djgpp.mk
* config/common/watcom.mk
* config/os2/gcc.mk
+ Finished support for HB_LDFLAGS variable (to hold Makefile
local extra linker options). We don't use this feature yet.
* config/sunos/sunpro.mk
+ Setting CXX for sunos/sunpro.mk to make it build .cpp files
without forcing cpp mode explicitly. (suncc seems to do nothing
with .cpp input files.)
* config/bsd/libs.mk
* config/hpux/libs.mk
* config/darwin/libs.mk
* config/sunos/libs.mk
- Deleted commented /usr/X11R6/lib64 lib dir. It's a Linux
distro specific thing.
* config/linux/libs.mk
+ Added comment for /usr/X11R6/lib64
* external/libhpdf/Makefile
! Fixed typo in recent rework, causing embedded libpng
component not being detected.
* config/global.mk
! Reverted override support. This will need 3.81.90,
in 3.81 override and export keywords don't mix tool
well together, or I'm missing something, it could be.
* INSTALL
+ Added new HB_INC_* values to the list. Added more
information on them. Described 'no' option.
+ Added info on passing these config vars through cmdline.
* config/global.mk
+ Added support to override some vars even if passed via
make commandline.
* config/bsd/gcc.mk
* config/hpux/gcc.mk
! Restored cmdline lenght saver trick for BSD and HPUX after
giving this http://www.in-ulm.de/~mascheck/various/argmax/
a bit more careful read.
* config/linux/libs.mk
! Deleted some stuff left when doing the copy from
global.mk (yesterday).
Should fix double -fPIC switches seen on 64-bit Linux builds.
* config/linux/libs.mk
+ Adding /usr/X11R6/lib64 to sys lib path list on 64-bit systems.
If you find this wrong, please tell, we can tweak conditions.
* config/bsd/gcc.mk
* config/darwin/gcc.mk
* config/hpux/gcc.mk
* config/linux/gcc.mk
* config/sunos/gcc.mk
* Changed to just plain pass list of obj on cmdline in dynamic
lib creation rule. Should be safe on these OSes according to this doc:
http://www.in-ulm.de/~mascheck/various/argmax/
(we need about 31-32KB of cmdline at this moment)
* config/bsd/gcc.mk
* config/hpux/gcc.mk
* config/linux/gcc.mk
* config/linux/icc.mk
* config/sunos/gcc.mk
* Changed to use different method to pass object file list to gcc.
Previous method (@<filename>) only works in 4.x (?) gcc versions.
* config/linux/sunpro.mk
+ Setting CXX for linux/sunpro.mk to make it build .cpp files
without forcing cpp mode explicitly. (suncc seems to do nothing
with .cpp input files.)
Same fix for sunos/sunpro?
* config/rules.mk
+ Added option to override C++ compiler tool name with
$(CXX) variable.
* external/sqlite3/Makefile
* external/libpng/Makefile
* Formatting/cleanup.
* config/linux/sunpro.mk
* config/sunos/sunpro.mk
+ Added HB_CCPATH, HB_CCPREFIX and HB_CCPOSTFIX support for CC and LD.
- Deleted HB_CCPREFIX from linux/sunpro AR command.
* config/global.mk
* Updated comments.