]> git.pld-linux.org Git - packages/fftw3.git/commitdiff
- fix possible define vs _FORTIFY_SOURCE conflicts
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 1 Dec 2008 18:40:27 +0000 (18:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fftw3-chk.patch -> 1.1

fftw3-chk.patch [new file with mode: 0644]

diff --git a/fftw3-chk.patch b/fftw3-chk.patch
new file mode 100644 (file)
index 0000000..d2fbf89
--- /dev/null
@@ -0,0 +1,36 @@
+--- fftw-3.2/libbench2/report.c.orig   2006-12-08 19:40:41.000000000 +0100
++++ fftw-3.2/libbench2/report.c        2008-12-01 18:21:51.300291979 +0100
+@@ -93,20 +93,24 @@
+ static void sprintf_time(double x, char *buf, int buflen)
+ {
+ #ifdef HAVE_SNPRINTF
+-#  define BENCH_BUFARG buf, buflen
++     if (x < 1.0E-6)
++        snprintf(buf, buflen, "%.2f ns", x * 1.0E9);
++     else if (x < 1.0E-3)
++        snprintf(buf, buflen, "%.2f us", x * 1.0E6);
++     else if (x < 1.0)
++        snprintf(buf, buflen, "%.2f ms", x * 1.0E3);
++     else
++        snprintf(buf, buflen, "%.2f s", x);
+ #else
+-#  define snprintf sprintf
+-#  define BENCH_BUFARG buf
+-#endif
+      if (x < 1.0E-6)
+-        snprintf(BENCH_BUFARG, "%.2f ns", x * 1.0E9);
++        sprintf(buf, "%.2f ns", x * 1.0E9);
+      else if (x < 1.0E-3)
+-        snprintf(BENCH_BUFARG, "%.2f us", x * 1.0E6);
++        sprintf(buf, "%.2f us", x * 1.0E6);
+      else if (x < 1.0)
+-        snprintf(BENCH_BUFARG, "%.2f ms", x * 1.0E3);
++        sprintf(buf, "%.2f ms", x * 1.0E3);
+      else
+-        snprintf(BENCH_BUFARG, "%.2f s", x);
+-#undef BENCH_BUFARG
++        sprintf(buf, "%.2f s", x);
++#endif
+ }
+ void report_verbose(const bench_problem *p, double *t, int st)
This page took 0.070445 seconds and 4 git commands to generate.