From 69bab2430efefbd61ac355934c7b5b928e3ace98 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 24 Nov 2010 17:20:18 +0000 Subject: [PATCH] 2010-11-24 18:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/fstemp.c * enabled mkstemp() usage in *nix OpenWatcom 1.8 and newer builds * harbour/src/rtl/hbsocket.c * disabled getpeername() and shutdown() usage in OpenWatcom *nix builds only for OpenWatcom <= 1.9 * harbour/src/rtl/diskspac.c * minor formatting * harbour/src/rtl/hbproces.c * enabled sysconf() hack only for OpenWatcom <= 1.9 * harbour/src/rtl/hbcom.c * disabled OpenWatcom *nix builds only for OpenWatcom <= 1.9 ; it's possible that above modifications will cause error if problems are not fixed in newer OpenWatcom releases but in such case we can simply change to OW number in #if condition. --- harbour/ChangeLog | 21 +++++++++++++++++++++ harbour/src/rtl/diskspac.c | 3 ++- harbour/src/rtl/fstemp.c | 2 +- harbour/src/rtl/hbcom.c | 3 ++- harbour/src/rtl/hbproces.c | 3 ++- harbour/src/rtl/hbsocket.c | 4 ++-- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ed5ee8e09b..4447ec82fe 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,27 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-24 18:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/fstemp.c + * enabled mkstemp() usage in *nix OpenWatcom 1.8 and newer builds + + * harbour/src/rtl/hbsocket.c + * disabled getpeername() and shutdown() usage in OpenWatcom *nix + builds only for OpenWatcom <= 1.9 + + * harbour/src/rtl/diskspac.c + * minor formatting + + * harbour/src/rtl/hbproces.c + * enabled sysconf() hack only for OpenWatcom <= 1.9 + + * harbour/src/rtl/hbcom.c + * disabled OpenWatcom *nix builds only for OpenWatcom <= 1.9 + + ; it's possible that above modifications will cause error if problems + are not fixed in newer OpenWatcom releases but in such case we can + simply change to OW number in #if condition. + 2010-11-24 17:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/sddoci/sddoci.c ! Fix regression in 2010-10-13 19:33 UTC+0200. diff --git a/harbour/src/rtl/diskspac.c b/harbour/src/rtl/diskspac.c index bf7af43468..49fe1b6c6d 100644 --- a/harbour/src/rtl/diskspac.c +++ b/harbour/src/rtl/diskspac.c @@ -61,7 +61,8 @@ #if defined( HB_OS_UNIX ) # include # include -# if defined( __WATCOMC__ ) || defined( __CEGCC__ ) || defined( HB_OS_VXWORKS ) || defined( HB_OS_SYMBIAN ) +# if defined( __WATCOMC__ ) || defined( __CEGCC__ ) || \ + defined( HB_OS_VXWORKS ) || defined( HB_OS_SYMBIAN ) # include # elif defined( HB_OS_DARWIN ) # include diff --git a/harbour/src/rtl/fstemp.c b/harbour/src/rtl/fstemp.c index 6345788e30..5df6c0b755 100644 --- a/harbour/src/rtl/fstemp.c +++ b/harbour/src/rtl/fstemp.c @@ -74,7 +74,7 @@ #include #endif -#if ( defined( HB_OS_LINUX ) && !defined( __WATCOMC__ ) ) || \ +#if ( defined( HB_OS_LINUX ) && ( !defined( __WATCOMC__ ) || __WATCOMC__ >= 1280 ) ) || \ defined( HB_OS_BSD ) || defined( HB_OS_DARWIN ) || defined( HB_OS_SUNOS ) #define HB_HAS_MKSTEMP #if ( defined( HB_OS_BSD ) && !defined( __NetBSD__ ) ) || \ diff --git a/harbour/src/rtl/hbcom.c b/harbour/src/rtl/hbcom.c index b41f980108..54e1d0a9d7 100644 --- a/harbour/src/rtl/hbcom.c +++ b/harbour/src/rtl/hbcom.c @@ -62,7 +62,8 @@ #include "hbinit.h" #include "hbdate.h" -#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) && !defined( HB_OS_SYMBIAN ) /* || defined( __DJGPP__ ) */ +#if defined( HB_OS_UNIX ) && ( !defined( __WATCOMC__ ) || __WATCOMC__ > 1290 ) && \ + !defined( HB_OS_SYMBIAN ) /* || defined( __DJGPP__ ) */ # if defined( HB_OS_VXWORKS ) # if !defined( HB_HAS_SIOLIB ) # define HB_HAS_SIOLIB diff --git a/harbour/src/rtl/hbproces.c b/harbour/src/rtl/hbproces.c index 41ad8d02ae..e54e6b835c 100644 --- a/harbour/src/rtl/hbproces.c +++ b/harbour/src/rtl/hbproces.c @@ -1282,7 +1282,8 @@ int hb_fsProcessRun( const char * pszFilename, } /* temporary hack for still missing sysconf() in Watcom 1.8 */ -#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) +#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) && \ + __WATCOMC__ <= 1290 _WCRTLINK long sysconf( int __name ) { int iTODO; diff --git a/harbour/src/rtl/hbsocket.c b/harbour/src/rtl/hbsocket.c index 9d888b2f85..25e0e6a19f 100644 --- a/harbour/src/rtl/hbsocket.c +++ b/harbour/src/rtl/hbsocket.c @@ -1978,7 +1978,7 @@ int hb_socketGetSockName( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen ) int hb_socketGetPeerName( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen ) { int ret; -#if defined( __WATCOMC__ ) && defined( HB_OS_LINUX ) +#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) && ( __WATCOMC__ <= 1290 ) /* it's still not supported by Linux OpenWatcom port :-( */ ret = -1; hb_socketSetRawError( HB_SOCKET_ERR_NOSUPPORT ); @@ -2093,7 +2093,7 @@ int hb_socketShutdown( HB_SOCKET sd, int iMode ) return -1; } -#if defined( __WATCOMC__ ) && defined( HB_OS_LINUX ) +#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) && ( __WATCOMC__ <= 1290 ) { int iTODO; /* it's still not supported by Linux OpenWatcom port :-( */