Mail Archives: djgpp/1997/07/31/17:50:34
robert DOT hoehne AT Mathematik DOT TU-Chemnitz DOT DE wrote:
> giva AT bryggen DOT bgnett DOT no wrote:
> >
> >
> > I've notied that _osmajor/_osminor are not set in CRT before
> > calling main(). Is this intentional or simply an oversight?
>
> I don't know exactly why, but can you tell us a good
> reason (but not only from comparing with Borland) why
> it should be done?
Not only Borland. I just checked with MSC 7.0 and Metaware HighC
and they perform as expected. After all _osmajor/_osminor are there
for compatability with those other DOS compilers (it's not a ANSI/
POSIX thing). A good reason would be to do thing correct if one's
is to be compatible.
> In my opinion that's not needed, because anyone who
> want to use these variable should call __get_dos_version()
> before to use these variables.
That would only add more #ifdef's if one's want to have the source
portable.
Gisle V.
- Raw text -