You're right, __HARBOUR__ was defined before, so how about this modified version which requires manual macro only for pre 1.0.0 Harbour version (which aren't probably that widespread anymore):
This needs 'HB_PRE10' to be #defined for pre-Harbour 1.0.0 releases: --- #if defined( __XHARBOUR__ ) /* code for xhb */ #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) /* code for harbour */ #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) && defined( HB_PRE10 ) /* code for harbour-pre-10x */ #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) && ! defined( HB_PRE10 ) #if __HARBOUR__ >= 0x010000 && __HARBOUR__ < 0x010100 /* code for harbour-10x */ #endif #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) && ! defined( HB_PRE10 ) #if __HARBOUR__ >= 0x010100 /* code for harbour-11x-or-upper */ #endif #endif --- Things get simpler if you decide to drop support for very old Harbour versions: --- #if defined( __XHARBOUR__ ) /* code for xhb */ #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) /* code for harbour */ #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) && __HARBOUR__ >= 0x010000 && __HARBOUR__ < 0x010100 /* code for harbour-10x */ #endif #if ! defined( __XHARBOUR__ ) && defined( __HARBOUR__ ) && __HARBOUR__ >= 0x010100 /* code for harbour-11x-or-upper */ #endif --- Brgds, Viktor _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour