diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 12056dd2cd..72d8a56886 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,23 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-28 10:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * make_gnu_os2.cmd + * make_gnu.bat + % Deleted defaulting of HB_*_INSTALL. Now done by make files. + ; Same should be done for *nixes. + + * contrib/xhb/inet.h + * Converted to a stub which shows error. This header was + making public some local structures and functions which are + no longer supported in Harbour. + + * contrib/xhb/inet.h + * contrib/hbct/print.c + * contrib/hbtpathy/tpwin.c + * source/rtl/hbinet.c + ! *WIN_32* -> *WIN* + 2009-07-28 10:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/hbinet.c % Deleted _HB_SOCKET diff --git a/harbour/contrib/hbct/print.c b/harbour/contrib/hbct/print.c index fbc2721f4e..041b5ee60c 100644 --- a/harbour/contrib/hbct/print.c +++ b/harbour/contrib/hbct/print.c @@ -199,7 +199,7 @@ HB_FUNC( PRINTSEND ) hb_retni( 0 ); } -#elif defined( HB_OS_WIN_32 ) +#elif defined( HB_OS_WIN ) char szChr[ 2 ] = { ' ', '\0' }; char szPort[ 5 ] = { 'l', 'p', 't', '1', '\0' }; diff --git a/harbour/contrib/hbtpathy/tpwin.c b/harbour/contrib/hbtpathy/tpwin.c index 2ea70ef8a2..b3c408bb5b 100644 --- a/harbour/contrib/hbtpathy/tpwin.c +++ b/harbour/contrib/hbtpathy/tpwin.c @@ -51,13 +51,13 @@ * */ -#define HB_OS_WIN_32_USED +#define HB_OS_WIN_USED #include "hbapi.h" #include "hbapiitm.h" #include "hbapifs.h" -#ifdef HB_OS_WIN_32 +#if defined( HB_OS_WIN ) #include @@ -120,4 +120,4 @@ HB_FUNC( P_WRITEPORT ) hb_retnl( bRet ? ( long ) nWritten : -1 ); /* Put GetLastError() on error, or better a second byref param? */ } -#endif /* HB_OS_WIN_32 */ +#endif /* HB_OS_WIN */ diff --git a/harbour/contrib/xhb/inet.h b/harbour/contrib/xhb/inet.h index 5eac780846..5cde1204f8 100644 --- a/harbour/contrib/xhb/inet.h +++ b/harbour/contrib/xhb/inet.h @@ -52,105 +52,6 @@ #ifndef HB_INET_H_ #define HB_INET_H_ -#include "hbdefs.h" -#include "hbvm.h" -#include "hbapierr.h" - -#define HB_SOCKET_SIGN 0xF0123A42 - -#if defined( HB_OS_DOS ) - #define HB_NO_DEFAULT_INET -#else - #if defined( HB_OS_WIN_32 ) - #define _WINSOCKAPI_ /* Prevents inclusion of Winsock.h in Windows.h */ - #define HB_SOCKET_T SOCKET - #include - #include - - #define HB_INET_CLOSE( x ) closesocket( x ) - - extern char *hstrerror( int i ); - #else - - #if defined( HB_OS_HPUX ) - #define _XOPEN_SOURCE_EXTENDED - #endif - - #define HB_SOCKET_T int - #include - #include - #include - #include - #include - #include - - extern int h_errno; - #define HB_INET_CLOSE( x ) close( x ) - #ifdef HB_OS_DARWIN - #if !defined( socklen_t ) && !defined( _SOCKLEN_T ) - #define socklen_t int - #endif - #endif - #include - #endif - - typedef struct tag_HB_SOCKET_STRUCT - { - ULONG sign; - HB_SOCKET_T com; - char *errorDesc; - int errorCode; - struct sockaddr_in remote; - LONG count; - int timeout; - int timelimit; - PHB_ITEM caPeriodic; - int iSndBufSize; - int iRcvBufSize; - } HB_SOCKET_STRUCT; - - #define HB_PARSOCKET( n ) ( ( HB_SOCKET_STRUCT * ) hb_parptrGC( hb_inetSocketFinalize, n ) ) - - #define HB_SOCKET_ZERO_ERROR( s ) s->errorCode = 0; s->errorDesc = "" - - #if defined( HB_OS_WIN_32 ) - #define HB_SOCKET_SET_ERROR( s ) \ - s->errorCode = WSAGetLastError(); \ - s->errorDesc = strerror( s->errorCode );\ - WSASetLastError( 0 ); - - #else - #define HB_SOCKET_SET_ERROR( s ) s->errorCode = errno; s->errorDesc = strerror( errno ) - #endif - - #define HB_SOCKET_SET_ERROR1( s, code ) s->errorCode = code; s->errorDesc = strerror( code ); - #define HB_SOCKET_SET_ERROR2( s, code, desc ) s->errorCode = code; s->errorDesc = desc; - - #define HB_SOCKET_INIT( s, p ) \ - {\ - s = ( HB_SOCKET_STRUCT *) hb_gcAlloc( sizeof( HB_SOCKET_STRUCT ), hb_inetSocketFinalize );\ - p = hb_itemPutPtrGC( p, s );\ - HB_SOCKET_ZERO_ERROR( s );\ - s->sign = HB_SOCKET_SIGN;\ - s->com = 0;\ - s->count = 0;\ - s->timeout = -1;\ - s->timelimit = -1;\ - s->caPeriodic = NULL;\ - } - - #ifndef MSG_NOSIGNAL - #define MSG_NOSIGNAL 0 - #endif - - #ifndef MSG_DONTWAIT - /* #define MSG_DONTWAIT 0x80 */ - #define MSG_DONTWAIT 0 - #endif - - #ifndef MSG_WAITALL - #define MSG_WAITALL 0 - #endif -#endif +#error Please use hbsocket.h in Harbour. #endif diff --git a/harbour/make_gnu.bat b/harbour/make_gnu.bat index e2cdfa57a0..07bf522eb2 100644 --- a/harbour/make_gnu.bat +++ b/harbour/make_gnu.bat @@ -31,12 +31,6 @@ if "%HB_COMPILER%" == "" set HB_COMPILER=djgpp if "%HB_INSTALL_PREFIX%" == "" if "%OS%" == "Windows_NT" set HB_INSTALL_PREFIX=%~dp0 - rem Set to constant value - if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin - if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib\%HB_ARCHITECTURE%\%HB_COMPILER% - if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include - if "%HB_DOC_INSTALL%" == "" set HB_DOC_INSTALL=%HB_INSTALL_PREFIX%\doc - goto MAKE :WIN_AUTODETECT diff --git a/harbour/make_gnu_os2.cmd b/harbour/make_gnu_os2.cmd index 524a26af3a..16ffa7c81c 100644 --- a/harbour/make_gnu_os2.cmd +++ b/harbour/make_gnu_os2.cmd @@ -16,14 +16,6 @@ rem for further information about see make_gnu.bat if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=os2 if "%HB_COMPILER%" == "" set HB_COMPILER=gcc -rem Set to constant value to be consistent with the non-GNU make files. - -if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin -if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib\%HB_ARCHITECTURE%\%HB_COMPILER% -if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include -if "%HB_DOC_INSTALL%" == "" set HB_DOC_INSTALL=%HB_INSTALL_PREFIX%\doc - - rem In GCC3.2.2 the TCP/IP headers and libraries scheme have been changed. rem The default is the current OS/2 tcpip toolkit (BSD 4.4 based). rem To target the older OS/2 tcpip stack (BSD 4.3 based) and create diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index f74f36d664..1a97ebc6ac 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -1157,7 +1157,6 @@ HB_FUNC( HB_INETSERVER ) HB_FUNC( HB_INETACCEPT ) { PHB_SOCKET_STRUCT socket = HB_PARSOCKET( 1 ); - PHB_SOCKET_STRUCT new_socket; HB_SOCKET_T incoming; void * sa; unsigned len; @@ -1190,6 +1189,7 @@ HB_FUNC( HB_INETACCEPT ) } else { + PHB_SOCKET_STRUCT new_socket; PHB_ITEM pSocket = NULL; HB_SOCKET_INIT( new_socket, pSocket ); new_socket->remote = sa;