Mail Archives: djgpp-workers/2001/09/23/03:09:53
Patches to support _os_trueversion. Declaration in dos.h, set/stored in
crt1.c. Calls ordered to take advantage of _get_dos_version caching,
one new interrupt only; smaller overall code when libc updated to use it.
dos.h patch removes _windows_* variables (only set on image exit, not
documented, will be removed with new/simpler dpmiexecp.c). Comments?
(if these are OK I will use it in the dpmiexcp update if it's OK).
*** dos.BAK Fri Jul 27 04:42:44 2001
--- dos.h Sun Sep 23 01:41:36 2001
*************** extern "C" {
*** 131,137 ****
#endif
extern unsigned short _osmajor, _osminor;
! extern unsigned short _windows_major, _windows_minor;
extern const char * _os_flavor;
extern int _doserrno;
--- 131,137 ----
#endif
extern unsigned short _osmajor, _osminor;
! extern unsigned short _os_trueversion;
extern const char * _os_flavor;
extern int _doserrno;
*** crt1.c_ Fri Jun 8 04:19:28 2001
--- crt1.c Sun Sep 23 01:52:28 2001
*************** extern void __setup_file_rec_list(void);
*** 185,195 ****
--- 185,197 ----
char __PROXY[] = " !proxy";
size_t __PROXY_LEN = sizeof(__PROXY)-1;
+ unsigned short _os_trueversion;
static void
setup_os_version(void)
{
unsigned short v;
+ _os_trueversion = _get_dos_version(1);
v = _get_dos_version(0); /* Get the reported version */
_osmajor = (v >> 8) & 0xff; /* paranoia */
_osminor = v & 0xff;
- Raw text -