Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include For convenient use in libc, add unions ...



details:   https://anonhg.NetBSD.org/src/rev/b64f5f91955f
branches:  trunk
changeset: 554366:b64f5f91955f
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Oct 27 10:13:48 2003 +0000

description:
For convenient use in libc, add unions of the C floating types and their
corresponding structure definitions.

diffstat:

 sys/arch/arm/include/ieee.h |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 458dfb600288 -r b64f5f91955f sys/arch/arm/include/ieee.h
--- a/sys/arch/arm/include/ieee.h       Mon Oct 27 09:58:42 2003 +0000
+++ b/sys/arch/arm/include/ieee.h       Mon Oct 27 10:13:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ieee.h,v 1.5 2003/10/26 15:57:54 kleink Exp $  */
+/*     $NetBSD: ieee.h,v 1.6 2003/10/27 10:13:48 kleink Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -140,3 +140,16 @@
  */
 #define        SNG_EXP_BIAS    127
 #define        DBL_EXP_BIAS    1023
+
+/*
+ * Convenience data structures.
+ */
+union ieee_single_u {
+       float                   sngu_f;
+       struct ieee_single      sngu_sng;
+};
+
+union ieee_double_u {
+       double                  dblu_d;
+       struct ieee_double      dblu_dbl;
+};



Home | Main Index | Thread Index | Old Index