Hi Maurizio,

I was suggesting these for app/lib compile time.
Even for that there is the C level and the .prg
level, and they are different.

On .prg level __HARBOUR__ returns 256, which
means 0x0100, like 1.00.

On .c level you can use HB_VERSION after #including
"hbver.h".

You cannot access SVN revision from by default, since
our goal is not to break in the same version.

[ You can hack this around by including hbverbld.h to
your .prg/.c files. But this is not a recommended way
of doing it, and may change in the future without
notice. ]

NOTE: I'll add __HARBOUR__ to C level too, with similar
content to .prg level __HARBOUR__. I'll also add hbver.h
to be included by Harbour headers automatically. So
after that you can use __HARBOUR__ for both .c and .prg
the exact same way.

Brgds,
Viktor

On 2008.06.27., at 11:22, Maurizio la Cecilia wrote:

Hi Viktor, to be clearer i'm searching something allowing a code as:

#ifdef __HARBOUR__
#ifdef __HARBOUR_SVN__
.... Code with new feautured funcs ....
#else
.... Code with old fashioned funcs ....
#endif
#endif

#ifdef __XHARBOUR__
#ifdef __XHARBOUR_CVS__
.... Code with new feautured funcs ....
#else
.... Code with old fashioned funcs ....
#endif
#endif

or something doing the same job.
You see, i need this flags at compile time ( of HwGUI, of course... ;) ),
just for avoid to mantain compatibility with Harbour SVN only.
Best regards.
Maurizio



-----Messaggio originale-----
Da: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Per conto di
Szakáts Viktor
Inviato: venerdì 27 giugno 2008 1.44
A: Harbour Project Main Developer List.
Oggetto: Re: [Harbour] Define for version recognition

Hi Maurizio,

Pls check the version #defines in include/hbver.h,
on .prg level __HARBOUR__ has the version as its value.

Brgds,
Viktor

On 2008.06.26., at 19:19, Maurizio la Cecilia wrote:

I don't know if is possible, but i would know if ther'is in
Harbour
a pre
defined constant telling at compile time what version (and hopefully
subversion) of the compiler is in use.
This could allow me to take care of features implemented in newer
version
and lacking in older version (the stable, by example...).
TIA.
Best regards.
Maurizio la Cecilia

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to