* config/darwin/clang.mk
* config/darwin/gcc.mk
* config/darwin/global.mk
* config/darwin/icc.mk
* config/darwin/libs.mk
* utils/hbmk2/hbmk2.prg
* synced with Viktor's modifications in 3.4 branch:
; 2017-11-11 13:14 UTC Viktor Szakats:
* switch to call the C compiler to link dynamic libs on darwin,
which is the recommended way to do this, as suggested by Apple.
This also aligns the platform better with other *nix platforms.
'libtool' was used before, but that started having intermittent
issues around Sierra (mitigated by disabling parallel build),
which returned and got worse in High Sierra (with no remedy).
The symptom was 'ld: file not found: ' errors with the filename
not shown or appearing as garbage, then a 'libtool: internal link
edit command failed'. This was reported and will be fixed in a
future Xcode release.
Ref: Apple Radar 34944562
* config/global.mk
* config/rules.mk
+ added new user build envvar HB_USER_DCFLAGS
It allows to set C compiler parameters to compile .c code for
dynamic libraries.
* src/rtl/hbsocket.c
! fixed fcntl(F_SETFL) 3-rd parameter in hb_socketSetBlockingIO(),
By mistake I used long instead of int. it created problem on big
endian 64 bit machines.
* include/hbgtcore.h
* src/rtl/hbgtcore.c
+ added new C functions for GT programmers:
void hb_gt_BaseUnlock( PHB_GT pGT );
void hb_gt_BaseLock( PHB_GT pGT );
void hb_gtSleep( PHB_GT pGT, double dSeconds );
* src/rtl/hbgtcore.c
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtdos/gtdos.c
* src/rtl/gtgui/gtgui.c
* src/rtl/gtos2/gtos2.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtsln/gtsln.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* src/rtl/gtwin/gtwin.c
* src/rtl/gtwvt/gtwvt.c
* src/rtl/gtxwc/gtxwc.c
* use new functions to unblock GT when low level TONE() code is
executed. It allows other threads to access shared GT driver
when one of them executes TONE()
* contrib/hbexpat/hbexpat.hbx
* regenerated automatically
* *
* partial sync with the 3.4 fork codebase. These are the things
synces for the most part:
- copyright headers
- grammar/typos in comments and some readmes
- comment/whitespace/decorations
- variable scoping in C files
- DO CASE/SWITCH and some other alternate syntax usage
- minimal amount of human readable text in strings
- minor code updates
- HB_TRACE() void * casts for pointers and few other changes to
avoid C compiler warnings
- various other, minor code cleanups
- only Harbour/C code/headers were touched in src, utils, contrib,
include. No 3rd party code, no make files, and with just a few
exceptions, no 'tests' code was touched.
- certain components were not touched were 3.4 diverged too much
already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
- the goal was that no actual program logic should be altered by
these changes. Except some possible minor exceptions, any such
change is probably a bug in this patch.
It's a massive patch, if you find anything broken after it, please
open an Issue with the details. Build test was done on macOS.
The goal is make it easier to see what actual code/logic was changed
in 3.4 compared to 3.2 and to make patches easier to apply in both
ways.
* include/hbapifs.h
* src/rtl/filesys.c
+ added new C functions for UNIX and DJGPP builds:
int hb_fsPollFD( PHB_POLLFD pPollSet, int iCount,
HB_MAXINT nTimeOut );
int hb_fsCanRead( HB_FHANDLE hFileHandle, HB_MAXINT nTimeOut );
int hb_fsCanWrite( HB_FHANDLE hFileHandle, HB_MAXINT nTimeOut );
These functions should be used instead of select() in C code to hide
low level access to select()/poll() functionality in *nix builds
(they are supported by DJGPP only to simplify existing code common
for DJGPP and *nix builds). Maximum file handle value which can be
used in select() is limited by FD_SETSIZE. Please note that it's
file handle value not number of file handles in the set. It creates
serious problem for applications which operate on great number of
handles (i.e. servers which have to keep open many sockets, pipes,
files, etc. for their clients) so the new file/socket/pipe/...
handle value can easy exceed FD_SETSIZE limit and in such case
cannot be used with select(). The modification on
2016-04-05 21:24 UTC+0200 Przemyslaw Czerpak
resolved the problem only for sockets and pipes in code which uses
corresponding hb_socket*() and hb_fsPipe*() API but not for all
other cases. This one is for POSIX compilant code which needs pure
POSIX select()/poll() functionality.
Please note that HB_POLLFD structure should is compatible with
struct pollfd defined by POSIX.1-2001 anyhow not all platforms
confirm this standard so portable Harbour code should always use
HB_POLLFD and HB_POLL* constant values instead of POLL* ones.
* include/hbdate.h
* src/common/hbdate.c
+ added new C functions to calculate timeouts:
HB_MAXUINT hb_timerGet( void );
HB_MAXUINT hb_timerInit( HB_MAXINT nTimeOut );
HB_MAXINT hb_timerTest( HB_MAXINT nTimeOut, HB_MAXUINT * pnTimer );
They are designed to be used instead of direct access to
hb_dateMilliSeconds(). Now they internally use hb_dateMilliSeconds()
but it can be easy replaced by any other system monotonic clock by
one local modification inside hb_timerGet() function.
* src/rtl/filesys.c
* use hb_timer*() functions instead of hb_dateMilliSeconds()
* use hb_fsCanRead()/hb_fsCanWrite() instead of select()/poll()
It also fixed timeout processing inside hb_fsPipeIsData() and
hb_fsPipeWrite() in builds using poll()
* src/rtl/filesys.c
* src/rtl/gtcrs/gtcrs.h
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtsln/gtsln.c
* src/rtl/gtsln/mousesln.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* src/rtl/gtxwc/gtxwc.c
* use hb_timer*() functions instead of hb_dateMilliSeconds()
* use hb_fsCanRead()/hb_fsCanWrite() instead of select()/poll()
* src/vm/thread.c:
* src/rtl/gtwin/gtwin.c
* src/rtl/hbcom.c
* src/rtl/hbgtcore.c
* src/rtl/hblpp.c
* src/rtl/idle.c
* contrib/hbnetio/netiosrv.c:
* contrib/hbssl/ssl_sock.c:
* use hb_timer*() functions instead of hb_dateMilliSeconds()
* contrib/xhb/hboutdbg.c
* use hb_fsCanWrite() instead of select()
* src/rtl/hbsocket.c
! repeat select() interrupted by signal inside hb_socketSelect()
when poll() function is not available
* src/3rd/hbdossrl/serial.c
! fixed -Wshift-negative-value GCC warnings
* *
% remove brandings and homepage [1] from copyright header. Pass 1 - using script.
[1] nobody has access to it anymore AFAIK - and it's also just
a redirect since long
! update url in copyright header
; this should make the diff between 3.4 and 3.2 easier to manage
* include/hbgtinfo.ch
* removed unused HB_GTI_KBD_* macros
* redefined few other HB_GTI_KBD_* macros to be more HB_KF_* friendly.
[INCOMPATIBLE]
; Warning this modification is not binary compatible so if someone uses
HB_GTI_KBD_SCROLOCK, HB_GTI_KBD_NUMLOCK, HB_GTI_KBD_CAPSLOCK,
HB_GTI_KBD_LSHIFT, HB_GTI_KBD_RSHIFT,
HB_GTI_KBD_LCTRL, HB_GTI_KBD_RCTRL,
HB_GTI_KBD_LALT, HB_GTI_KBD_RALT,
HB_GTI_KBD_LWIN, HB_GTI_KBD_RWIN or
HB_GTI_KBD_MENU
then he should recompile his code with new hbgtinfo.ch header files.
* include/hbgtcore.h
* src/rtl/gtkeycod.c
* src/rtl/gtdos/gtdos.c
* src/rtl/gtos2/gtos2.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtstd/gtstd.c
+ added support for Harbour extended keycodes
* src/rtl/gtos2/gtos2.c
+ added support for HB_GTI_KBDSHIFTS
* src/rtl/gtdos/gtdos.c
! fixed CTRL+C and CTRL+BREAK handling in OpenWatcom builds
* src/rtl/inkeyapi.c
! fixed translation for CTRL + @
* tests/gtkeys.prg
+ added raw keyboard test - it disables any additional interactions
* modified Harbour output to show more information about extended
keycodes
* src/rtl/hbcom.c
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* added workaround for bug in some Linux kernels (i.e.
3.13.0-64-generic Ubuntu) in which select() unconditionally
accepts terminal device for reading if c_cc[ VMIN ] = 0
It's very serious problem, i.e. in GTTRM no input is possible
in such kernels without this workaround.
* src/rtl/dirscan.prg
* modified hb_DirScan() and hb_DirRemoveAll() to work with Harbour
File IO API (hb_vf*() functions)
+ added new PRG function:
hb_FileDelete( <cFileMask> [, <cAttr> ] ) -> <lResult>
this function removes files which match given <cFileMask>
(it may contain path) and returns .T. if at least one file
was deleted. Optional <cAttr> parameter can be used to include
system ("S") and hidden ("H") files. If <cAttr> contains "R"
letter then before deleting READONLY attribute is removed from
files (it's necessary to remove files with READONLY attribute
in systems like DOS, MS-Windows or OS2). This function uses
Harbour File IO API (hb_vf*() functions)
* remove READONLY attribute from files in hb_DirRemoveAll()
* include/harbour.hbx
+ added hb_DirRemoveAll() and hb_FileDelete()
* contrib/hbct/files.c
! do not allow to remove empty directories by FileDelete() function
even if user explicitly sets directory attribute - CT3 compatible fix.
! remove READONLY attribute before deleting READONLY files if 2-nd
parameter of FileDelete() contains READONLY bit
* src/rtl/filesys.c
* formatting
* ChangeLog.txt
! typo
* src/vm/dlmalloc.c
* use __builtin_clz() and __builtin_ctz() only with GCC 3.4 or newer.
Problem reported by David Arturo Macias Corona and OS2 GCC3.3.5.
* README.md
+ added link suggested by David to os2gcc454 from Paul Smedley
* src/rtl/gtstd/gtstd.c
+ accept keyboard input from redirected file on platforms without
dedicated code for keyboard support in GTSTD
* (all files)
* stripped svn header
* minor cleanups
; use following command to find out the history of files:
git log
git log --follow
git blame
git annotate