Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/mips fix name space pollution by adding prefix...



details:   https://anonhg.NetBSD.org/src/rev/8168615a52ec
branches:  trunk
changeset: 479897:8168615a52ec
user:      shin <shin%NetBSD.org@localhost>
date:      Sun Dec 26 00:22:31 1999 +0000

description:
fix name space pollution by adding prefix '_mips_'.
closes PR 8770.

diffstat:

 lib/libc/arch/mips/fplib/environment.h  |  39 +++++++++++++++++++++++++++++++++
 lib/libc/arch/mips/fplib/fplib_libc.c   |  26 +++++++++++-----------
 lib/libc/arch/mips/gen/sf_fpgetmask.c   |   4 +-
 lib/libc/arch/mips/gen/sf_fpgetround.c  |   4 +-
 lib/libc/arch/mips/gen/sf_fpgetsticky.c |   4 +-
 lib/libc/arch/mips/gen/sf_fpsetmask.c   |   6 ++--
 lib/libc/arch/mips/gen/sf_fpsetround.c  |   6 ++--
 lib/libc/arch/mips/gen/sf_fpsetsticky.c |   6 ++--
 8 files changed, 67 insertions(+), 28 deletions(-)

diffs (230 lines):

diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/fplib/environment.h
--- a/lib/libc/arch/mips/fplib/environment.h    Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/fplib/environment.h    Sun Dec 26 00:22:31 1999 +0000
@@ -50,3 +50,42 @@
 #define INLINE /* for lint */
 #endif
 
+/*
+-------------------------------------------------------------------------------
+Move private identifiers with external linkage into implementation namespace.
+-------------------------------------------------------------------------------
+*/
+#define float32_eq                     _mips_float32_eq
+#define float32_eq_signaling           _mips_float32_eq_signaling
+#define float32_is_nan                 _mips_float32_is_nan
+#define float32_is_signaling_nan       _mips_float32_is_signaling_nan
+#define float32_le                     _mips_float32_le
+#define float32_le_quiet               _mips_float32_le_quiet
+#define float32_lt                     _mips_float32_lt
+#define float32_lt_quiet               _mips_float32_lt_quiet
+#define float32_rem                    _mips_float32_rem
+#define float32_round_to_int           _mips_float32_round_to_int
+#define float32_sqrt                   _mips_float32_sqrt
+#define float32_to_int32               _mips_float32_to_int32
+#define float32_to_int64               _mips_float32_to_int64
+#define float32_to_int64_round_to_zero _mips_float32_to_int64_round_to_zero
+#define float64_eq                     _mips_float64_eq
+#define float64_eq_signaling           _mips_float64_eq_signaling
+#define float64_is_nan                 _mips_float64_is_nan
+#define float64_is_signaling_nan       _mips_float64_is_signaling_nan
+#define float64_le                     _mips_float64_le
+#define float64_le_quiet               _mips_float64_le_quiet
+#define float64_lt                     _mips_float64_lt
+#define float64_lt_quiet               _mips_float64_lt_quiet
+#define float64_rem                    _mips_float64_rem
+#define float64_round_to_int           _mips_float64_round_to_int
+#define float64_sqrt                   _mips_float64_sqrt
+#define float64_to_int32               _mips_float64_to_int32
+#define float64_to_int64               _mips_float64_to_int64
+#define float64_to_int64_round_to_zero _mips_float64_to_int64_round_to_zero
+#define float_detect_tininess          _mips_float_detect_tininess
+#define float_exception_flags          _mips_float_exception_flags
+#define float_raise                    _mips_float_raise
+#define float_rounding_mode            _mips_float_rounding_mode
+#define int64_to_float32               _mips_int64_to_float32
+#define int64_to_float64               _mips_int64_to_float64
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/fplib/fplib_libc.c
--- a/lib/libc/arch/mips/fplib/fplib_libc.c     Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/fplib/fplib_libc.c     Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fplib_libc.c,v 1.1.1.1 1999/09/16 12:18:25 takemura Exp $      */
+/*     $NetBSD: fplib_libc.c,v 1.2 1999/12/26 00:22:31 shin Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -40,47 +40,47 @@
 #include "environment.h"
 #include "softfloat.h"
 
-void sfp_setround __P((int rnd_dir));
-int sfp_getround __P((void));
-void sfp_setmask __P((int mask));
-int sfp_getmask __P((void));
-void sfp_setsticky __P((int except));
-int sfp_getsticky __P((void));
+void _mips_sfp_setround __P((int rnd_dir));
+int _mips_sfp_getround __P((void));
+void _mips_sfp_setmask __P((int mask));
+int _mips_sfp_getmask __P((void));
+void _mips_sfp_setsticky __P((int except));
+int _mips_sfp_getsticky __P((void));
 
 void
-sfp_setround(rnd_dir)
+_mips_sfp_setround(rnd_dir)
        int rnd_dir;
 {
        float_rounding_mode = rnd_dir;
 }
 
 int
-sfp_getround(void)
+_mips_sfp_getround(void)
 {
        return(float_rounding_mode);
 }
 
 void
-sfp_setmask(mask)
+_mips_sfp_setmask(mask)
        int mask;
 {
 }
 
 int
-sfp_getmask(void)
+_mips_sfp_getmask(void)
 {
        return(0);
 }
 
 void
-sfp_setsticky(except)
+_mips_sfp_setsticky(except)
        int except;
 {
        float_exception_flags = except;
 }
 
 int
-sfp_getsticky(void)
+_mips_sfp_getsticky(void)
 {
        return(float_exception_flags);
 }
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/gen/sf_fpgetmask.c
--- a/lib/libc/arch/mips/gen/sf_fpgetmask.c     Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/gen/sf_fpgetmask.c     Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sf_fpgetmask.c,v 1.1.1.1 1999/09/16 12:18:26 takemura Exp $    */
+/*     $NetBSD: sf_fpgetmask.c,v 1.2 1999/12/26 00:22:31 shin Exp $    */
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -10,5 +10,5 @@
 fp_except
 fpgetmask()
 {
-       return sfp_getmask();
+       return _mips_sfp_getmask();
 }
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/gen/sf_fpgetround.c
--- a/lib/libc/arch/mips/gen/sf_fpgetround.c    Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/gen/sf_fpgetround.c    Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sf_fpgetround.c,v 1.1.1.1 1999/09/16 12:18:26 takemura Exp $   */
+/*     $NetBSD: sf_fpgetround.c,v 1.2 1999/12/26 00:22:32 shin Exp $   */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -57,7 +57,7 @@
 fpgetround()
 {
 #ifdef SOFT_FLOAT
-       return(sfp_getround());
+       return(_mips_sfp_getround());
 #else
        return(FP_RN);
 #endif
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/gen/sf_fpgetsticky.c
--- a/lib/libc/arch/mips/gen/sf_fpgetsticky.c   Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/gen/sf_fpgetsticky.c   Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sf_fpgetsticky.c,v 1.1.1.1 1999/09/16 12:18:26 takemura Exp $  */
+/*     $NetBSD: sf_fpgetsticky.c,v 1.2 1999/12/26 00:22:32 shin Exp $  */
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -10,5 +10,5 @@
 fp_except
 fpgetsticky()
 {
-       return sfp_getsticky();
+       return _mips_sfp_getsticky();
 }
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/gen/sf_fpsetmask.c
--- a/lib/libc/arch/mips/gen/sf_fpsetmask.c     Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/gen/sf_fpsetmask.c     Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sf_fpsetmask.c,v 1.1.1.1 1999/09/16 12:18:26 takemura Exp $    */
+/*     $NetBSD: sf_fpsetmask.c,v 1.2 1999/12/26 00:22:32 shin Exp $    */
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -14,7 +14,7 @@
        fp_except old;
        fp_except new;
 
-       old = sfp_getmask();
-       sfp_setmask(mask);
+       old = _mips_sfp_getmask();
+       _mips_sfp_setmask(mask);
        return old;
 }
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/gen/sf_fpsetround.c
--- a/lib/libc/arch/mips/gen/sf_fpsetround.c    Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/gen/sf_fpsetround.c    Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sf_fpsetround.c,v 1.1.1.1 1999/09/16 12:18:26 takemura Exp $   */
+/*     $NetBSD: sf_fpsetround.c,v 1.2 1999/12/26 00:22:32 shin Exp $   */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -34,7 +34,7 @@
 #include <sys/types.h>
 #include <ieeefp.h>
 
-void sfp_setround __P((fp_rnd));
+void _mips_sfp_setround __P((fp_rnd));
 
 /*
  * Return the current FP rounding mode
@@ -63,7 +63,7 @@
        old_rnd = fpgetround();
 
 #ifdef SOFTFLOAT
-       sfp_setround(rnd_dir);
+       _mips_sfp_setround(rnd_dir);
 #else
        abort();
 #endif
diff -r b374905ea1ea -r 8168615a52ec lib/libc/arch/mips/gen/sf_fpsetsticky.c
--- a/lib/libc/arch/mips/gen/sf_fpsetsticky.c   Sat Dec 25 21:56:37 1999 +0000
+++ b/lib/libc/arch/mips/gen/sf_fpsetsticky.c   Sun Dec 26 00:22:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sf_fpsetsticky.c,v 1.1.1.1 1999/09/16 12:18:26 takemura Exp $  */
+/*     $NetBSD: sf_fpsetsticky.c,v 1.2 1999/12/26 00:22:32 shin Exp $  */
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -13,7 +13,7 @@
 {
        fp_except old;
 
-       old = sfp_getsticky();
-       sfp_setsticky(sticky);
+       old = _mips_sfp_getsticky();
+       _mips_sfp_setsticky(sticky);
        return old;
 }



Home | Main Index | Thread Index | Old Index