Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Try to fix the build. This is why all tho...



details:   https://anonhg.NetBSD.org/src/rev/21c8fc9a5069
branches:  trunk
changeset: 745599:21c8fc9a5069
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 07 14:53:14 2020 +0000

description:
Try to fix the build. This is why all those inlines should really be in a
separate file as regular function. The code is too large and hard to manage
this way, and only increases in complexity as time goes by.

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.c |   9 ++-------
 tests/lib/libc/sys/t_ptrace_wait.h |  12 +++++++++---
 2 files changed, 11 insertions(+), 10 deletions(-)

diffs (68 lines):

diff -r 2dc2a833111f -r 21c8fc9a5069 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Sat Mar 07 13:28:45 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Sat Mar 07 14:53:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.168 2020/03/06 14:06:56 kamil Exp $        */
+/*     $NetBSD: t_ptrace_wait.c,v 1.169 2020/03/07 14:53:14 christos Exp $     */
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.168 2020/03/06 14:06:56 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.169 2020/03/07 14:53:14 christos Exp $");
 
 #define __LEGACY_PT_LWPINFO
 
@@ -60,11 +60,6 @@
 #include <time.h>
 #include <unistd.h>
 
-#include <fenv.h>
-#if (__arm__ && !__SOFTFP__) || __aarch64__
-#include <ieeefp.h> /* only need for ARM Cortex/Neon hack */
-#endif
-
 #if defined(__i386__) || defined(__x86_64__)
 #include <cpuid.h>
 #include <x86/cpu_extended_state.h>
diff -r 2dc2a833111f -r 21c8fc9a5069 tests/lib/libc/sys/t_ptrace_wait.h
--- a/tests/lib/libc/sys/t_ptrace_wait.h        Sat Mar 07 13:28:45 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.h        Sat Mar 07 14:53:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.h,v 1.24 2020/03/06 17:03:35 kamil Exp $ */
+/*     $NetBSD: t_ptrace_wait.h,v 1.25 2020/03/07 14:53:14 christos Exp $      */
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -654,10 +654,14 @@
 #endif
 }
 
+#include <fenv.h>
+
+#if (__arm__ && !__SOFTFP__) || __aarch64__
+#include <ieeefp.h> /* only need for ARM Cortex/Neon hack */
+
 static bool __used
 are_fpu_exceptions_supported(void)
 {
-#if (__arm__ && !__SOFTFP__) || __aarch64__
        /*
         * Some NEON fpus do not trap on IEEE 754 FP exceptions.
         * Skip these tests if running on them and compiled for
@@ -665,9 +669,11 @@
         */
        if (0 == fpsetmask(fpsetmask(FP_X_INV)))
                return false;
-#endif
        return true;
 }
+#else
+#define are_fpu_exceptions_supporter() 1
+#endif
 
 static void __used
 trigger_fpe(void)



Home | Main Index | Thread Index | Old Index