This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17797] CLOCKS_PER_SEC has the wrong type for ILP32 targets
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 06 Jan 2015 13:06:10 +0000
- Subject: [Bug libc/17797] CLOCKS_PER_SEC has the wrong type for ILP32 targets
- Auto-submitted: auto-generated
- References: <bug-17797-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17797
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 57ada0e7e79b9421a77d2b92dffce0f9e8e087b5 (commit)
from 46abb64d6287d09100b147d062f6810066389b7e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=57ada0e7e79b9421a77d2b92dffce0f9e8e087b5
commit 57ada0e7e79b9421a77d2b92dffce0f9e8e087b5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jan 6 04:59:13 2015 -0800
Define CLOCKS_PER_SEC type to the type clock_t
C99 specifies that CLOCKS_PER_SEC is an expression with the type clock_t.
This patch adds a generic <bits/time2.h> to define CLOCKS_PER_SEC and
provides the Linux/x86-64 version of <bits/time2.h> to support x32.
[BZ #17797]
* bits/time.h (CLOCKS_PER_SEC): Changed to ((clock_t) 1000000).
* sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Likewise.
* sysdeps/unix/sysv/linux/clock.c (clock): _Static_assert
CLOCKS_PER_SEC == 1000000.
* time/clocktest.c (main): Replace %ld with %jd and cast to
intmax_t.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
NEWS | 2 +-
bits/time.h | 8 ++++----
sysdeps/unix/sysv/linux/bits/time.h | 8 ++++----
sysdeps/unix/sysv/linux/clock.c | 7 +++----
time/clocktest.c | 4 ++--
6 files changed, 24 insertions(+), 15 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.