> I intentionally reduce above define to __WATCOMC__ builds because > only for Linux open Watcom builds I verified that the valid value > is 020000000000. I should even change the condition to use: > defined( __WATCOMC__ ) && defined( HB_OS_LINUX ) > In fact I should make it also in few other places to avoid potential > problems with OpenWatcom builds for other *nixes. > CRTSCTS not commonly used constant value defined by some standards > like 0, 1, 2 for stdin, stdout and stderr handlers which we can > safely use without any macros on POSIX systems. It strictly > depends on CRTL and used system. If compiler does not redefine > this macro value using its own CRTL wrapper to system call then > on Linux and SunOS it's 0x80000000 but in OpenBSD and NetBSD it's > 0x00010000, in FreeBSD it's 0x0003000, in HAIKU it's 0x6000, > DJGPP uses it's own non system code for termios with flags incompatible > with any other system and it does not CRTSCTS at least explicitly, etc. > > I think that this define can be enabled for other C compilers on given > system (the same C compiler may use different constant values on different > systems) only after verification the valid value for this macro is used. > Otherwise we may only silently hide real problem. If we introduce such > hacks in too many places then porting Harbour to new OS or finding some > bugs will be nightmare. > > Viktor, I've seen you committed above modification but I would like > to ask you to remove it and enable such definition only for compilers > and system where you verified exact working value. If in some systems > such functionality is available but CRTL does not give interface to > it then we can disable some part of code during compilation and > introduce 'int TODO;' dummy variable to generate warning which will > mark that some things should be updated.
If I got it correctly, it should be something like: #if ! defined( CRTSCTS ) #if defined( HB_OS_LINUX ) || defined( HB_OS_SUNOS ) #define CRTSCTS 0x80000000 #elif defined( HB_OS_BSD ) #define CRTSCTS 0x00010000 #elif defined( HB_OS_BEOS ) #define CRTSCTS 0x6000 #endif #endif ... #if defined( CRTSCTS ) ... #else int iTODO; #endif ? Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour