| 1 | /* |
| 2 | * Copyright (C) 2000 Ross Combs ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program 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 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | */ |
| 18 | #ifndef INCLUDED_UNAME_H |
| 19 | #define INCLUDED_UNAME_H |
| 20 | |
| 21 | #ifdef HAVE_UNAME |
| 22 | #ifdef HAVE_SYS_UTSNAME_H |
| 23 | #include <sys/utsname.h> |
| 24 | #endif |
| 25 | #else |
| 26 | |
| 27 | #ifndef SYS_NMLN |
| 28 | #define SYS_NMLN 64 |
| 29 | #endif |
| 30 | |
| 31 | namespace pvpgn |
| 32 | { |
| 33 | struct utsname |
| 34 | { |
| 35 | char sysname[SYS_NMLN + 1]; |
| 36 | char nodename[SYS_NMLN + 1]; |
| 37 | char release[SYS_NMLN + 1]; |
| 38 | char version[SYS_NMLN + 1]; |
| 39 | char machine[SYS_NMLN + 1]; |
| 40 | char domainname[SYS_NMLN + 1]; |
| 41 | }; |
| 42 | |
| 43 | int uname(struct utsname* buf); |
| 44 | } |
| 45 | |
| 46 | #endif // HAVE_UNAME |
| 47 | #endif // INCLUDED_UNAME_H |