On Thu, 21 Jan 2010, Alexander S.Kresin wrote:
> >add to letodb/source/client/leto1.c just befor last line with
> > #endif
> >this code:
> > #elif defined( HB_DATASEG_STARTUP )
> > #define HB_DATASEG_BODY HB_DATASEG_FUNC( leto1__InitSymbols ) \
> > HB_DATASEG_FUNC( _hb_leto_rdd_init_ )
> > #include "hbiniseg.h"
> >
> Since what release this became necessary ? I ask this, because I
> need to add there ( __HARBOUR__ - 0 ) > some_value to provide
> compatibility with old releases.
You do not have to. Above
#elif defined( HB_DATASEG_STARTUP )
is enough to check if it's necessary in current versions and does not
break older ones. For older Harbour builds you will keep the code
covered by
#elif defined( HB_MSC_STARTUP )
The final code will look like:
#if defined( HB_PRAGMA_STARTUP )
#pragma startup leto1__InitSymbols
#pragma startup _hb_leto_rdd_init_
#elif defined( HB_MSC_STARTUP ) // support for old Harbour version
#if defined( HB_OS_WIN_64 )
#pragma section( HB_MSC_START_SEGMENT, long, read )
#endif
#pragma data_seg( HB_MSC_START_SEGMENT )
static HB_$INITSYM hb_vm_auto_leto1__InitSymbols = leto1__InitSymbols;
static HB_$INITSYM hb_vm_auto_leto_rdd_init = _hb_leto_rdd_init_;
#pragma data_seg()
#elif defined( HB_DATASEG_STARTUP )
#define HB_DATASEG_BODY HB_DATASEG_FUNC( leto1__InitSymbols ) \
HB_DATASEG_FUNC( _hb_leto_rdd_init_ )
#include "hbiniseg.h"
#endif
> And why I didn't get rddsetdefault error without this fragment of
> code ( I tried a short test with Harbour 13587 ( 2010-01-14 18:21
> UTC-0800 Pritpal Bedi ([email protected])) ) ?
Probably you haven't used compiler which needs HB_DATASEG_STARTUP
initialization like MSC or OpenWatcom so it was not necessary to
register to change registration code. But here I only guess.
BTW In Makefile.linux[37] spaces are used instead of <TAB> what breaks
GNU make builds.
source/common/hbip.c[846] should be:
socklen_t sin_size = ( socklen_t ) sizeof( localAddr );
Now now this code is in practice limited to MS-Windows and Linux.
I suggest to use Harbour API what should resolve the portability problems.
utils/manager/console.prg and utils/manager/manage.prg use:
#include "include\rddleto.ch"
"\" breaks non MS-Windows builds and not relative path hacked compilation
to work only in some strict places. It has to be:
#include "rddleto.ch"
and any include paths should be set by build scripts using -I parameter.
HTH,
best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour