Hi, all!
While Peter, The Chief and I were discussing some issues about GPC on Dos like systems, we found that it seems like a good idea to let GPC pre-define the symbol __OS_DOS__ on all such platforms automatically.
This would make it easy to do an {$ifdef __OS_DOS__} around things that are different on these systems, e.g. the different directory separators ('', not '/') and path separators (';', not ':'), or the different way of printing (writing to a priter device like 'lpt1', not calling a printer spooler like 'lpr').
Up to now, one has to use a series of ifdefs which is not very convenient, error-prone, and a maintenance problem when new such platforms are "created". A predefined __OS_DOS__ would reduce this maintenance to one place within the compiler.
So, what I'm asking you is (a) if anyone would see any (hidden) problems with doing so -- perhaps an already existing different use of the symbol __OS_DOS__ --, and (b) which platforms this should be defined on exactly:
I looked at the GCC sources to find out which platforms use ';' as a path separator, these are:
./config/i386/xm-dos.h ./config/i386/xm-go32.h ./config/i386/xm-mingw32.h ./config/i386/xm-os2.h ./config/i386/xm-vsta.h ./config/winnt/xm-winnt.h
Searching for '' as a dir separator yields:
./config/i386/xm-cygwin32.h ./config/i386/xm-dos.h ./config/i386/xm-mingw32.h ./config/i386/xm-os2.h ./config/winnt/xm-winnt.h
I'm a bit surprised that the lists are different, but that's probably by mistake, e.g. the go32 (i.e. DJGPP Dos extender) platform surely has a '' dir separator. (I'm aware of the fact that most, if not all, DJGPP routines do an automatic translation from '/' to ''; that's not the issue here.)
So, I hope it's correct to assume that the union of both sets is a complete list of (currently supported) Dos-like systems:
./config/i386/xm-dos.h ./config/i386/xm-go32.h ./config/i386/xm-mingw32.h ./config/i386/xm-cygwin32.h ./config/i386/xm-os2.h ./config/i386/xm-vsta.h ./config/winnt/xm-winnt.h
Any comments?
BTW, what's vsta?
Regards, Frank