]> sourceware.org Git - glibc.git/commitdiff
soft-fp: Use multiple-include guards.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 10 Mar 2015 00:32:29 +0000 (00:32 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 10 Mar 2015 00:32:29 +0000 (00:32 +0000)
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.

ChangeLog
soft-fp/double.h
soft-fp/extended.h
soft-fp/op-1.h
soft-fp/op-2.h
soft-fp/op-4.h
soft-fp/op-8.h
soft-fp/op-common.h
soft-fp/quad.h
soft-fp/single.h
soft-fp/soft-fp.h

index b6467fd4ee42545245e57c9d85f0a9aa46a18082..0298c1d426f5a55d16ed47ba0fecd2762132f217 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index b45827b98a3443a7a1691b6c0587f7447f8f0228..a05713f683921c4834d475c82ac3fc80fe6aa36c 100644 (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 */
index a96d63e2f5f8a445efd281961845c4a7ec61e2b5..428f9178a6f3348dafdcc9f53b59983430fd855b 100644 (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 */
index bc9e33bf4956c4b55c03ca5d638a5da4e3833588..e3a91bfc7b03e101851d1dad124bf2cadb8b4db3 100644 (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)
 /* Convert FP values between word sizes.  */
 
 #define _FP_FRAC_COPY_1_1(D, S)                (D##_f = S##_f)
+
+#endif /* !SOFT_FP_OP_1_H */
index 26bdfc093d9133f60a4dea17f598b287bb6ca8bc..c27b890c98afd4e0dc784ebb2bb72c1323191756 100644 (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)
 #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 */
index eeb41e09c2478629c09028149379ab595c0fd290..a5805170e4709705d3bc43b3e3a98b6b47eebcf1 100644 (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],   \
   while (0)
 
 #define _FP_FRAC_COPY_4_4(D, S)        _FP_FRAC_COPY_4 (D, S)
+
+#endif /* !SOFT_FP_OP_4_H */
index b072ab059418095485079e4b834bf11708c63721..5267ae34ecba26188b2fa2c269ad16f93e2a794e 100644 (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]
       X##_f[0] |= (_FP_FRAC_SRS_8_s != 0);                             \
     }                                                                  \
   while (0)
+
+#endif /* !SOFT_FP_OP_8_H */
index ee4147602fe9cbf3c756d033410eb69f45d0284d..0a2f86aad9cfb0e8370f267515bd0de647e4f5b3 100644 (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;     \
 #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 */
index 78387fc75b16d2682e1e26b7323df72c498f3a20..9b5191cf5d7f84de94f3f4d9eb2e5ca3a7ce7588 100644 (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 */
index 849bca529ac6d228f24f76d58555edd6245341f8..b03514006ff304374a7ce6f4408db784e1c2b2e9 100644 (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 */
index f93a94182bfcdfe3d1ab441fc9a47b46504945da..bb68df91606621810b2044a7db97cf98fb23b65c 100644 (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 */
This page took 0.12384 seconds and 5 git commands to generate.