From 0142b1262294d54686e039fcdd95c31ffc33fbf1 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 4 Nov 2008 00:03:46 +0000 Subject: [PATCH] 2008-11-04 01:04 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbthread.h ! fixed typo * harbour/source/vm/Makefile * excluded mainpm.c from OS2 builds * harbour/source/rtl/hbinet.c * changed the #include order for OS2 OpenWatcom builds and added some cleanups - please test other builds. --- harbour/ChangeLog | 11 +++++++++++ harbour/include/hbthread.h | 2 +- harbour/source/rtl/hbinet.c | 25 ++++++++++++++++--------- harbour/source/vm/Makefile | 2 +- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7c7d2f4d4d..8b9980c716 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-11-04 01:04 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbthread.h + ! fixed typo + + * harbour/source/vm/Makefile + * excluded mainpm.c from OS2 builds + + * harbour/source/rtl/hbinet.c + * changed the #include order for OS2 OpenWatcom builds and added some + cleanups - please test other builds. + 2008-11-04 00:15 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * common.mak * source/codepage/Makefile diff --git a/harbour/include/hbthread.h b/harbour/include/hbthread.h index 82a62ebf79..28eac1a636 100644 --- a/harbour/include/hbthread.h +++ b/harbour/include/hbthread.h @@ -63,7 +63,7 @@ #elif defined( HB_OS_WIN_32 ) # include # include -#elif defined( HB_OS_WIN_OS2 ) +#elif defined( HB_OS_OS2 ) # if defined( __WATCOMC__ ) # include # endif diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index 2835945c9c..a08c9ada0a 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -95,10 +95,12 @@ #endif #define HB_SOCKET_T int - #include + + #include #if defined( HB_OS_OS2 ) #if defined( __WATCOMC__ ) #include + #include #endif #include #include @@ -111,14 +113,16 @@ #include #include #include + #include - #if defined(__WATCOMC__) - #define h_errno errno - #else - extern int h_errno; + #if !defined(h_errno) + #if defined(__WATCOMC__) + #define h_errno errno + #else + extern int h_errno; + #endif #endif #define HB_INET_CLOSE( x ) close( x ) - #include #endif typedef struct _HB_SOCKET_STRUCT @@ -429,14 +433,15 @@ static void hb_socketSetNonBlocking( HB_SOCKET_STRUCT *Socket ) #if defined( HB_OS_WIN_32 ) ULONG mode = 1; ioctlsocket( Socket->com, FIONBIO, &mode ); - -#else +#elif defined( O_NONBLOCK ) int flags = fcntl( Socket->com, F_GETFL, 0 ); if( flags != -1 ) { flags |= O_NONBLOCK; fcntl( Socket->com, F_SETFL, (LONG) flags ); } +#else + HB_SYMBOL_UNUSED( Socket ); #endif } @@ -448,13 +453,15 @@ static void hb_socketSetBlocking( HB_SOCKET_STRUCT *Socket ) #if defined( HB_OS_WIN_32 ) ULONG mode = 0; ioctlsocket( Socket->com, FIONBIO, &mode ); -#else +#elif defined( O_NONBLOCK ) int flags = fcntl( Socket->com, F_GETFL, 0 ); if( flags != -1 ) { flags &= ~O_NONBLOCK; fcntl( Socket->com, F_SETFL, ( long ) flags ); } +#else + HB_SYMBOL_UNUSED( Socket ); #endif } diff --git a/harbour/source/vm/Makefile b/harbour/source/vm/Makefile index 03d7169634..112f017c60 100644 --- a/harbour/source/vm/Makefile +++ b/harbour/source/vm/Makefile @@ -18,7 +18,7 @@ ifeq ($(HB_ARCHITECTURE),w32) endif else ifeq ($(HB_ARCHITECTURE),os2) - C_MAIN = mainstd.c mainpm.c + C_MAIN = mainstd.c else C_MAIN = main.c endif