soft-fp: Use multiple-include guards.

This patch makes soft-fp headers consistently use multiple-include
guards, something previously done mainly only in the Linux kernel
version.  The guard macros aren't the same as those used in the Linux
kernel, but there seems to be enough variation in such guards in Linux
kernel code that hopefully this version will be acceptable there.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.

	* soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard.
	* soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise.
	* soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise.
	* soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise.
	* soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise.
	* soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise.
	* soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise.
	* soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise.
	* soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise.
	* soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty.
	Add comment on closing #endif.
This commit is contained in:
Joseph Myers 2015-03-10 00:32:29 +00:00
parent 01d032e0bb
commit a2f8be9c83
11 changed files with 61 additions and 2 deletions

View File

@ -1,3 +1,17 @@
2015-03-10 Joseph Myers <joseph@codesourcery.com>
* soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard.
* soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise.
* soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise.
* soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise.
* soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise.
* soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise.
* soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise.
* soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise.
* soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise.
* soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty.
Add comment on closing #endif.
2015-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
* posix/wordexp.c (CHAR_IN_SET): New macro.

View File

@ -30,6 +30,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_DOUBLE_H
#define SOFT_FP_DOUBLE_H 1
#if _FP_W_TYPE_SIZE < 32
# error "Here's a nickel kid. Go buy yourself a real computer."
#endif
@ -316,3 +319,5 @@ union _FP_UNION_D
# define _FP_FRAC_HIGH_DW_D(X) _FP_FRAC_HIGH_2 (X)
#endif /* W_TYPE_SIZE < 64 */
#endif /* !SOFT_FP_DOUBLE_H */

View File

@ -27,6 +27,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_EXTENDED_H
#define SOFT_FP_EXTENDED_H 1
#if _FP_W_TYPE_SIZE < 32
# error "Here's a nickel, kid. Go buy yourself a real computer."
#endif
@ -506,3 +509,5 @@ union _FP_UNION_E
# define _FP_FRAC_HIGH_DW_E(X) (X##_f[2])
#endif /* not _FP_W_TYPE_SIZE < 64 */
#endif /* !SOFT_FP_EXTENDED_H */

View File

@ -30,6 +30,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_OP_1_H
#define SOFT_FP_OP_1_H 1
#define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f _FP_ZERO_INIT
#define _FP_FRAC_COPY_1(D, S) (D##_f = S##_f)
#define _FP_FRAC_SET_1(X, I) (X##_f = I)
@ -362,3 +365,5 @@
/* Convert FP values between word sizes. */
#define _FP_FRAC_COPY_1_1(D, S) (D##_f = S##_f)
#endif /* !SOFT_FP_OP_1_H */

View File

@ -30,6 +30,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_OP_2_H
#define SOFT_FP_OP_2_H 1
#define _FP_FRAC_DECL_2(X) \
_FP_W_TYPE X##_f0 _FP_ZERO_INIT, X##_f1 _FP_ZERO_INIT
#define _FP_FRAC_COPY_2(D, S) (D##_f0 = S##_f0, D##_f1 = S##_f1)
@ -698,3 +701,5 @@
#define _FP_FRAC_COPY_2_1(D, S) ((D##_f0 = S##_f), (D##_f1 = 0))
#define _FP_FRAC_COPY_2_2(D, S) _FP_FRAC_COPY_2 (D, S)
#endif /* !SOFT_FP_OP_2_H */

View File

@ -30,6 +30,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_OP_4_H
#define SOFT_FP_OP_4_H 1
#define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4]
#define _FP_FRAC_COPY_4(D, S) \
(D##_f[0] = S##_f[0], D##_f[1] = S##_f[1], \
@ -868,3 +871,5 @@
while (0)
#define _FP_FRAC_COPY_4_4(D, S) _FP_FRAC_COPY_4 (D, S)
#endif /* !SOFT_FP_OP_4_H */

View File

@ -29,6 +29,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_OP_8_H
#define SOFT_FP_OP_8_H 1
/* We need just a few things from here for op-4, if we ever need some
other macros, they can be added. */
#define _FP_FRAC_DECL_8(X) _FP_W_TYPE X##_f[8]
@ -143,3 +146,5 @@
X##_f[0] |= (_FP_FRAC_SRS_8_s != 0); \
} \
while (0)
#endif /* !SOFT_FP_OP_8_H */

View File

@ -29,6 +29,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_OP_COMMON_H
#define SOFT_FP_OP_COMMON_H 1
#define _FP_DECL(wc, X) \
_FP_I_TYPE X##_c __attribute__ ((unused)) _FP_ZERO_INIT; \
_FP_I_TYPE X##_s __attribute__ ((unused)) _FP_ZERO_INIT; \
@ -2109,3 +2112,5 @@
#define _FP_DIV_MEAT_1_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y)
#define _FP_DIV_MEAT_2_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y)
#define _FP_DIV_MEAT_4_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y)
#endif /* !SOFT_FP_OP_COMMON_H */

View File

@ -30,6 +30,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_QUAD_H
#define SOFT_FP_QUAD_H 1
#if _FP_W_TYPE_SIZE < 32
# error "Here's a nickel, kid. Go buy yourself a real computer."
#endif
@ -323,3 +326,5 @@ union _FP_UNION_Q
# define _FP_FRAC_HIGH_DW_Q(X) _FP_FRAC_HIGH_4 (X)
#endif /* not _FP_W_TYPE_SIZE < 64 */
#endif /* !SOFT_FP_QUAD_H */

View File

@ -30,6 +30,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_SINGLE_H
#define SOFT_FP_SINGLE_H 1
#if _FP_W_TYPE_SIZE < 32
# error "Here's a nickel kid. Go buy yourself a real computer."
#endif
@ -192,3 +195,5 @@ union _FP_UNION_S
#else
# define _FP_FRAC_HIGH_DW_S(X) _FP_FRAC_HIGH_1 (X)
#endif
#endif /* !SOFT_FP_SINGLE_H */

View File

@ -30,7 +30,7 @@
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_H
#define SOFT_FP_H
#define SOFT_FP_H 1
#ifdef _LIBC
# include <sfp-machine.h>
@ -337,4 +337,4 @@ typedef USItype UHWtype;
extern void abort (void);
#endif
#endif
#endif /* !SOFT_FP_H */