From 295504e3a798683b998b74b9ce6c75dfb9ace530 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 24 Jan 2001 17:43:25 +0000 Subject: [PATCH] Makefile.in: Rebuilt. * Makefile.in: Rebuilt. * Makefile.am (c_source_files): Added sf_fabs.c. * java/lang/sf_fabs.c: New file. From-SVN: r39238 --- libjava/ChangeLog | 6 +++++ libjava/Makefile.am | 2 +- libjava/Makefile.in | 27 +++++++++++---------- libjava/java/lang/sf_fabs.c | 47 +++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 libjava/java/lang/sf_fabs.c diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 15a1466485c..9f44e4aaad8 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2001-01-24 Tom Tromey + + * Makefile.in: Rebuilt. + * Makefile.am (c_source_files): Added sf_fabs.c. + * java/lang/sf_fabs.c: New file. + 2001-01-19 Warren Levy * java/text/SimpleDateFormat.java (format): Compute hour for cases diff --git a/libjava/Makefile.am b/libjava/Makefile.am index c20819ecde5..fc5e5ef2259 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -1216,7 +1216,7 @@ c_source_files = \ java/lang/e_remainder.c java/lang/s_floor.c java/lang/w_remainder.c \ java/lang/e_scalb.c java/lang/s_rint.c java/lang/w_sqrt.c \ java/lang/e_sqrt.c java/lang/s_scalbn.c java/lang/sf_rint.c \ - java/lang/k_cos.c java/lang/s_sin.c + java/lang/k_cos.c java/lang/s_sin.c java/lang/sf_fabs.c #java/awt/natToolkit.cc diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 76298e0ba00..f5117b13684 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -976,7 +976,7 @@ c_source_files = \ java/lang/e_remainder.c java/lang/s_floor.c java/lang/w_remainder.c \ java/lang/e_scalb.c java/lang/s_rint.c java/lang/w_sqrt.c \ java/lang/e_sqrt.c java/lang/s_scalbn.c java/lang/sf_rint.c \ - java/lang/k_cos.c java/lang/s_sin.c + java/lang/k_cos.c java/lang/s_sin.c java/lang/sf_fabs.c #java/awt/natToolkit.cc @@ -1592,18 +1592,19 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ .deps/java/lang/s_fabs.P .deps/java/lang/s_floor.P \ .deps/java/lang/s_rint.P .deps/java/lang/s_scalbn.P \ .deps/java/lang/s_sin.P .deps/java/lang/s_tan.P \ -.deps/java/lang/sf_rint.P .deps/java/lang/strtod.P \ -.deps/java/lang/w_acos.P .deps/java/lang/w_asin.P \ -.deps/java/lang/w_atan2.P .deps/java/lang/w_exp.P \ -.deps/java/lang/w_fmod.P .deps/java/lang/w_log.P \ -.deps/java/lang/w_pow.P .deps/java/lang/w_remainder.P \ -.deps/java/lang/w_sqrt.P .deps/java/math/BigDecimal.P \ -.deps/java/math/BigInteger.P .deps/java/net/BindException.P \ -.deps/java/net/ConnectException.P .deps/java/net/ContentHandler.P \ -.deps/java/net/ContentHandlerFactory.P .deps/java/net/DatagramPacket.P \ -.deps/java/net/DatagramSocket.P .deps/java/net/DatagramSocketImpl.P \ -.deps/java/net/FileNameMap.P .deps/java/net/HttpURLConnection.P \ -.deps/java/net/InetAddress.P .deps/java/net/JarURLConnection.P \ +.deps/java/lang/sf_fabs.P .deps/java/lang/sf_rint.P \ +.deps/java/lang/strtod.P .deps/java/lang/w_acos.P \ +.deps/java/lang/w_asin.P .deps/java/lang/w_atan2.P \ +.deps/java/lang/w_exp.P .deps/java/lang/w_fmod.P \ +.deps/java/lang/w_log.P .deps/java/lang/w_pow.P \ +.deps/java/lang/w_remainder.P .deps/java/lang/w_sqrt.P \ +.deps/java/math/BigDecimal.P .deps/java/math/BigInteger.P \ +.deps/java/net/BindException.P .deps/java/net/ConnectException.P \ +.deps/java/net/ContentHandler.P .deps/java/net/ContentHandlerFactory.P \ +.deps/java/net/DatagramPacket.P .deps/java/net/DatagramSocket.P \ +.deps/java/net/DatagramSocketImpl.P .deps/java/net/FileNameMap.P \ +.deps/java/net/HttpURLConnection.P .deps/java/net/InetAddress.P \ +.deps/java/net/JarURLConnection.P \ .deps/java/net/MalformedURLException.P .deps/java/net/MulticastSocket.P \ .deps/java/net/NoRouteToHostException.P \ .deps/java/net/PlainDatagramSocketImpl.P \ diff --git a/libjava/java/lang/sf_fabs.c b/libjava/java/lang/sf_fabs.c new file mode 100644 index 00000000000..2aaed326ab9 --- /dev/null +++ b/libjava/java/lang/sf_fabs.c @@ -0,0 +1,47 @@ +/* sf_fabs.c -- float version of s_fabs.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * fabsf(x) returns the absolute value of x. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ + float fabsf(float x) +#else + float fabsf(x) + float x; +#endif +{ + __uint32_t ix; + GET_FLOAT_WORD(ix,x); + SET_FLOAT_WORD(x,ix&0x7fffffff); + return x; +} + +#ifdef _DOUBLE_IS_32BITS + +#ifdef __STDC__ + double fabs(double x) +#else + double fabs(x) + double x; +#endif +{ + return (double) fabsf((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */