This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sh: provide a __set_fpscr prototype
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: vapier at gentoo dot org
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 02 Dec 2009 13:01:15 +0900 (JST)
- Subject: Re: [PATCH] sh: provide a __set_fpscr prototype
- References: <200902161921.31346.vapier@gentoo.org><1259721686-15867-1-git-send-email-vapier@gentoo.org>
Mike Frysinger <vapier@gentoo.org> wrote:
> The sh port uses the gcc __set_fpscr internal function, but neither gcc
> nor glibc creates a prototype for it. This leads to a bunch of random
> warnings about implicit decls during the build.
Thanks for the patch. OK with fixing a minor coding style issue:
> +/* GCC provides this function */
Period and one more space after it.
> +extern void __set_fpscr(unsigned long);
Space before '('.
I've attached the revised one. Uli, could you please approve
the patch below?
Regards,
kaz
--
2009-12-01 Mike Frysinger <vapier@gentoo.org>
* sysdeps/sh/sh4/fpu/fpu_control.h (__set_fpscr): New prototype.
--- ORIG/libc/sysdeps/sh/sh4/fpu/fpu_control.h 2009-05-21 09:56:10.000000000 +0900
+++ libc/sysdeps/sh/sh4/fpu/fpu_control.h 2009-12-02 11:55:05.000000000 +0900
@@ -1,5 +1,5 @@
/* FPU control word definitions. SH version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2009 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
@@ -45,6 +45,8 @@ typedef unsigned int fpu_control_t;
#define _FPU_GETCW(cw) __asm__ ("sts fpscr,%0" : "=r" (cw))
#if defined __GNUC__
+/* GCC provides this function. */
+extern void __set_fpscr (unsigned long);
#define _FPU_SETCW(cw) __set_fpscr ((cw))
#else
#define _FPU_SETCW(cw) __asm__ ("lds %0,fpscr" : : "r" (cw))