Procházet zdrojové kódy

fenv: struct rm_ctx should be private and not exposed in a public header

Waldemar Brodkorb před 5 hodinami
rodič
revize
1105fd6c97

+ 0 - 10
include/fenv.h

@@ -1,5 +1,4 @@
 /* Copyright (C) 1997, 1999, 2000 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
@@ -131,15 +130,6 @@ extern int fedisableexcept (int __excepts) __THROW;
 extern int fegetexcept (void) __THROW;
 #endif
 
-/* Rounding mode context.  This allows functions to set/restore rounding mode
-   only when the desired rounding mode is different from the current rounding
-   mode.  */
-struct rm_ctx
-{
-  fenv_t env;
-  bool updated_status;
-};
-
 __END_DECLS
 
 #endif /* fenv.h */

+ 24 - 0
include/fenv_private.h

@@ -0,0 +1,24 @@
+/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+
+   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/>.  */
+
+/* Rounding mode context.  This allows functions to set/restore rounding mode
+   only when the desired rounding mode is different from the current rounding
+   mode.  */
+struct rm_ctx
+{
+  fenv_t env;
+  bool updated_status;
+};

+ 1 - 0
libm/aarch64/fenv_private.h

@@ -19,6 +19,7 @@
 #define AARCH64_FENV_PRIVATE_H 1
 
 #include <fenv.h>
+#include <fenv_private.h>
 #include <fpu_control.h>
 
 static __always_inline void

+ 1 - 0
libm/arc/fenv_private.h

@@ -19,6 +19,7 @@
 #define _FENV_PRIVATE_H 1
 
 #include <fenv.h>
+#include <fenv_private.h>
 #include "get-rounding-mode.h"
 
 /* The standards only specify one variant of the fenv.h interfaces.

+ 1 - 0
libm/arm/fenv_private.h

@@ -19,6 +19,7 @@
 #define ARM_FENV_PRIVATE_H 1
 
 #include <fenv.h>
+#include <fenv_private.h>
 #include <fpu_control.h>
 
 static __always_inline void

+ 1 - 0
libm/csky/fenv_private.h

@@ -19,6 +19,7 @@
 #define CSKY_FENV_PRIVATE_H 1
 
 #include <fenv.h>
+#include <fenv_private.h>
 #include <fpu_control.h>
 #include "fenv_libc.h"
 

+ 1 - 0
libm/mips/fenv_private.h

@@ -24,6 +24,7 @@
    code instead.  */
 
 #include <fenv.h>
+#include <fenv_private.h>
 #include "fenv_libc.h"
 #include <fpu_control.h>
 

+ 1 - 0
libm/sparc/fenv_private.h

@@ -2,6 +2,7 @@
 #define SPARC_FENV_PRIVATE_H 1
 
 #include <fenv.h>
+#include <fenv_private.h>
 #include <fpu_control.h>
 
 /* For internal use only: access the fp state register.  */