From bea08ca6d4d65311089e4e1bbeaca7f787ade8bb Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 31 Aug 2009 14:21:45 +0000 Subject: [PATCH] 2009-08-31 16:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/net.c ! fixed DJGPP compilation when MAXGETHOSTNAME is not defined in header files --- harbour/ChangeLog | 5 +++++ harbour/source/rtl/net.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 015228f949..57823d3487 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-31 16:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/net.c + ! fixed DJGPP compilation when MAXGETHOSTNAME is not defined in + header files + 2009-08-31 16:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/Makefile ! updated to work with new component detection syntax diff --git a/harbour/source/rtl/net.c b/harbour/source/rtl/net.c index 4d643e524d..c518d43725 100644 --- a/harbour/source/rtl/net.c +++ b/harbour/source/rtl/net.c @@ -80,8 +80,6 @@ #define gethostname __gethostname #endif - #define MAXGETHOSTNAME 256 /* should be enough for a host name */ - #elif defined( HB_OS_DOS ) #if defined( __DJGPP__ ) || defined( __RSX32__ ) || defined( __GNUC__ ) @@ -96,10 +94,15 @@ #include #endif #include - #define MAXGETHOSTNAME 256 /* should be enough for a host name */ #endif +#if !defined( MAXGETHOSTNAME ) && ( defined( HB_OS_UNIX ) || \ + ( ( defined( HB_OS_OS2 ) || defined( HB_OS_DOS ) ) && \ + defined( __GNUC__ ) ) ) + #define MAXGETHOSTNAME 256 /* should be enough for a host name */ +#endif + /* NOTE: Clipper will only return a maximum of 15 bytes from this function. And it will be padded with spaces. Harbour does the same on the DOS platform.