]> sourceware.org Git - newlib-cygwin.git/commitdiff
newlib: remove __infinity{f,ld} constants
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 18 Apr 2017 10:17:26 +0000 (12:17 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 18 Apr 2017 10:17:26 +0000 (12:17 +0200)
previous commit 4c90db7bc89e7fa1077025fefdd58269dc71a6ac introduced
a compile time error because libm/common/s_infconst.c used the remove
__fmath, __dmath, and __ldmath union types.

Since this is very old, and unused for a very long time, just drop the
file and thus the __infinity constants entirely.

Exception: Cygwin exports __infinity from the beginning.  There's a very,
VERY low probability that any existing executable or lib still uses this
constant, but we just keep it in for backward compat, nevertheless.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
newlib/Makefile.am
newlib/Makefile.in
newlib/libm/common/Makefile.am
newlib/libm/common/Makefile.in
newlib/libm/common/s_infconst.c [deleted file]
winsup/cygwin/math/isinf.c

index e43b2e3d8c184bff89d288e4f4ae27b0c94602ae..effa2adba74ae48c475c5bbe965b30065a49e868 100644 (file)
@@ -112,8 +112,7 @@ MATHOBJS_IN_LIBC = \
        $(lpfx)sf_modf.$(oext) $(lpfx)s_scalbn.$(oext) \
        $(lpfx)sf_scalbn.$(oext) \
        $(lpfx)s_finite.$(oext) $(lpfx)sf_finite.$(oext) \
-       $(lpfx)s_copysign.$(oext) $(lpfx)sf_copysign.$(oext) \
-       $(lpfx)s_infconst.$(oext)
+       $(lpfx)s_copysign.$(oext) $(lpfx)sf_copysign.$(oext)
 
 LIBC_OBJECTLISTS = \
        $(POSIX_OBJECTLIST) \
index 58b4acdd20684b91a77999e273ff76b3586fd1a4..7756e7066eca87e85c81671708ed2e54ce5ea7ac 100644 (file)
@@ -408,8 +408,7 @@ MATHOBJS_IN_LIBC = \
        $(lpfx)sf_modf.$(oext) $(lpfx)s_scalbn.$(oext) \
        $(lpfx)sf_scalbn.$(oext) \
        $(lpfx)s_finite.$(oext) $(lpfx)sf_finite.$(oext) \
-       $(lpfx)s_copysign.$(oext) $(lpfx)sf_copysign.$(oext) \
-       $(lpfx)s_infconst.$(oext)
+       $(lpfx)s_copysign.$(oext) $(lpfx)sf_copysign.$(oext)
 
 LIBC_OBJECTLISTS = \
        $(POSIX_OBJECTLIST) \
index 2a279486978e29c09c19e188cd24dba653bcab4c..1268e17db847d0b9246017ccbfa619d7a22f2db6 100644 (file)
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = cygnus
 INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
 
 src =  s_finite.c s_copysign.c s_modf.c s_scalbn.c \
-       s_cbrt.c s_exp10.c s_expm1.c s_ilogb.c s_infconst.c \
+       s_cbrt.c s_exp10.c s_expm1.c s_ilogb.c \
        s_infinity.c s_isinf.c s_isinfd.c s_isnan.c s_isnand.c \
        s_log1p.c s_nan.c s_nextafter.c s_pow10.c \
        s_rint.c s_logb.c s_log2.c s_matherr.c s_lib_ver.c \
index a694ce1662a81a19f1e56fe2e6dfe164ea6acb65..9b367653dc610161f8059f7afd4e04f81b4ac9bb 100644 (file)
@@ -78,7 +78,7 @@ am__objects_1 = lib_a-s_finite.$(OBJEXT) lib_a-s_copysign.$(OBJEXT) \
        lib_a-s_modf.$(OBJEXT) lib_a-s_scalbn.$(OBJEXT) \
        lib_a-s_cbrt.$(OBJEXT) lib_a-s_exp10.$(OBJEXT) \
        lib_a-s_expm1.$(OBJEXT) lib_a-s_ilogb.$(OBJEXT) \
-       lib_a-s_infconst.$(OBJEXT) lib_a-s_infinity.$(OBJEXT) \
+       lib_a-s_infinity.$(OBJEXT) \
        lib_a-s_isinf.$(OBJEXT) lib_a-s_isinfd.$(OBJEXT) \
        lib_a-s_isnan.$(OBJEXT) lib_a-s_isnand.$(OBJEXT) \
        lib_a-s_log1p.$(OBJEXT) lib_a-s_nan.$(OBJEXT) \
@@ -148,7 +148,7 @@ lib_a_OBJECTS = $(am_lib_a_OBJECTS)
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libcommon_la_LIBADD =
 am__objects_5 = s_finite.lo s_copysign.lo s_modf.lo s_scalbn.lo \
-       s_cbrt.lo s_exp10.lo s_expm1.lo s_ilogb.lo s_infconst.lo \
+       s_cbrt.lo s_exp10.lo s_expm1.lo s_ilogb.lo \
        s_infinity.lo s_isinf.lo s_isinfd.lo s_isnan.lo s_isnand.lo \
        s_log1p.lo s_nan.lo s_nextafter.lo s_pow10.lo s_rint.lo \
        s_logb.lo s_log2.lo s_matherr.lo s_lib_ver.lo s_fdim.lo \
@@ -334,7 +334,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = cygnus
 INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
 src = s_finite.c s_copysign.c s_modf.c s_scalbn.c \
-       s_cbrt.c s_exp10.c s_expm1.c s_ilogb.c s_infconst.c \
+       s_cbrt.c s_exp10.c s_expm1.c s_ilogb.c \
        s_infinity.c s_isinf.c s_isinfd.c s_isnan.c s_isnand.c \
        s_log1p.c s_nan.c s_nextafter.c s_pow10.c \
        s_rint.c s_logb.c s_log2.c s_matherr.c s_lib_ver.c \
@@ -508,12 +508,6 @@ lib_a-s_ilogb.o: s_ilogb.c
 lib_a-s_ilogb.obj: s_ilogb.c
        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_ilogb.obj `if test -f 's_ilogb.c'; then $(CYGPATH_W) 's_ilogb.c'; else $(CYGPATH_W) '$(srcdir)/s_ilogb.c'; fi`
 
-lib_a-s_infconst.o: s_infconst.c
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_infconst.o `test -f 's_infconst.c' || echo '$(srcdir)/'`s_infconst.c
-
-lib_a-s_infconst.obj: s_infconst.c
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_infconst.obj `if test -f 's_infconst.c'; then $(CYGPATH_W) 's_infconst.c'; else $(CYGPATH_W) '$(srcdir)/s_infconst.c'; fi`
-
 lib_a-s_infinity.o: s_infinity.c
        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_infinity.o `test -f 's_infinity.c' || echo '$(srcdir)/'`s_infinity.c
 
diff --git a/newlib/libm/common/s_infconst.c b/newlib/libm/common/s_infconst.c
deleted file mode 100644 (file)
index 47a9dca..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Infinity as a constant value.   This is used for HUGE_VAL.
- * Added by Cygnus Support.
- */
-
-#include <float.h>
-#include <math.h>
-
-/* These should never actually be used any longer, as their use in math.h was
- * removed, but they are kept here in case a user was pointing to them.
- * FIXME:  deprecate these identifiers and then delete them.  */
-/* Float version of infinity.  */
-const union __fmath __infinityf[1] = { { FLT_MAX+FLT_MAX } };
-
-/* Double version of infinity.  */
-const union __dmath __infinity[1] = { { DBL_MAX+DBL_MAX } };
-
-/* Long double version of infinity.  */
-#if defined(_HAVE_LONG_DOUBLE)
-const union __ldmath __infinityld[1] = { { LDBL_MAX+LDBL_MAX } };
-#endif
index fd9e2992ac84e691cb1b4002a74cd02e19742007..6482c9921b895f3fec842516773741f588906edd 100644 (file)
@@ -16,3 +16,8 @@ isinfl (long double x)
   return __builtin_isinf_sign (x);
 }
 
+/* Infinity as a constant value.  Should never actually be used any longer,
+   but has been exported by Cygwin for ages so we keep it here for (probably
+   unnecessary) backward compat. */
+#include <float.h>
+const double __infinity[1] = { DBL_MAX+DBL_MAX };
This page took 0.041554 seconds and 5 git commands to generate.