From 823a26fc22a9bbe37910404598981985ce18ce4e Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 24 Aug 2010 05:51:51 +0000 Subject: =?UTF-8?q?2010-09-24=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libcsupport/include/sys/utsname.h: Remove times(). Remove unnecessary includes. Introduce SYS_NMLN (From freebsd). * libcsupport/src/utsname.c: Rework uname(). --- cpukit/libcsupport/include/sys/utsname.h | 33 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'cpukit/libcsupport/include/sys/utsname.h') diff --git a/cpukit/libcsupport/include/sys/utsname.h b/cpukit/libcsupport/include/sys/utsname.h index ebe2f52785..b1b2e6ef41 100644 --- a/cpukit/libcsupport/include/sys/utsname.h +++ b/cpukit/libcsupport/include/sys/utsname.h @@ -10,9 +10,6 @@ extern "C" { #endif -#include -#include - /* * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90 * @@ -22,14 +19,22 @@ extern "C" { * Internet hostnames. */ +#ifdef _KERNEL +#define SYS_NMLN 32 /* uname(2) for the FreeBSD 1.1 ABI. */ +#endif + +#ifndef SYS_NMLN +#define SYS_NMLN 32 /* User can override. */ +#endif + struct utsname { - char sysname[ 32 ]; /* Name of this implementation of the operating system */ - char nodename[ 32 ]; /* Name of this node within an implementation */ - /* specified communication network */ - char release[ 32 ]; /* Current release level of this implementation */ - char version[ 32 ]; /* Current version level of this release */ - char machine[ 32 ]; /* Name of the hardware type on which the system */ - /* is running */ + char sysname[SYS_NMLN]; /* Name of this implementation of the operating system */ + char nodename[SYS_NMLN]; /* Name of this node within an implementation */ + /* specified communication network */ + char release[SYS_NMLN]; /* Current release level of this implementation */ + char version[SYS_NMLN]; /* Current version level of this release */ + char machine[SYS_NMLN]; /* Name of the hardware type on which the system */ + /* is running */ }; /* @@ -40,14 +45,6 @@ int uname( struct utsname *name ); -/* - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -); - #ifdef __cplusplus } #endif -- cgit v1.2.3