This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
FreeBSD port (44): struct utsname dimensions
- From: Bruno Haible <bruno at clisp dot org>
- To: Roland McGrath <roland at frob dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 5 Sep 2002 14:14:52 +0200 (CEST)
- Subject: FreeBSD port (44): struct utsname dimensions
On FreeBSD, it's appropriate to make the 'utsname.version' field larger (256),
while keeping the other 'struct utsname' of reasonable size: 32.
In order to be able to use the standard <sys/utsname.h>, it needs to allow
for a different size of this field, which is defined in the port specific
<bits/utsname.h>.
2002-09-04 Bruno Haible <bruno@clisp.org>
* posix/sys/utsname.h (_UTSNAME_VERSION_LENGTH): Define as
_UTSNAME_LENGTH.
(struct utsname): Use _UTSNAME_VERSION_LENGTH for 'version' field.
diff -r -c3 glibc-20020828.bak/posix/sys/utsname.h glibc-20020828/posix/sys/utsname.h
*** glibc-20020828.bak/posix/sys/utsname.h Tue Jul 10 22:59:48 2001
--- glibc-20020828/posix/sys/utsname.h Fri Aug 30 11:04:32 2002
***************
*** 1,4 ****
! /* Copyright (C) 1991, 92, 94, 96, 97, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
--- 1,4 ----
! /* Copyright (C) 1991, 92, 94, 96, 97, 99, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
***************
*** 33,38 ****
--- 33,42 ----
# define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
#endif
+ #ifndef _UTSNAME_VERSION_LENGTH
+ # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
+ #endif
+
/* Structure describing the system and machine. */
struct utsname
{
***************
*** 45,51 ****
/* Current release level of this implementation. */
char release[_UTSNAME_LENGTH];
/* Current version level of this release. */
! char version[_UTSNAME_LENGTH];
/* Name of the hardware type the system is running on. */
char machine[_UTSNAME_LENGTH];
--- 49,55 ----
/* Current release level of this implementation. */
char release[_UTSNAME_LENGTH];
/* Current version level of this release. */
! char version[_UTSNAME_VERSION_LENGTH];
/* Name of the hardware type the system is running on. */
char machine[_UTSNAME_LENGTH];