[rtems commit] Revert "Revert "libtests/complex: Avoid generated files""
Joel Sherrill
joel at rtems.org
Thu May 31 20:31:34 UTC 2012
Module: rtems
Branch: master
Commit: 4f16ce03d2f1879691a19c7af779b671b01f2767
Changeset: http://git.rtems.org/rtems/commit/?id=4f16ce03d2f1879691a19c7af779b671b01f2767
Author: Ralf Corsépius <ralf.corsepius at rtems.org>
Date: Thu May 24 07:16:22 2012 +0200
Revert "Revert "libtests/complex: Avoid generated files""
This reverts commit 0c2d8ec48a116cadb86564bc1226e308e197d4c1.
---
testsuites/libtests/complex/Makefile.am | 20 -----
testsuites/libtests/complex/docomplex.c | 106 ++------------------------
testsuites/libtests/complex/docomplex.h | 122 ++++++++++++++++++++++++++++++
testsuites/libtests/complex/docomplex.in | 116 ----------------------------
testsuites/libtests/complex/docomplexf.c | 107 ++------------------------
testsuites/libtests/complex/docomplexl.c | 107 ++------------------------
testsuites/libtests/complex/init.c | 4 -
7 files changed, 145 insertions(+), 437 deletions(-)
diff --git a/testsuites/libtests/complex/Makefile.am b/testsuites/libtests/complex/Makefile.am
index 2a16eec..7861d4a 100644
--- a/testsuites/libtests/complex/Makefile.am
+++ b/testsuites/libtests/complex/Makefile.am
@@ -2,30 +2,10 @@ if HAS_COMPLEX
rtems_tests_PROGRAMS = complex
complex_SOURCES = init.c docomplex.c docomplexf.c docomplexl.c
endif
-EXTRA_DIST = docomplex.in
# FIXME: Skip long double, not yet supported in newlib
complex_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LONG_DOUBLE
-docomplex.c: $(srcdir)/docomplex.in
- sed -e 's,[@]FTYPE[@],double,' \
- -e 's,[@]FSUFFIX[@], ,g' \
- -e 's,[@]FGUARD[@],NO_DOUBLE,' \
- $(srcdir)/docomplex.in > $(srcdir)/docomplex.c
-
-docomplexf.c: $(srcdir)/docomplex.in
- sed -e 's,[@]FTYPE[@],float,' \
- -e 's,[@]FSUFFIX[@],f,g' \
- -e 's,[@]FGUARD[@],NO_FLOAT,' \
- $(srcdir)/docomplex.in > $(srcdir)/docomplexf.c
-
-docomplexl.c: $(srcdir)/docomplex.in
- sed -e 's,[@]FTYPE[@],long double,' \
- -e 's,[@]FSUFFIX[@],l,g' \
- -e 's,%f,%Lf,g' \
- -e 's,[@]FGUARD[@],NO_LONG_DOUBLE,' \
- $(srcdir)/docomplex.in > $(srcdir)/docomplexl.c
-
dist_rtems_tests_DATA = complex.scn
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
diff --git a/testsuites/libtests/complex/docomplex.c b/testsuites/libtests/complex/docomplex.c
index 7a1b961..4872b5d 100644
--- a/testsuites/libtests/complex/docomplex.c
+++ b/testsuites/libtests/complex/docomplex.c
@@ -11,106 +11,14 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+ #include "config.h"
#endif
-#include <complex.h>
-#include <stdio.h>
-
-extern void docomplex (void);
-
-void
-docomplex (void)
-{
-#ifndef NO_DOUBLE
- complex double ca, cb, cc;
- double f1;
-
- ca = 1.0 + 1.0 * I;
- cb = 1.0 - 1.0 * I;
-
- f1 = cabs (ca);
- fprintf (stdout, "cabs : %f\n", f1);
-
- cc = cacos (ca);
- fprintf (stdout, "cacos : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = cacosh (ca);
- fprintf (stdout, "cacosh : %f %fi\n", creal (cc),
- cimag (cc));
-
- f1 = carg (ca);
- fprintf (stdout, "carg : %f\n", f1);
-
- cc = casin (ca);
- fprintf (stdout, "casin : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = casinh (ca);
- fprintf (stdout, "casinh : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = catan (ca);
- fprintf (stdout, "catan : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = catanh (ca);
- fprintf (stdout, "catanh : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = ccos (ca);
- fprintf (stdout, "ccos : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = ccosh (ca);
- fprintf (stdout, "ccosh : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = cexp (ca);
- fprintf (stdout, "cexp : %f %fi\n", creal (cc),
- cimag (cc));
-
- f1 = cimag (ca);
- fprintf (stdout, "cimag : %f\n", f1);
-
- cc = clog (ca);
- fprintf (stdout, "clog : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = conj (ca);
- fprintf (stdout, "conj : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = cpow (ca, cb);
- fprintf (stdout, "cpow : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = cproj (ca);
- fprintf (stdout, "cproj : %f %fi\n", creal (cc),
- cimag (cc));
-
- f1 = creal (ca);
- fprintf (stdout, "creal : %f\n", f1);
-
- cc = csin (ca);
- fprintf (stdout, "csin : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = csinh (ca);
- fprintf (stdout, "csinh : %f %fi\n", creal (cc),
- cimag (cc));
-
- cc = csqrt (ca);
- fprintf (stdout, "csqrt : %f %fi\n", creal (cc),
- cimag (cc));
+#ifdef NO_DOUBLE
+ #define PROVIDE_EMPTY_FUNC
+#endif
- cc = ctan (ca);
- fprintf (stdout, "ctan : %f %fi\n", creal (cc),
- cimag (cc));
+#define FTYPE double
+#define PRI "%f"
- cc = ctanh (ca);
- fprintf (stdout, "ctanh : %f %fi\n", creal (cc),
- cimag (cc));
-#endif
-}
+#include "docomplex.h"
diff --git a/testsuites/libtests/complex/docomplex.h b/testsuites/libtests/complex/docomplex.h
new file mode 100644
index 0000000..96ce9eb
--- /dev/null
+++ b/testsuites/libtests/complex/docomplex.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2010, 2011 by
+ * Ralf Corsepius, Ulm/Germany. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <complex.h>
+#include <stdio.h>
+
+#define CONCAT(x, y) x ## y
+#define XCONCAT(x, y) CONCAT(x, y)
+
+#define STRINGIFY(x, y) # x # y
+#define XSTRINGIFY(x, y) STRINGIFY(x, y)
+
+#ifdef SUFFIX
+ #define FUNC(name) XCONCAT(name, SUFFIX)
+ #define STR(name) XSTRINGIFY(name, SUFFIX)
+#else
+ #define FUNC(name) XCONCAT(name, )
+ #define STR(name) XSTRINGIFY(name, ) " "
+#endif
+
+extern void FUNC(docomplex) (void);
+
+void
+FUNC(docomplex) (void)
+{
+#ifndef PROVIDE_EMPTY_FUNC
+ complex FTYPE ca, cb, cc;
+ FTYPE f1;
+
+ ca = 1.0 + 1.0 * I;
+ cb = 1.0 - 1.0 * I;
+
+ f1 = FUNC(cabs) (ca);
+ fprintf (stdout, STR(cabs) " : " PRI "\n", f1);
+
+ cc = FUNC(cacos) (ca);
+ fprintf (stdout, STR(cacos) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(cacosh) (ca);
+ fprintf (stdout, STR(cacosh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ f1 = FUNC(carg) (ca);
+ fprintf (stdout, STR(carg) " : " PRI "\n", f1);
+
+ cc = FUNC(casin) (ca);
+ fprintf (stdout, STR(casin) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(casinh) (ca);
+ fprintf (stdout, STR(casinh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(catan) (ca);
+ fprintf (stdout, STR(catan) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(catanh) (ca);
+ fprintf (stdout, STR(catanh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(ccos) (ca);
+ fprintf (stdout, STR(ccos) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(ccosh) (ca);
+ fprintf (stdout, STR(ccosh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(cexp) (ca);
+ fprintf (stdout, STR(cexp) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ f1 = FUNC(cimag) (ca);
+ fprintf (stdout, STR(cimag) " : " PRI "\n", f1);
+
+ cc = FUNC(clog) (ca);
+ fprintf (stdout, STR(clog) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(conj) (ca);
+ fprintf (stdout, STR(conj) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(cpow) (ca, cb);
+ fprintf (stdout, STR(cpow) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(cproj) (ca);
+ fprintf (stdout, STR(cproj) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ f1 = FUNC(creal) (ca);
+ fprintf (stdout, STR(creal) " : " PRI "\n", f1);
+
+ cc = FUNC(csin) (ca);
+ fprintf (stdout, STR(csin) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(csinh) (ca);
+ fprintf (stdout, STR(csinh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(csqrt) (ca);
+ fprintf (stdout, STR(csqrt) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(ctan) (ca);
+ fprintf (stdout, STR(ctan) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+
+ cc = FUNC(ctanh) (ca);
+ fprintf (stdout, STR(ctanh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
+ FUNC(cimag) (cc));
+#endif
+}
diff --git a/testsuites/libtests/complex/docomplex.in b/testsuites/libtests/complex/docomplex.in
deleted file mode 100644
index e476f6d..0000000
--- a/testsuites/libtests/complex/docomplex.in
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2010, 2011 by
- * Ralf Corsepius, Ulm/Germany. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * is freely granted, provided that this notice is preserved.
- */
-
-/*
- * Try to compile and link against POSIX complex math routines.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <complex.h>
-#include <stdio.h>
-
-extern void docomplex at FSUFFIX@ (void);
-
-void
-docomplex at FSUFFIX@ (void)
-{
-#ifndef @FGUARD@
- complex @FTYPE@ ca, cb, cc;
- @FTYPE@ f1;
-
- ca = 1.0 + 1.0 * I;
- cb = 1.0 - 1.0 * I;
-
- f1 = cabs at FSUFFIX@ (ca);
- fprintf (stdout, "cabs at FSUFFIX@ : %f\n", f1);
-
- cc = cacos at FSUFFIX@ (ca);
- fprintf (stdout, "cacos at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = cacosh at FSUFFIX@ (ca);
- fprintf (stdout, "cacosh at FSUFFIX@: %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- f1 = carg at FSUFFIX@ (ca);
- fprintf (stdout, "carg at FSUFFIX@ : %f\n", f1);
-
- cc = casin at FSUFFIX@ (ca);
- fprintf (stdout, "casin at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = casinh at FSUFFIX@ (ca);
- fprintf (stdout, "casinh at FSUFFIX@: %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = catan at FSUFFIX@ (ca);
- fprintf (stdout, "catan at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = catanh at FSUFFIX@ (ca);
- fprintf (stdout, "catanh at FSUFFIX@: %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = ccos at FSUFFIX@ (ca);
- fprintf (stdout, "ccos at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = ccosh at FSUFFIX@ (ca);
- fprintf (stdout, "ccosh at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = cexp at FSUFFIX@ (ca);
- fprintf (stdout, "cexp at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- f1 = cimag at FSUFFIX@ (ca);
- fprintf (stdout, "cimag at FSUFFIX@ : %f\n", f1);
-
- cc = clog at FSUFFIX@ (ca);
- fprintf (stdout, "clog at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = conj at FSUFFIX@ (ca);
- fprintf (stdout, "conj at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = cpow at FSUFFIX@ (ca, cb);
- fprintf (stdout, "cpow at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = cproj at FSUFFIX@ (ca);
- fprintf (stdout, "cproj at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- f1 = creal at FSUFFIX@ (ca);
- fprintf (stdout, "creal at FSUFFIX@ : %f\n", f1);
-
- cc = csin at FSUFFIX@ (ca);
- fprintf (stdout, "csin at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = csinh at FSUFFIX@ (ca);
- fprintf (stdout, "csinh at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = csqrt at FSUFFIX@ (ca);
- fprintf (stdout, "csqrt at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = ctan at FSUFFIX@ (ca);
- fprintf (stdout, "ctan at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-
- cc = ctanh at FSUFFIX@ (ca);
- fprintf (stdout, "ctanh at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
- cimag at FSUFFIX@ (cc));
-#endif
-}
diff --git a/testsuites/libtests/complex/docomplexf.c b/testsuites/libtests/complex/docomplexf.c
index ff2e73d..b51f888 100644
--- a/testsuites/libtests/complex/docomplexf.c
+++ b/testsuites/libtests/complex/docomplexf.c
@@ -11,106 +11,15 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+ #include "config.h"
#endif
-#include <complex.h>
-#include <stdio.h>
-
-extern void docomplexf (void);
-
-void
-docomplexf (void)
-{
-#ifndef NO_FLOAT
- complex float ca, cb, cc;
- float f1;
-
- ca = 1.0 + 1.0 * I;
- cb = 1.0 - 1.0 * I;
-
- f1 = cabsf (ca);
- fprintf (stdout, "cabsf : %f\n", f1);
-
- cc = cacosf (ca);
- fprintf (stdout, "cacosf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = cacoshf (ca);
- fprintf (stdout, "cacoshf: %f %fi\n", crealf (cc),
- cimagf (cc));
-
- f1 = cargf (ca);
- fprintf (stdout, "cargf : %f\n", f1);
-
- cc = casinf (ca);
- fprintf (stdout, "casinf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = casinhf (ca);
- fprintf (stdout, "casinhf: %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = catanf (ca);
- fprintf (stdout, "catanf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = catanhf (ca);
- fprintf (stdout, "catanhf: %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = ccosf (ca);
- fprintf (stdout, "ccosf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = ccoshf (ca);
- fprintf (stdout, "ccoshf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = cexpf (ca);
- fprintf (stdout, "cexpf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- f1 = cimagf (ca);
- fprintf (stdout, "cimagf : %f\n", f1);
-
- cc = clogf (ca);
- fprintf (stdout, "clogf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = conjf (ca);
- fprintf (stdout, "conjf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = cpowf (ca, cb);
- fprintf (stdout, "cpowf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = cprojf (ca);
- fprintf (stdout, "cprojf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- f1 = crealf (ca);
- fprintf (stdout, "crealf : %f\n", f1);
-
- cc = csinf (ca);
- fprintf (stdout, "csinf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = csinhf (ca);
- fprintf (stdout, "csinhf : %f %fi\n", crealf (cc),
- cimagf (cc));
-
- cc = csqrtf (ca);
- fprintf (stdout, "csqrtf : %f %fi\n", crealf (cc),
- cimagf (cc));
+#ifdef NO_FLOAT
+ #define PROVIDE_EMPTY_FUNC
+#endif
- cc = ctanf (ca);
- fprintf (stdout, "ctanf : %f %fi\n", crealf (cc),
- cimagf (cc));
+#define SUFFIX f
+#define FTYPE float
+#define PRI "%f"
- cc = ctanhf (ca);
- fprintf (stdout, "ctanhf : %f %fi\n", crealf (cc),
- cimagf (cc));
-#endif
-}
+#include "docomplex.h"
diff --git a/testsuites/libtests/complex/docomplexl.c b/testsuites/libtests/complex/docomplexl.c
index f63d00a..87817c7 100644
--- a/testsuites/libtests/complex/docomplexl.c
+++ b/testsuites/libtests/complex/docomplexl.c
@@ -11,106 +11,15 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+ #include "config.h"
#endif
-#include <complex.h>
-#include <stdio.h>
-
-extern void docomplexl (void);
-
-void
-docomplexl (void)
-{
-#ifndef NO_LONG_DOUBLE
- complex long double ca, cb, cc;
- long double f1;
-
- ca = 1.0 + 1.0 * I;
- cb = 1.0 - 1.0 * I;
-
- f1 = cabsl (ca);
- fprintf (stdout, "cabsl : %Lf\n", f1);
-
- cc = cacosl (ca);
- fprintf (stdout, "cacosl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = cacoshl (ca);
- fprintf (stdout, "cacoshl: %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- f1 = cargl (ca);
- fprintf (stdout, "cargl : %Lf\n", f1);
-
- cc = casinl (ca);
- fprintf (stdout, "casinl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = casinhl (ca);
- fprintf (stdout, "casinhl: %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = catanl (ca);
- fprintf (stdout, "catanl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = catanhl (ca);
- fprintf (stdout, "catanhl: %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = ccosl (ca);
- fprintf (stdout, "ccosl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = ccoshl (ca);
- fprintf (stdout, "ccoshl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = cexpl (ca);
- fprintf (stdout, "cexpl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- f1 = cimagl (ca);
- fprintf (stdout, "cimagl : %Lf\n", f1);
-
- cc = clogl (ca);
- fprintf (stdout, "clogl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = conjl (ca);
- fprintf (stdout, "conjl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = cpowl (ca, cb);
- fprintf (stdout, "cpowl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = cprojl (ca);
- fprintf (stdout, "cprojl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- f1 = creall (ca);
- fprintf (stdout, "creall : %Lf\n", f1);
-
- cc = csinl (ca);
- fprintf (stdout, "csinl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = csinhl (ca);
- fprintf (stdout, "csinhl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-
- cc = csqrtl (ca);
- fprintf (stdout, "csqrtl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
+#ifdef NO_LONG_DOUBLE
+ #define PROVIDE_EMPTY_FUNC
+#endif
- cc = ctanl (ca);
- fprintf (stdout, "ctanl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
+#define SUFFIX l
+#define FTYPE long double
+#define PRI "%Lf"
- cc = ctanhl (ca);
- fprintf (stdout, "ctanhl : %Lf %Lfi\n", creall (cc),
- cimagl (cc));
-#endif
-}
+#include "docomplex.h"
diff --git a/testsuites/libtests/complex/init.c b/testsuites/libtests/complex/init.c
index 82554f4..2f3c800 100644
--- a/testsuites/libtests/complex/init.c
+++ b/testsuites/libtests/complex/init.c
@@ -31,9 +31,7 @@
extern void docomplex(void);
extern void docomplexf(void);
-#ifndef NO_LONG_DOUBLE
extern void docomplexl(void);
-#endif
#if __rtems__
/* NOTICE: the clock driver is explicitly disabled */
@@ -60,9 +58,7 @@ int main( void )
docomplex();
docomplexf();
-#ifndef NO_LONG_DOUBLE
docomplexl();
-#endif
fprintf( stdout, "*** END OF COMPLEX MATH TEST ***\n" );
exit( 0 );
}
More information about the vc
mailing list