This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC - Add a function to read the Time Base frequency
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 08 Oct 2012 12:15:53 +0200
- Subject: Re: [PATCH] PowerPC - Add a function to read the Time Base frequency
- References: <1345833351-10398-1-git-send-email-tuliom@linux.vnet.ibm.com>
"Tulio Magno Quites Machado Filho" <tuliom@linux.vnet.ibm.com> writes:
> diff --git a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
> new file mode 100644
> index 0000000..f62ed86
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
> @@ -0,0 +1,26 @@
> +/* Get the frequency of the time base.
> + Copyright (C) 2012 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
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#include <libc-internal.h>
> +
> +uint64_t
> +__get_timebase_freq (void)
> +{
> + return (uint64_t) __get_clockfreq ();
> +}
> +weak_alias (__get_timebase_freq, __ppc_get_timebase_freq)
../sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c:21:1: error: unknown type name âuint64_tâ
Fixed like this.
Andreas.
* sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c: Include
<stdint.h>.
diff --git a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
index f62ed86..5559dd5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
+++ b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <stdint.h>
#include <libc-internal.h>
uint64_t
--
1.7.12.2
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."