diff --git a/harbour/config/sunos/gcc.cf b/harbour/config/sunos/gcc.cf index 56b723e8a4..b46a64bd98 100644 --- a/harbour/config/sunos/gcc.cf +++ b/harbour/config/sunos/gcc.cf @@ -14,7 +14,7 @@ CC_IN = -c CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -DHB_OS_SUNOS -Wall -W +CFLAGS = -Wall -W # uncomment this if you want to farce relocateable code for .so libs # it's necessary on some platforms but can reduce performance @@ -77,7 +77,7 @@ ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),) LINKLIBS += -lz endif -LINKLIBS += -lm -lrt +LINKLIBS += -lm -lrt -lsocket -lnsl -lresolv LDFLAGS = $(LINKPATHS) diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index c8a212c165..1650fcafe7 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -301,7 +301,7 @@ #endif #ifndef HB_OS_SUNOS - #if defined(sun) || defined(__sun) + #if defined(sun) || defined(__sun) || defined(__sun__) #define HB_OS_SUNOS #endif #endif diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 046c85ea4e..bbe915fa7c 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -85,13 +85,10 @@ */ #if !defined(__DJGPP__) -#include /* For log() */ +# include /* For log() */ #endif #if defined(_MSC_VER) || defined(__IBMCPP__) || (__BORLANDC__ > 1040) || defined(__WATCOMC__) /* Use this only above Borland C++ 3.1 */ -#include /* for _finite() and _isnan() */ -#endif -#if defined(HB_OS_SUNOS) -# include +# include /* for _finite() and _isnan() */ #endif #include "hbvmopt.h" @@ -107,6 +104,10 @@ #include "hbmath.h" #include "hbapicdp.h" +#if defined(HB_OS_SUNOS) +# include +#endif + HB_EXPORT PHB_ITEM hb_itemNew( PHB_ITEM pNull ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemNew(%p)", pNull));