Wed Jun 17 08:23:18 2020 UTC ()
Regardless of __HAVE_FENV, include <fenv.h>, which itself defines __HAVE_FENV.


(rin)
diff -r1.28 -r1.29 src/tests/lib/libc/sys/t_ptrace_wait.h

cvs diff -r1.28 -r1.29 src/tests/lib/libc/sys/t_ptrace_wait.h (expand / switch to unified diff)

--- src/tests/lib/libc/sys/t_ptrace_wait.h 2020/05/05 00:50:39 1.28
+++ src/tests/lib/libc/sys/t_ptrace_wait.h 2020/06/17 08:23:18 1.29
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_ptrace_wait.h,v 1.28 2020/05/05 00:50:39 kamil Exp $ */ 1/* $NetBSD: t_ptrace_wait.h,v 1.29 2020/06/17 08:23:18 rin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. 4 * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -644,29 +644,27 @@ trigger_segv(void) @@ -644,29 +644,27 @@ trigger_segv(void)
644 644
645static void __used 645static void __used
646trigger_ill(void) 646trigger_ill(void)
647{ 647{
648 648
649 /* Illegal instruction causes CPU trap, translated to SIGILL */ 649 /* Illegal instruction causes CPU trap, translated to SIGILL */
650#ifdef PTRACE_ILLEGAL_ASM 650#ifdef PTRACE_ILLEGAL_ASM
651 PTRACE_ILLEGAL_ASM; 651 PTRACE_ILLEGAL_ASM;
652#else 652#else
653 /* port me */ 653 /* port me */
654#endif 654#endif
655} 655}
656 656
657#ifdef __HAVE_FENV 
658#include <fenv.h> 657#include <fenv.h>
659#endif 
660 658
661#if (__arm__ && !__SOFTFP__) || __aarch64__ 659#if (__arm__ && !__SOFTFP__) || __aarch64__
662#include <ieeefp.h> /* only need for ARM Cortex/Neon hack */ 660#include <ieeefp.h> /* only need for ARM Cortex/Neon hack */
663 661
664static bool __used 662static bool __used
665are_fpu_exceptions_supported(void) 663are_fpu_exceptions_supported(void)
666{ 664{
667 /* 665 /*
668 * Some NEON fpus do not trap on IEEE 754 FP exceptions. 666 * Some NEON fpus do not trap on IEEE 754 FP exceptions.
669 * Skip these tests if running on them and compiled for 667 * Skip these tests if running on them and compiled for
670 * hard float. 668 * hard float.
671 */ 669 */
672 if (0 == fpsetmask(fpsetmask(FP_X_INV))) 670 if (0 == fpsetmask(fpsetmask(FP_X_INV)))