* include/harbour.hbx
* include/hbsocket.h
* src/rtl/hbsocket.c
* src/rtl/hbinet.c
* src/rtl/hbsockhb.c
+ Added hb_socketSetExclusiveAddr() on .c level.
+ Added hb_socketSetExclusiveAddr() on .prg level.
* hb_socketSetReuseAddr() cleaned from SO_EXCLUSIVEADDRUSE (Windows-only)
logic.
* Changed HB_INETSERVER(), HB_INETDGRAMBIND() to call
hb_socketSetExclusiveAddr()(). We may delete these if they
cause problems on some Windows platforms, though we must
absolutely use this option (for security reasons) in every
server component, if Windows host supports it.
; TODO: Call hb_socketSetExclusiveAddr() from hbnetio server,
hbhttpd server.
* include/hbcpage.hbx
* src/codepage/Makefile
+ src/codepage/cpcs852c.c
* src/codepage/cpsk852c.c
- src/codepage/cpcskam.c
+ src/codepage/cpcskamc.c
- src/codepage/cpskkam.c
+ src/codepage/cpskkamc.c
! Fixed SK852C to be fully Clipper compatible. (generated with cpinfo)
! Added Clipper compatible CS852C CP. (generated with cpinfo)
* SK/CS Kamenicky CP moved to Clipper compatibility status.
Updated to be Clipper compatible. (generated with cpinfo)
INCOMPATIBLE. Pls update CP names if you used these.
Thanks to Jaroslav Janik for the help.
Please test all these.
* include/hbsocket.h
* src/rtl/hbsocket.c
! Fixed type in C level function name.
* src/rtl/hbdoc.prg
! Fixed to always use CRLF as EOL in internal doc data.
* contrib/hbtip/utils.c
! HB_BASE64() marked as HB_LEGACY_LEVEL3.
+ Added TIP_CRLF()
* contrib/hbtip/smtpcli.prg
* contrib/hbtip/client.prg
* contrib/hbtip/ftpcli.prg
* contrib/hbtip/mail.prg
* Using TIP_CRLF() instead of HB_INETCRLF().
* config/postinst.hbs
+ More meaningful message when doing 'make install' without
HB_INSTALL_PREFIX being set.
* contrib/hbpost.hbm
+ Added extra protection to not try to install anything when
using 'install' without target dir being specified.
* INSTALL
* Updated to reflect the optional nature of make 'install'
option.
* Updated to reflect change in HB_INSTALL_PREFIX.
* {hb_top} HB_INSTALL_PREFIX macro not documented anymore.
* include/hbdefs.h
+ Added HB_EXTERN macro to eventually replace 'extern' keyword.
* include/hbstack.h
* include/hbsocket.h
* include/hbapicls.h
* contrib/xhb/hbserv.h
* contrib/gtwvg/gtwvg.h
* contrib/hbcairo/hbcairo.h
* examples/gtwvw/gtwvw.c
* examples/gtwvw/hbgtwvw.h
! Fixed declarations to use 'extern HB_EXPORT' keyword order.
! Fixed declarations where 'extern' keyword was missing.
; TODO: To fix watcom .dll support 'extern HB_EXPORT <type> <func()>'
will have to be changed to 'extern <type> HB_EXPORT <func()>'
or even better to 'HB_EXTERN <type> HB_EXPORT <func()>' to
also stay future-proof.
* harbour/src/vm/task.c
! fixed casting for C++ builds
* harbour/src/lang/msges.c
! added hack for Solaris builds where ES is macro
TODDO: sync names of lang and corresponding code modules.
* harbour/src/vm/dynlibhb.c
* pacified warning
* harbour/contrib/xpp/xppextrn.ch
* harbour/contrib/xpp/dbcmdx.c
* harbour/include/hbextern.ch
* harbour/src/rdd/dbcmd53.c
! moved ordWildSeek() from XPP to HBRDD library.
I have no idea if XPP has such function or if it's or not
compatible with ORDWILDSEEK() functions I created for [x]Harbour
* disable ordCount() and ordWildSeek() functions when HB_CLP_STRICT
macro is set
* harbour/include/hbsocket.ch
+ added macro values interface info flags: HB_SOCKET_IFF_*
+ added macro values for interface info array indexes: HB_SOCKET_IFINFO_*
* harbour/include/hbsocket.h
* harbour/src/rtl/hbsocket.c
+ added new C function:
PHB_ITEM hb_socketGetIFaces( int af, HB_BOOL fNoAliases );
it returns array with existing interfaces description.
This code was added for non MS-Windows based platforms only.
Support for MS-Windows has to be added yet.
Some platforms may not fill all fields in the returned array.
When some fields are not supported by platform or interface then
they can contain NIL value.
On some platforms this code can effectively work only with IP4
interfaces and IP6 ones will need different implementation.
TODO: add support for alternative long interface introduced in some
new systems using 'struct lifreq' with SIOCGLIF* ioctls instead
of 'struct ifreq' and SIOCGIF*
TODO: add support for extracting hardware addreses (i.e. ethernet
macaddresses) for systems which do not support SIOCGIFHWADDR.
Please test this code with OS2 using OpenWatcom and GCC (old and
new socket API). I enabled HB_HAS_SOCKADDR_SA_LEN in OS2 builds.
OpenWatocm OS2 header files have such fields but I do know if it's
also present in GCC socket API.
* harbour/include/hbextern.ch
* harbour/src/rtl/hbinet.c
+ added new PRG function:
hb_inetIfInfo( [<lNoAliases>] [, <nAddrFamily>] ) -> <aInfo>
<lNoAliases> is .F. by default so aliases are included
<nAddrFamily> is HB_SOCKET_AF_INET by default
<aInfo> is an array in which each entry is also array with the
following fields:
HB_SOCKET_IFINFO_FAMILY 1 // adress family
HB_SOCKET_IFINFO_NAME 2 // interface name
HB_SOCKET_IFINFO_FLAGS 3 // flags HB_SOCKET_IFF_*
HB_SOCKET_IFINFO_ADDR 4 // interface address
HB_SOCKET_IFINFO_NETMASK 5 // subnetmask
HB_SOCKET_IFINFO_BROADCAST 6 // broadcast address
HB_SOCKET_IFINFO_P2PADDR 7 // point-to-point address
HB_SOCKET_IFINFO_HWADDR 8 // hardware address
Please use this code on different non MS-Windows platforms:
proc main( noAlias )
local iface
? os(), version()
? "interfaces:"
for each iface in hb_inetIfInfo( !empty( noAlias ), 0 )
? hb_valToExp( iface )
next
?
return
and check if it returns correct information about available
interfaces.
* harbour/include/hbsocket.h
* harbour/source/rtl/hbsocket.c
+ added new function hb_socketSetNoDelay() which turn off the nagle
algorithm for the specified socket.
The nagle algorithm says that we should delay sending
partial packets in the hopes of getting more data.
Be careful using this functions. It may help to improve performance
in some cases but in some other it may cause very serious overhead.
Programmer should well know what it does.
* set socket error in all hb_socket[SG]et*() functions
* harbour/contrib/hbnetio/netiocli.c
* harbour/contrib/hbnetio/netiosrv.c
* use hb_socketSetNoDelay() - it can be safely used in this code
though it probably does not improve the speed because I used
protocol which was nagle algorithm friendly. Anyhow now we
can disable NETIO_SYNC messages without performance reduction
due to bad interaction with nagle algorithm.
* 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
* include/hbsocket.h
* contrib/hbssl/hbssl.c
* source/rtl/hbsocket.c
* source/rtl/hbinet.c
* examples/uhttpd2/socket.c
* examples/httpsrv/socket.c
* HB_SOCKET_T -> HB_SOCKET
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* source/rtl/gtstd/gtstd.c
* source/rtl/filesys.c
* source/rtl/gtpca/gtpca.c
* source/rtl/gtwvt/gtwvt.c
! Added casts for msvc64.
Some C RTL functions in msvc64 expects file handles as 'int's.
The rest is some non-critical stuff.
Now only size_t to int/ULONG warnings remain in hbrtl.
; TOFIX: Plus these two:
../../../hbstrfmt.c(459) : warning C4244: 'argument' : conversion from '__int64' to 'ULONG', possible loss of data
../../../hbtoken.c(280) : warning C4244: '=' : conversion from '__int64' to 'ULONG', possible loss of data
* harbour/include/hbstack.h
+ added socket error codes to HB_IOERRORS
* harbour/include/Makefile
+ harbour/include/hbsocket.ch
+ harbour/include/hbsocket.h
* harbour/source/rtl/Makefile
+ harbour/source/rtl/hbsocket.c
+ added new BSD socket functions: hb_socket*(). They should be quite
close to low level C socket interface with few modifications which
help to hide some platform differences. Unfortunately we do not use
autoconf so I had to arbitrary set which features are available
on some platforms. In practice it means that it reduces portability
to older OS-es, i.e. it should work with current Linux versions
but it will not without some modifications in macros used to control
supported features with older Linuxes using kernel 2.2 or 2.0.
The same can happen with other *nix ports like Darwin, SunOS, HP-UX
or with different versions of some Windows compilers. I also do not
know which functionality is available in OS2 GCC ports and I would
like to ask OS2 users to make tests and disable not working features.
We also need tests with HP-UX, Darwin and SunOS.
IP6 support is enabled only in *nixes. If Windows users are interested
in IP6 then please add support for it. Most of Windows compilers do
not support standard POSIX functions so I do not want to make it
myself using unknown for me API without testing.
In *nix builds PF_UNIX/PF_LOCAL sockets are also supported.
Support for other socket types can be easy added if someone is
interested in them.
The constant values used in hbsocket.ch are equal to original BSD
socket definitions. If it's necessary then it's possible to enable
their translation inside hbsocket.c code though I do not think we
will find such OS.
The list of hb_socket*() functions was designed to cover all existing
functionality in hbinet.c and socket.c. Most of functions supports
timeout parameter what effectively allows to hide direct select()
usage.
Please make test with real applications and report any problems
with hb_inet*() functions you will find.
* harbour/source/vm/hvm.c
* minor cleanup
* harbour/source/rtl/hbi18n1.c
* cleaned variable name
* harbour/source/rtl/hbinet.c
* harbour/examples/uhttpd2/socket.c
* harbour/contrib/hbssl/hbssl.c
* updated to use hb_socket*() functions
* harbour/include/hbextern.ch
* enabled HB_INET*() functions in DOS builds - they will simply return
errors
- harbour/include/hbapinet.h
- removed old header file
* harbour/source/pp/ppcore.c
! modified ENDTEXT marker to work also with comments in the same line
It's more closer to Clipper though intentionally we are not fully
CA-Cl*pper compatible here.