GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-uname.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2005-2018 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if defined (HAVE_CONFIG_H)
24 # include "config.h"
25 #endif
26 
27 #include <cerrno>
28 #include <cstring>
29 
30 #include "oct-uname.h"
31 #include "uname-wrapper.h"
32 
33 namespace octave
34 {
35  namespace sys
36  {
37  void
38  uname::init (void)
39  {
40  char *sysname, *nodename, *release, *version, *machine;
41 
43  &version, &machine);
44 
45  if (err < 0)
46  msg = std::strerror (errno);
47  else
48  {
54  msg = "";
55  }
56  }
57  }
58 }
std::string m_sysname
Definition: oct-uname.h:83
std::string version(void) const
Definition: oct-uname.h:75
int octave_uname_wrapper(char **sysname, char **nodename, char **release, char **version, char **machine)
Definition: uname-wrapper.c:38
std::string sysname(void) const
Definition: oct-uname.h:72
std::string nodename(void) const
Definition: oct-uname.h:73
std::string m_version
Definition: oct-uname.h:86
std::string msg
Definition: oct-uname.h:89
void init(void)
Definition: oct-uname.cc:38
std::string release(void) const
Definition: oct-uname.h:74
std::string m_release
Definition: oct-uname.h:85
std::string m_nodename
Definition: oct-uname.h:84
std::string machine(void) const
Definition: oct-uname.h:76
std::string m_machine
Definition: oct-uname.h:87