This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC - Add a function to read the Time Base frequency


"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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]