This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] include: fix ffs, fls guards


We had two targets (or1k and epiphany) for RTEMS that were
using gcc 4.9.x with the current newlib snapshot. They
were giving no prototype warnings for flsl(). The targets
on gcc 7.2 were not giving that warning on the same code.

Would you expect this to fix that?

--joel

On 8/29/2017 2:15 PM, Corinna Vinschen wrote:
On Aug 29 12:58, Yaakov Selkowitz wrote:
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
  newlib/libc/include/strings.h | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h
index 35fcdc092..122f2fcd6 100644
--- a/newlib/libc/include/strings.h
+++ b/newlib/libc/include/strings.h
@@ -50,12 +50,14 @@ void	 bzero(void *, size_t);					/* LEGACY */
  #if __BSD_VISIBLE
  void	 explicit_bzero(void *, size_t);
  #endif
-#if __XSI_VISIBLE
+#if __MISC_VISIBLE || __POSIX_VISIBLE < 200809 || __XSI_VISIBLE >= 700
  int	 ffs(int) __pure2;
  #endif
-#if __BSD_VISIBLE
+#if __GNU_VISIBLE
  int	 ffsl(long) __pure2;
  int	 ffsll(long long) __pure2;
+#endif
+#if __BSD_VISIBLE
  int	 fls(int) __pure2;
  int	 flsl(long) __pure2;
  int	 flsll(long long) __pure2;
--
2.14.1

ACK, please push.


Thanks,
Corinna


--joel


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