Mail Archives: djgpp-workers/1996/10/03/04:19:25
It seems we have the version and release fields in `uname' the other way
around, at least as GNU `uname' prints that info. Here are the necessary
changes. I also made the OS flavor strings fit into the limits of
`uname' (it also makes the EXE smaller by about 500 bytes).
*** src/libc/posix/utsname/uname.c~0 Thu May 25 07:05:40 1995
--- src/libc/posix/utsname/uname.c Tue Oct 1 17:05:46 1996
***************
*** 22,29 ****
dos_version = _get_dos_version(1);
strncpy(u->sysname, _os_flavor, sizeof(u->sysname) - 1);
u->sysname[sizeof(u->sysname) - 1] = '\0';
! sprintf(u->version, "%d", dos_version >> 8);
! sprintf(u->release, "%02d", dos_version & 0xff);
strcpy(u->machine, "pc");
r.x.ax = 0x5e00;
--- 22,29 ----
dos_version = _get_dos_version(1);
strncpy(u->sysname, _os_flavor, sizeof(u->sysname) - 1);
u->sysname[sizeof(u->sysname) - 1] = '\0';
! sprintf(u->release, "%d", dos_version >> 8);
! sprintf(u->version, "%02d", dos_version & 0xff);
strcpy(u->machine, "pc");
r.x.ax = 0x5e00;
*** src/libc/dos/dos/getdos_v.c~1 Wed Jan 24 03:30:18 1996
--- src/libc/dos/dos/getdos_v.c Tue Oct 1 17:13:12 1996
***************
*** 29,56 ****
unsigned char oem_num;
const char * oem_name;
} dos_flavors[] = {
! {0, "IBM PC-DOS"},
! {1, "Compaq DOS"},
! {2, "Microsoft DOS"},
{4, "AT&T DOS"},
! {5, "Zenith DOS"},
! {6, "Hewlett-Packard DOS"},
! {7, "Groupe Bull DOS"},
! {0xd, "Packard-Bell DOS"},
{0x16, "DEC DOS"},
! {0x23, "Olivetti DOS"},
! {0x28, "Texas Instruments DOS"},
! {0x29, "Toshiba DOS"},
! {0x33, "Novell Win3 device ID"},
! {0x34, "MS Multimedia Win3 device ID"},
! {0x35, "MS Multimedia Win3 device ID"},
! {0x4d, "Hewlett-Packard DOS"},
{0x5e, "RxDOS"},
{0x66, "PTS-DOS"},
! {0x99, "GenSoft Embedded DOS"},
{0xee, "DR-DOS"},
! {0xef, "Novell DOS"},
! {0xff, "Microsoft MS-DOS"},
{0, (char *)0}
};
--- 29,56 ----
unsigned char oem_num;
const char * oem_name;
} dos_flavors[] = {
! {0, "IBMPcDos"},
! {1, "CompqDOS"},
! {2, "MsoftDOS"},
{4, "AT&T DOS"},
! {5, "ZenitDOS"},
! {6, "HP DOS"},
! {7, "GrBulDOS"},
! {0xd, "PBellDOS"},
{0x16, "DEC DOS"},
! {0x23, "OlivtDOS"},
! {0x28, "TI DOS"},
! {0x29, "Toshiba"},
! {0x33, "NWin3Dev"},
! {0x34, "MSWinDev"},
! {0x35, "MSWinDev"},
! {0x4d, "HP DOS"},
{0x5e, "RxDOS"},
{0x66, "PTS-DOS"},
! {0x99, "GenSoft"},
{0xee, "DR-DOS"},
! {0xef, "NovelDOS"},
! {0xff, "MS-DOS"},
{0, (char *)0}
};
- Raw text -