* harbour/source/rtl/hbproces.c
! fixed hb_fsProcessRun() (__RUN() and HB_RUN()) in WinCE builds
to pass application name as 1-st parameters
+ added parameters passing to hb_fsProcessRun() (__RUN() and HB_RUN())
in WinCE builds - please test.
* include/hbsetup.h
% Optimized out HB_OS_UNIX_COMPATIBLE. HB_OS_UNIX should be used
instead. Since the definition logic for HB_OS_UNIX was completely
different from HB_OS_UNIX_COMPATIBLE, it may be possible that
it's not 100% the same as before, although their meaning was
the same.
HB_OS_UNIX_COMPATIBLE is still available for compatibility, but
it's now marked with HB_LEGACY_LEVEL2 and will be removed in next
major release.
* include/hbapifs.h
* include/hb_io.h
* include/hbsocket.h
* source/vm/set.c
* source/debug/dbgentry.c
* source/common/hbffind.c
* source/rtl/fscopy.c
* source/rtl/fstemp.c
* source/rtl/gtstd/gtstd.c
* source/rtl/gttrm/gttrm.c
* source/rtl/version.c
* source/rtl/hbsocket.c
* source/rtl/copyfile.c
* source/rtl/filesys.c
* source/rtl/console.c
* source/rtl/cputime.c
* source/rtl/gtpca/gtpca.c
* source/rtl/fssize.c
* source/rtl/memofile.c
* source/compiler/hbcomp.c
* source/compiler/gencobj.c
* contrib/hbct/files.c
* contrib/xhb/xhbcopyf.c
* contrib/xhb/hbserv.c
* contrib/hbnf/getenvrn.c
* HB_OS_UNIX_COMPATIBLE -> HB_OS_UNIX
* config/global.cf
* HB_UNIX_COMPATIBLE -> HB_OS_UNIX
* ChangeLog
* source/rtl/Makefile
* source/rdd/Makefile
* config/bin.cf
* config/wce/global.cf
* config/rules.cf
% Using HB_PRGFLAGS instead of HB_GCMODE. Logic is now simple
and standard.
* config/global.cf
* config/rules.cf
* config/dos/watcom.cf
* config/win/watcom.cf
* config/os2/watcom.cf
% Using HB_PRGFLAGS instead of HB_FLAGSEXTRA.
% Using HB_CFLAGS and HB_PRGFLAGS instead of HB_CDBG.
% Using HB_CFLAGS instead of HB_CUNICODE.
% Moved all flags from HB_RULE to HB_FLAGS (except HB_USER_PRGFLAGS).
This only affects dos/watcom, more cmdlines will be put in HARBOURCMD.
* external/sqlite3/Makefile
* external/libhpdf/Makefile
* external/libpng/Makefile
* source/vm/maindllh/Makefile
* source/vm/maindllp/Makefile
* source/vm/vmmt/Makefile
* source/rtl/gtxwc/Makefile
* source/rtl/gtcrs/Makefile
* source/rtl/gttrm/Makefile
* source/rtl/gtsln/Makefile
* contrib/gtalleg/Makefile
* contrib/hbmysql/Makefile
* contrib/hbodbc/Makefile
* contrib/hbsqlit3/Makefile
* contrib/hbqt/Makefile
* contrib/hbfbird/Makefile
* contrib/hbcurl/hbcurls/Makefile
* contrib/hbcurl/Makefile
* contrib/gtqtc/Makefile
* contrib/rddsql/sddmy/Makefile
* contrib/rddsql/sddpg/Makefile
* contrib/rddsql/sddfb/Makefile
* contrib/rddsql/sddodbc/Makefile
* contrib/hbhpdf/Makefile
* contrib/hbpgsql/Makefile
* contrib/rddads/Makefile
* contrib/hbfimage/Makefile
* contrib/hbgd/Makefile
* contrib/hbtip/hbtipssl/Makefile
* contrib/hbssl/Makefile
! Using HB_CFLAGS/HB_PRGFLAGS to specify Makefile local
compiler settings instead of modifying HB_USER_*FLAGS.
This way the double defines are gone.
+ Included global.cf to all Makefiles which needs to modify
HB_CFLAGS/HB_PRGFLAGS. Probably we should move global.cf
inclusion to the top of all Makefiles as a convention.
Not terribly elegant, but solves a few problems and
more efficient.
% Changed ', -I$(d))' to ',-I$(d))' along the way. This avoids
wasting an extra space in command line.
; NOTE: It'd still be beneficial to find a way to get rid of
'descend' rule. It could make cmdlines cleaner/shorter
and whole build process simpler/faster. I didn't manage
so far.
* source/vm/Makefile
* Deleted 'HB_USER_CFLAGS := $(subst -DHB_MT_VM,,$(HB_USER_CFLAGS))'
(since it's no longer supported practice to modify user supplied flags)
I'm not sure if it's important enough to have. AFAIK there is no
reason users use HB_MT_VM define, it's not a public setting, so we
shouldn't go too much far in trying to protect against its presence.
If it's needed, we should add 'HB_CFLAGS += -DHB_ST_VM' and handle
HB_ST_VM as the reverse of HB_MT_VM inside the source.
* source/rdd/dbffpt/dbffpt1.c
* source/rdd/dbffpt/Makefile
* Optimizations are now disabled using #pragma for __XCC__ instead of
deleting them from HB_USER_CFLAGS. Please test, and see above on
modifying HB_USER_CFLAGS in our make files.
* bin/postinst.cmd
! Deleted double quote from target dir in xcopy commands.
Blind change.
* utils/hbtest/rt_main.ch
* utils/hbtest/hbtest.hbp
* utils/hbtest/Makefile
+ Changed to use #pragma to turn on line numbers instead of
using HB_USER_PRGFLAGS (or HB_PRGFLAGS). This way there is
no need for Makefile hack/tweaks and it works with all make methods
automatically.
* config/instsh.cf
! Partially restored a few things which were lost without comments
in prev OS/2 commit:
- Formatting
- '@' prefixes
- '-' prefixes
* source/rtl/hbsocket.c
! Applied fix for Cygwin as per Przemek's instructions.
(I've guarded #undef HB_OS_WIN with defined( __CYGWIN_ ))
* INSTALL
- Deleted some by now irrelevant restrictions and rules.
+ Added pointers to NT GNU Make, DJ GNU Make and OS/2 GNU Make.
+ Added HB_COMPILER/HB_ARCHITECTURE to option list. These
should now be mostly optional. They are only needed in a
few situations when autodetection cannot work (secondary pocc
targets for example), or in cross build situations when
we want to force some non-native configuration.
% Deleted HB_INSTALL_PREFIX from examples. It's optional.
% Deleted all settings which are now autodetected.
I didn't retest them of course, please try them, and if
something was removed by mistake pls report it.
The reduction is quite dramatic. Starting the build is
really only just starting GNU Make in most cases.
% Converted *all* examples to not use starter script/batch
files. As a next step I'll probably delete them to make
even *less* choices for builders and because current
starter files don't offer anything interesting anymore.
Maybe also included GNU Make executable will also be
deleted.
% Simplified Cygwin example.
* make_gnu.bat
- Deleted Cygwin logic.
; I just realized that after all these GNU Make development,
there is no need at all for make_gnu.sh for Cygwin and it's
a no brainer to launch make either using NT shell or Cygwin/MSYS
shell. It just works by starting GNU Make in whichever shell
or environment you are. [ Well, with NT shell it doesn't seem
to work because gcc.exe is named gcc-3.exe on my system,
anyway, this doesn't change the point. ]
The only remaining "complexity" is finding the name of GNU
Make in a given environment and not use the wrong one
(f.e. Cygwin make.exe in NT shell).
* config/global.cf
+ Added svnversion output in verbose mode.
* source/rtl/gtsln/gtsln.c
! Fixed linux/gcc warning. Now write() retval is checked.
* config/global.cf
! Fixed wrong autodetection due to recent change.
(HB_COMPILER needs to be checked against empty value)
* INSTALL
* OS/2 prerequisites added. (currently not relevant, but anyway)
* bin/postinst.bat
* bin/hb-mkdyn.bat
* make_gnu.bat
+ Reworked the way .dll generation is done in Harbour build process.
New method solves the problem in one pass, instead of invoking
make twice and requiring starter script to control this.
The new trick is that CC_RULE will generate both dynamic and static
objects for libs included in the .dll for compilers where such trick
is necessary (currently all win/wce compilers except gcc based ones).
* Changed HB_BUILD_LOG forming. Since at this point ARCH/COMP values
aren't known (and just for this purpose it's not worth to maintain
parallel detection logic in start script), the automatically
generated log file will contain the date/time. Maybe even this will
be dropped in the future. Since this is the only remaining logic
in starter script (plus finding correct GNU Make, but that's even
smaller role)
; I didn't test watcom yet, plus mpkg_gnu.bat isn't working yet,
it needs to be moved to postinst phase.
; After these changes, there is basically no need for make starter
scripts. Maybe I'll even remove included make tools to make things
cleaner/leaner.
; TODO: Revise starter .sh scripts.
; TODO: mpkg_gnu.bat rework to run from postinst.
; TODO: Do some cleanup, remove redundancy in settings, etcetc.
; TOFIX: Fix watcom .dll generation.
* config/global.cf
! Deleted double MAKE info line.
+ Showing detected shell in verbose mode.
+ Added mkdir/rm detection for OS/2 shells. (commented)
% Optimized HB_BIN_COMPILE detection by using $(realpath) function.
Now it's only detected once per make run.
+ Added HB_*_INSTALL value defaulting similar to make_gnu.sh
for *nix platforms. (adding /harbour postfix to lib/inc dirs when
HB_INSTALL_PREFIX is system location (/usr or /opt). Please review.
* config/lib.cf
+ Added HB_DYN_COMPILE to control compiling for dynamic libs in
a sperate command.
+ Added HB_DYN_LIBS to hold list of libs which should be built
with separate command for dynamic libs.
* config/rules.cf
+ Added logic for duplicate CC_RULE.
TODO: Notice that it's not yet working when CC_RULE is overridden
on compiler level. Help would be appreciate here.
* config/wce/msvcarm.cf
* config/wce/poccarm.cf
* config/win/watcom.cf
* config/win/icc.cf
* config/win/msvc.cf
* config/win/xcc.cf
* config/win/pocc.cf
* config/win/bcc.cf
+ Enabled HB_DYN_COMPILE for these compilers.
* contrib/gtqtc/gtqtc.hbc
! Fixed lib order for mingw, supc++ moved to the end of list.
* external/sqlite3/Makefile
* external/libhpdf/Makefile
* external/libpng/Makefile
* external/Makefile
* source/rtl/gtxwc/Makefile
* source/rtl/gtcrs/Makefile
* source/rtl/gtsln/Makefile
* contrib/Makefile
* contrib/gtalleg/Makefile
* contrib/hbmysql/Makefile
* contrib/hbodbc/Makefile
* contrib/hbsqlit3/Makefile
* contrib/hbqt/Makefile
* contrib/hbfbird/Makefile
* contrib/hbcurl/Makefile
* contrib/gtqtc/Makefile
* contrib/rddsql/sddmy/Makefile
* contrib/rddsql/sddpg/Makefile
* contrib/rddsql/sddfb/Makefile
* contrib/rddsql/sddodbc/Makefile
* contrib/hbhpdf/Makefile
* contrib/hbpgsql/Makefile
* contrib/rddads/Makefile
* contrib/hbfimage/Makefile
* contrib/hbgd/Makefile
* contrib/hbssl/Makefile
+ Indentation.
% Using ':=' in '*_OK := $(foreach...' expressions, instead of
former unsafe '+='.
* config/win/mingw.cf
* config/wce/mingwarm.cf
* config/win/cygwin.cf
+ Using 'crs' instead of 'r' as AR command.
* config/install.cf
+ Don't define rule if INSTALL_RULE is empty.
Cannot currently happen.
* config/header.cf
% Minor optimization.
* config/rules.cf
! Changed CC_RULE and CPP_RULE to have CC_OUT option _before_ CC_IN.
Quick check didn't reveal any problems with this accross our supported
compiler, but I may be wrong, so pls check me, I didn't test this
change thoroughly.
This change fixes CC_OUT for bcc, where it was ignored before.
If this is breaks other compilers, bcc specific CC_RULE should be
added to win/bcc.cf.
* utils/hbmk2/hbmk2.prg
* source/rtl/gtcrs/gtcrs.c
* source/rtl/gtcrs/gtcrs.h
* source/rtl/gtcrs/Makefile
* source/rtl/gttrm/Makefile
* source/rtl/gttrm/gttrm.c
* source/rtl/gtsln/mousesln.c
* source/rtl/gtsln/gtsln.c
* source/rtl/gtsln/Makefile
* HAVE_GPM_H -> HB_HAS_GPM
* config/global.cf
+ Added some compile-time macros in comment.
* Minor correction to MKFLAGS comment.
* source/rtl/console.c
* source/rtl/hbgtcore.c
* Changed wording 'screen driver' to 'Harbour terminal (GT)'.
Former term isn't used by us.
* config/bsd/gcc.cf
* config/darwin/gcc.cf
* config/hpux/gcc.cf
* config/dos/djgpp.cf
* config/linux/gcc.cf
* config/linux/icc.cf
* config/linux/sunpro.cf
* config/os2/gcc.cf
* config/sunos/gcc.cf
* config/sunos/sunpro.cf
+ Readded accidentally deleted feature to include *nix system
libs needed for rtl, only if rtl is actually linked.
(IOW in practice don't link them for harbour/hbpp executables)
! Fixed a few old problems where some extra libs were always
linked. Now m is the only one linked in all scenarios.
+ Added linking pdcurses along with gtcrs for djgpp.
* Standardized LDFLAGS in linux/icc (left from previous modification).
! Indentations corrected.
* source/rtl/gtcrs/Makefile
* source/rtl/gttrm/Makefile
* source/rtl/gtsln/Makefile
* config/global.cf
! Hopefully fixed GPM detection with pure (no starter script)
GNU Make invocations. It needs to be done centrally,
as it's used in multiple modules, plus it has external lib
dependency.
; TODO: Streamline macro usage regarding external dependencies.
There is currently HAS*, HAVE*, HB_HAVE*, HB_WITHOUT*
plus some other variations.
We should probably stick to HB_BUILD_WITH_* for user
level control, and HB_HAS_* for internal detection logic.
* harbour/source/rtl/fstemp.c
* enabled mkstemps() in *BSD and Darwin builds
* enabled large file support and use mkstemp64() and mkstemps64()
when available - please test with different *nixes
* harbour/source/rtl/fstemp.c
* enabled mkstmp() in SunOS builds (is it supported by MacOSX?)
+ added optional support for mkstemps() - it's disabled by default
* harbour/contrib/xhb/hbcompat.ch
! removed some old not longer valid translations
xHarbour developers should copy current hbcompat.ch from
Harbour SVN to xHarbour CVS
* source/rtl/fstemp.c
! Fixed regression in hb_fsCreateTemp() after 2009-08-07 11:55 UTC+0200
where temp files couldn't be opened, instead a lot of temp filenames
were created.
* config/global.cf
! Fixed 'sh' HB_SHELL detection. Problem experienced with
Cygwin GNU Make, where SHLVL isn't defined on the first
level. Now also checking for SHELL=/bin/sh to detect sh
shell.
* tests/multifnc/Makefile
* external/sqlite3/Makefile
* external/libhpdf/Makefile
* external/libpng/Makefile
* contrib/gtalleg/Makefile
* contrib/hbodbc/Makefile
* contrib/hbtpathy/Makefile
* contrib/hbsqlit3/Makefile
* contrib/hbblat/Makefile
* contrib/hbqt/Makefile
* contrib/hbfbird/Makefile
* contrib/hbxbp/Makefile
* contrib/hbcurl/Makefile
* contrib/gtqtc/Makefile
* contrib/rddsql/sddfb/Makefile
* contrib/rddsql/sddodbc/Makefile
* contrib/rddado/Makefile
* contrib/gtwvg/Makefile
* contrib/rddads/Makefile
* contrib/hbfimage/Makefile
* contrib/hbtip/Makefile
* contrib/hbwin/Makefile
* contrib/hbssl/Makefile
* source/vm/Makefile
* source/vm/vmmt/Makefile
* source/rtl/gtdos/Makefile
* source/rtl/gtwin/Makefile
* source/rtl/gtxwc/Makefile
* source/rtl/gtcrs/Makefile
* source/rtl/gttrm/Makefile
* source/rtl/Makefile
* source/rtl/gtos2/Makefile
* source/rtl/gtsln/Makefile
* source/rtl/gtgui/Makefile
* source/rtl/gtwvt/Makefile
* source/rdd/Makefile
* source/rdd/dbffpt/Makefile
! Including 'global.cf' directly to make HB_ARCHITECTURE/HB_COMPILER/HB_COMMERCE
variables work in case we're relying on autodetection.
; TODO: May need to do this for a few other cases where detection is relying
on some additional variables. Like HB_XBUILD, which needs to be
cleaned further, maybe autodetection added.
; NOTE: Above changes mean that from now on for basic build usage it's
enough to have the compiler in PATH and to issue a simple 'make'
or 'mingw32-make' (or whatever GNU Make is called in that environment),
and make process should just work. IOW, no need to go through
"starter" scripts in root (make_gnu.*).
* source/rtl/rat.c
! HB_RAT() fixed to not ignore nEnd parameter if it's out of bound.
In such case it will now return zero ("not found").
Mindaugas, please verify if this is what you proposed.
* contrib/hbxbp/tests/demoxbp.prg
* Added hb_DirBase() to local file references, to make these
work when no run from its own directory.
! Using test.dbf in tests.
- contrib/hbxbp/tests/test.dbf
- Deleted duplicated test.dbf.
* contrib/hbtip/client.prg
* HAVE_OPENSSL -> HAS_OPENSSL
* contrib/hbwin/olecore.c
* source/rtl/cdpapi.c
* Minor formatting.
* source/rtl/filesys.c
! Fixed FO_EXCL flag on win/wce platforms. It was ignored before.
% Deleted some unnecessary casts.
* contrib/hbtip/log.prg
! Fixed to avoid infinite loops when trying to create log files
on a non-existing path.
* contrib/hbqt/hbqt_slots.cpp
! Deleted windows.h.
* include/hbsetup.h
+ PPC CPU detection made better.
* include/hbatomic.h
* source/vm/maindllp.c
* source/rtl/gttone.c
+ Using HB_CPU_* macros to detect CPU instead of compiler
specific solutions.
Przemek, please review me.
* source/vm/maindllp.c
% Using hbver.h constants to form the version number
included in the .dll name. So it's now maintainence
free.
% Reduced redundancy when forming .dll names.
* source/vm/maindllp.c
* utils/hbmk2/hbmk2.prg
* Renamed wce .dll to harbour[mt]-20-wce-arm.dll
* Renamed non-ARM wce .dlls to harbour[mt]-20-wce.dll
* INSTALL
+ config/linux/sunpro.cf
+ Added Sun Studio compiler support for Linux platforms.
Thanks Tamas Tevesz for the tip that this port exists.
It has various problems to fix, but it's a start.
* config/sunos/sunpro.cf
! Typo in prev commit.
* config/global.cf
+ Minor improvements.
; NOTE:
I was experimenting how to return HB_COMPILER
and HB_ARCHITECTURE values from GNU Make to caller batch/script.
So far no success.
Help/ideas would be much appreciated. This would be needed
to fully switch to GNU Make level arch/comp detection, since
these values are also needed by make_gnu*.*, mpkg_gnu.* scripts.
* source/rtl/hbinet.c
* Renamed iErrorCode to iError.
* config/header.cf
* config/rules.cf
* config/none.cf
* config/global.cf
* config/doc.cf
* config/lib.cf
* config/bin.cf
* config/dir.cf
* config/test.cf
+ Added HB_COMPILER and HB_ARCHITECTURE autodetection.
It's experimental yet.
+ Added support for HB_BUILD_SUBDIR envvar which can
extend the <arch>/<comp> path by arbitrary subdir(s).
Useful to keep custom binary builds in parallel, f.e.
release/debug, cpp/c, cpu targets. Notice that hbmk2
will not be able to use such customized directory
structure yet, but there'll probably be a cmdline option
for that in the future (it won't/can't be automatic).
Notice, this feature doesn't work yet on OS/2 because
the shell doesn't support 'mkdir -p' equivalent.
* Cleaned internal ARCH_COMP var usage.
% Deleted SOURCE_DIR usage, it was a no-op.
* make_gnu.bat
! Fixed autodetection of mingwarm.
; Autodetection code will have to be deleted from here anyway.
+ config/os2-mkdir.exe
+ Added OS/2 GNU mkdir executable. (not yet used)
* examples/superlib/superlib.dif
+ Added 'const'.
* source/rtl/hbinet.c
! Fixed to use hb_retc() to return hb_socketErrorStr() value.
* source/rtl/hbinet.c
% Cleaned old error description handling logic. Now the error
desc is dynamically retrieved instead of being stored along
the error code.
* harbour/source/rtl/hbinet.c
! modified hb_inetRecv[All]() to always return number
of bytes read if at least one byte was successfully read
just like in documentation so it's not longer necessary to
use hb_inetCount() to check real number of read bytes.
On error they return -1 and 0 when foreign host closed connection.
! modified hb_inetSend[All]() to always return number of written
bytes if at least one byte was successfully written so it's not
longer necessary to use hb_inetCount() to check real number of
written bytes. On error they return -1.
! modified hb_inetRecvLine() to return "" on errors and always
set numeric value with error code or number of bytes read
in 2-nd parameter passed by reference
! modified hb_inetDataReady() to return -1 instead of .F. to
indicate errors when socket is not open socket
! modified hb_inetRecvLine() and hb_inetRecvEndBlock() to work
like in documentation and set in 2-nd parameter passed by
reference the size of read line with line terminator, -1
or error and 0 when foreign host closed connection.
! modified hb_inetRecvEndBlock() to always use default EOL when
there is no not empty string in passed string parameter or
passed array with line terminators
! fixed some small differences between hb_inetRecvLine() and
hb_inetRecvEndBlock()
! fixed returned values in hb_InetDGramSend() and hb_InetDGramRecv()
to be synced with documentation
* minor: modified hb_inetRecvEndBlock() to use as default EOL
s_inetCRLF instead of hardcoded "\r\n"
* eliminated some redundant code
+ added automatic socket initialization in windows builds
% added support for read ahead buffer in hb_inetRecvLine() and
hb_inetRecvEndBlock() and updated other functions which may
interact with it. It greatly improved the speed of code
which extensively uses above functions.
Warning!!! Above modifications may force updating other code which used
some undocumented hb_inet*() functions behavior i.e. some side
effects in previous implementation. Please update your code
if necessary.
* harbour/doc/inet.txt
! modified hb_inetAccept() documentation wrongly describing value
returned on error when it's NIL
* harbour/config/os2/watcom.cf
! fixes for real OS2 command processor - please test
* include/hbextern.ch
* source/rtl/dateshb.c
+ Added HB_UTCOFFSET() -> <nSecs> core function to return UTC offset
as signed number in seconds.
* contrib/hbwin/win_misc.c
+ Copied WIN_SYSREFRESH() from httpsrv. Bit reworked (types, goto,
64-bit compatibility, unnecessary outer loop), pls review.
* examples/httpsrv/uhttpd.hbp
- examples/httpsrv/uhttpdc.c
* examples/httpsrv/uhttpd.prg
* HB_UTCOFFSET() renamed to UHTTPD_UTCOFFSET() and rewritten as .prg.
! Using __PLATFORM__WINDOWS to enable WIN_SYSREFRESH() calls.
* harbour/source/rtl/hbsocket.c
* force blocking IO on socket returned by accept() - on some system
new sockets can inherit blocking IO flag from the listening socket
* harbour/source/rtl/hbsocket.c
! fixed stupid typo in S&R - I reverted select() socket sets
in send()/recv() when I was modifying function names.
It can be also an answer why it exploited some problems
with hb_InetRecvLine() in Francesco code.
* harbour/source/rtl/hbsocket.c
* accept NULL and empty string "" as default address (INADDR_ANY)
in hb_socketInet?Addr() functions
* harbour/source/rtl/hbinet.c
% use NULL as default address in hb_socketInetAddr()
* harbour/source/rtl/gtcrs/Makefile
* disabled from OS2 builds - if someone knows OS2 curses port then
he can try to reenable it and update gtcrs code to compile with it.