SOURCES: fftw3-chk.patch (NEW) - fix possible define vs _FORTIFY_SOURCE con...
qboosh
qboosh at pld-linux.org
Mon Dec 1 19:40:33 CET 2008
Author: qboosh Date: Mon Dec 1 18:40:33 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fix possible define vs _FORTIFY_SOURCE conflicts
---- Files affected:
SOURCES:
fftw3-chk.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/fftw3-chk.patch
diff -u /dev/null SOURCES/fftw3-chk.patch:1.1
--- /dev/null Mon Dec 1 19:40:33 2008
+++ SOURCES/fftw3-chk.patch Mon Dec 1 19:40:27 2008
@@ -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)
================================================================
More information about the pld-cvs-commit
mailing list