delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/09/23/03:09:53

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10109230705.AA14747@clio.rice.edu>
Subject: _os_trueversion
To: djgpp-workers AT delorie DOT com (DJGPP developers)
Date: Sun, 23 Sep 2001 02:05:01 -0500 (CDT)
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019