Re: [Harbour] Re: hbMK2 - Switch -env: RTE

2010-05-06 Thread Viktor Szakáts
>> -env is not meant to suppress defines, but envvars. >> To suppress a define, use '-under:__MT__' Harbour >> option. >> > > Probably it is '-undef:__MT__'. Yes, typo. It's in Harbour help anyway. >>> #ifdef __MT__ >>> #include "hbthread.h" >>> static PHB_ITEM s_pMtx = NULL; >>> #endif >>> >

[Harbour] Re: hbMK2 - Switch -env: RTE

2010-05-06 Thread Pritpal Bedi
Viktor Szakáts wrote: > >> I was trying to supress define, if any, __MT__ and tried as documented: >> -env:__MT__- > > -env is not meant to suppress defines, but envvars. > To suppress a define, use '-under:__MT__' Harbour > option. > Probably it is '-undef:__MT__'. I tried it but it does no

Re: [Harbour] Re: hbMK2 - Switch -env: RTE

2010-05-05 Thread Viktor Szakáts
> hbgetenv.c > > > HB_BOOL hb_setenv( const char * szName, const char * szValue ) > { > #if defined( HB_OS_WIN ) > { > LPTSTR lpName = HB_TCHAR_CONVTO( szName ); > LPTSTR lpValue = HB_TCHAR_CONVTO( szValue ); > HB_BOOL bResult = ( SetEnvironmentVariable( lpName, lpValue )

[Harbour] Re: hbMK2 - Switch -env: RTE

2010-05-05 Thread Pritpal Bedi
In continuation... Pritpal Bedi wrote: > > See, const char * szValue , is never sent and is NULL in C. > Also I do not see how a variable gets removed from list in this code. > I will be wrong if an empty value nullifies it. > MSDN says If this parameter is NULL, the variable is deleted fro

[Harbour] Re: hbMK2 - Switch -env: RTE

2010-05-05 Thread Pritpal Bedi
In continuation... Pritpal Bedi wrote: > > Unrecoverable error 9023: hb_xgrab requested to allocate zero bytes > Called from HB_SETENV(0) > Called from HBMK2(945) in ../../../hbmk2.prg > Called from MAIN(473) in ../../../hbmk2.prg > hbgetenv.c HB_BOOL hb_setenv( const char * szName