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 01:08:08 +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 #3 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, hjl/pr17711 has been created
at 8bd82cff9f6d7a71f1f26f7968309f87c530f55d (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8bd82cff9f6d7a71f1f26f7968309f87c530f55d
commit 8bd82cff9f6d7a71f1f26f7968309f87c530f55d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Dec 19 06:30:31 2014 -0800
Compile vismain with -fPIC and link with -pie
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ef3088c8da5288533cd9197e928b33bdc8833718
commit ef3088c8da5288533cd9197e928b33bdc8833718
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 5 11:47:31 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: Include <assert.h>.
(clock): Assert CLOCKS_PER_SEC == 1000000l.
* time/clocktest.c (main): Replace %ld with %jd and cast to
intmax_t.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.