Debian Bug report logs - #155100
glibc-doc: misleading definition of struct timeval from <sys/time.h>

version graph

Package: glibc-doc; Maintainer for glibc-doc is GNU Libc Maintainers <>; Source for glibc-doc is src:eglibc.

Reported by: James Troup <>

Date: Thu, 1 Aug 2002 12:33:05 UTC

Severity: normal

Found in version 2.2.5-6

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Ben Collins <>,
Bug#155100; Package glibc-doc. Full text and rfc822 format available.

Acknowledgement sent to James Troup <>:
New Bug report received and forwarded. Copy sent to Ben Collins <>, Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: James Troup <>
Subject: glibc-doc: misleading definition of struct timeval from <sys/time.h>
Date: 01 Aug 2002 13:22:45 +0100
Package: glibc-doc
Version: 2.2.5-6

glibc's docs say:

|  - Data Type: struct timeval
|      The `struct timeval' structure represents an elapsed time.  It is
|      declared in `sys/time.h' and has the following members:
|     `long int tv_sec'
|           This represents the number of whole seconds of elapsed time.
|     `long int tv_usec'
|           This is the rest of the elapsed time (a fraction of a second),
|           represented as the number of microseconds.  It is always less
|           than one million.

but... SuS says:

| The <sys/time.h> header shall define the timeval structure that
| includes at least the following members:
| time_t         tv_sec     Seconds. 
| suseconds_t    tv_usec    Microseconds. 


| The type suseconds_t shall be a signed integer type capable of storing
| values at least in the range [-1, 1000000]. [Option End]

and indeed sparc uses 'int' not 'long' for tv_usec.  Assuming Sparc's
include files aren't buggy, the documention should probably be fixed?
I'm not just reporting this to be pedantic, at least two -Werror using
packages have failed to build from source on sparc because they try to
format tv_usec with %ld.


Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Sun Apr 20 21:35:18 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.