Skip to content
Snippets Groups Projects
Commit f94923f4 authored by rswindell's avatar rswindell
Browse files

Detect and display Unix/Linux version info.

parent 360a4e93
No related branches found
No related tags found
No related merge requests found
......@@ -106,13 +106,19 @@ void sbbs_t::ver()
,winver.dwMajorVersion, winver.dwMinorVersion
,winver.dwBuildNumber,winver.szCSDVersion);
#elif defined(__linux__)
sprintf(str,"Linux");
#elif defined(__unix__)
sprintf(str,"Unix");
struct utsname unixver;
if(uname(&unixver)!=0)
sprintf(str,"Unix (uname errno: %d)",errno);
else
sprintf(str,"%s %s %s %s"
,unixver.sysname /* e.g. "Linux" */
,unixver.release /* e.g. "2.2.14-5.0" */
,unixver.version /* e.g. "#1 Tue Mar 7 20:53:41 EST 2000" */
,unixver.machine /* e.g. "i586" */
);
#else /* DOS && __BORLANDC__*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment