diff options
author | Christopher Faylor <me@cgf.cx> | 2000-02-28 08:05:33 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-02-28 08:05:33 +0300 |
commit | d542443ea4e9615e66b729fc4a93ec72a5305fff (patch) | |
tree | c006010e903c36adb0a74879f0f2999224ee1c30 /winsup/cygwin/uname.cc | |
parent | 1dc94f73700244d77cf9ceb5d4e65fd71a2f65f0 (diff) |
* dcrt0.cc (set_os_type): Record OS name string.
(getprogname): Eliminate obsolete function.
(dll_crt0_1): Move initial strace initialization output to set_myself.
* exceptions.cc (interruptible): Add debugging output.
(interrupt_setup): New function.
(interrupt_now): Use interrupt_setup to set up common interrupt handler stuff.
(interrupt_on_return): Ditto.
(call_handler): Move signal_arrived arm and clear threads to region where
signalled thread is suspended or suffer races.
* pinfo.cc (set_myself): Output interesting information when strace is first
initialized. Initialize progname here.
* sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal are
sent synchronously.
* strace.cc (strace_vsprintf): Move code into strace program.
* uname.cc (uname): Use 'osname' global to construct cygwin name + Windows type
+ version.
Diffstat (limited to 'winsup/cygwin/uname.cc')
-rw-r--r-- | winsup/cygwin/uname.cc | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc index 101855cd7..d15214613 100644 --- a/winsup/cygwin/uname.cc +++ b/winsup/cygwin/uname.cc @@ -15,16 +15,14 @@ details. */ #include "winsup.h" /* uname: POSIX 4.4.1.1 */ -extern "C" -int +extern "C" int uname (struct utsname *name) { DWORD len; SYSTEM_INFO sysinfo; - OSVERSIONINFO os_version_info; + extern char osname[]; - os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - GetVersionEx (&os_version_info); + __small_sprintf (name->sysname, "CYGWIN_%s", osname); GetSystemInfo (&sysinfo); @@ -33,28 +31,6 @@ uname (struct utsname *name) len = sizeof (name->nodename) - 1; GetComputerNameA (name->nodename, &len); - /* Operating system type */ - switch (os_being_run) - { - case winNT: - strcpy (name->sysname, "CYGWIN_NT"); - break; - case win98: - strcpy (name->sysname, "CYGWIN_98"); - break; - case win95: - strcpy (name->sysname, "CYGWIN_95"); - break; - default: - strcpy (name->sysname, "CYGWIN_??"); - break; - } - - __small_sprintf (strchr (name->sysname, '\0'), "-%d.%d", - os_version_info.dwMajorVersion, - os_version_info.dwMinorVersion); - - /* Cygwin dll release */ __small_sprintf (name->release, "%d.%d.%d(%d.%d/%d/%d)", cygwin_version.dll_major / 1000, |