diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f7a4d20302..7696f90f09 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-07 12:38 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * utils/hbmk2/hbmk2.prg + ! Fixed recently introd problem with path sep translation. + + * source/common/hbgete.c + + Enabled Darwin support. + + * contrib/examples/uhttpd/modules/showcounter.prg + ! Protected whole code with GD_SUPPORT. + 2009-03-07 11:43 UTC+0100 Francesco Saverio Giudice (info/at/fsgiudice.com) * harbour/contrib/examples/uhttpd/uhttpd.prg * Updated uHTTPD (Work in progress) diff --git a/harbour/contrib/examples/uhttpd/modules/showcounter.prg b/harbour/contrib/examples/uhttpd/modules/showcounter.prg index acc7c87fd4..e4a16c9254 100644 --- a/harbour/contrib/examples/uhttpd/modules/showcounter.prg +++ b/harbour/contrib/examples/uhttpd/modules/showcounter.prg @@ -50,6 +50,7 @@ * */ +#if defined( GD_SUPPORT ) MEMVAR _SERVER // defined in uHTTPD MEMVAR _REQUEST // defined in uHTTPD @@ -58,12 +59,12 @@ MEMVAR _REQUEST // defined in uHTTPD //#include "xhb.ch" #include "gd.ch" -#ifdef __PLATFORM__WINDOWS -#define IMAGES_IN "..\..\hbgd\tests\digits\" -#define IMAGES_OUT ( _SERVER[ "DOCUMENT_ROOT" ] + "\counter\" ) -#else +#ifdef __PLATFORM__UNIX #define IMAGES_IN "../../hbgd/tests/digits/" #define IMAGES_OUT ( _SERVER[ "DOCUMENT_ROOT" ] + "/counter/" ) +#else +#define IMAGES_IN "..\..\hbgd\tests\digits\" +#define IMAGES_OUT ( _SERVER[ "DOCUMENT_ROOT" ] + "\counter\" ) #endif #define DISPLAY_NUM 10 @@ -220,3 +221,5 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) //RETURN cFile RETURN oI:ToStringGif() + +#endif diff --git a/harbour/source/common/hbgete.c b/harbour/source/common/hbgete.c index 2dd48021f5..3241b654ae 100644 --- a/harbour/source/common/hbgete.c +++ b/harbour/source/common/hbgete.c @@ -157,7 +157,8 @@ BOOL hb_setenv( const char * szName, const char * szValue ) return SetEnvironmentVariableA( szName, szValue ) != 0; #elif defined( _BSD_SOURCE ) || _POSIX_C_SOURCE >= 200112L || \ - _XOPEN_SOURCE >= 600 || defined( __WATCOMC__ ) || defined( __DJGPP__ ) + _XOPEN_SOURCE >= 600 || defined( __WATCOMC__ ) || defined( __DJGPP__ ) || \ + defined( HB_OS_DARWIN ) if( szValue ) return setenv( szName, szValue, 1 ) == 0; diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 7bcea07622..dce3d42f1c 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2179,11 +2179,13 @@ STATIC FUNCTION PathSepToSelf( cFileName ) STATIC FUNCTION PathSepToTarget( cFileName, nStart ) + DEFAULT nStart TO 0 + IF t_cARCH $ "win|dos|os2" .AND. !( t_cCOMP $ "mingw|mingwce|cygwin" ) - RETURN StrTran( cFileName, "/", "\", nStart ) + RETURN Left( cFileName, nStart ) + StrTran( SubStr( cFileName, nStart + 1 ), "/", "\" ) ENDIF - RETURN StrTran( cFileName, "\", "/", nStart ) + RETURN Left( cFileName, nStart ) + StrTran( SubStr( cFileName, nStart + 1 ), "\", "/" ) STATIC FUNCTION DirAddPathSep( cDir )