Line | |
---|
1 | /*
|
---|
2 | * synergy -- mouse and keyboard sharing utility
|
---|
3 | * Copyright (C) 2004 Chris Schoeneman
|
---|
4 | *
|
---|
5 | * This package is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU General Public License
|
---|
7 | * found in the file COPYING that should have accompanied this file.
|
---|
8 | *
|
---|
9 | * This package is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
12 | * GNU General Public License for more details.
|
---|
13 | */
|
---|
14 |
|
---|
15 | #include "CArchSystemUnix.h"
|
---|
16 | #include <sys/utsname.h>
|
---|
17 |
|
---|
18 | //
|
---|
19 | // CArchSystemUnix
|
---|
20 | //
|
---|
21 |
|
---|
22 | CArchSystemUnix::CArchSystemUnix()
|
---|
23 | {
|
---|
24 | // do nothing
|
---|
25 | }
|
---|
26 |
|
---|
27 | CArchSystemUnix::~CArchSystemUnix()
|
---|
28 | {
|
---|
29 | // do nothing
|
---|
30 | }
|
---|
31 |
|
---|
32 | std::string
|
---|
33 | CArchSystemUnix::getOSName() const
|
---|
34 | {
|
---|
35 | #if defined(HAVE_SYS_UTSNAME_H)
|
---|
36 | struct utsname info;
|
---|
37 | if (uname(&info) == 0) {
|
---|
38 | std::string msg;
|
---|
39 | msg += info.sysname;
|
---|
40 | msg += " ";
|
---|
41 | msg += info.release;
|
---|
42 | msg += " ";
|
---|
43 | msg += info.version;
|
---|
44 | msg += " ";
|
---|
45 | msg += info.machine;
|
---|
46 | return msg;
|
---|
47 | }
|
---|
48 | #endif
|
---|
49 | return "Unix <unknown>";
|
---|
50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.