diff options
Diffstat (limited to 'databases/palm-db-tools/patches/patch-ac')
-rw-r--r-- | databases/palm-db-tools/patches/patch-ac | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/databases/palm-db-tools/patches/patch-ac b/databases/palm-db-tools/patches/patch-ac index 123a881b286..5571300df90 100644 --- a/databases/palm-db-tools/patches/patch-ac +++ b/databases/palm-db-tools/patches/patch-ac @@ -1,7 +1,12 @@ -$NetBSD: patch-ac,v 1.1.1.1 2007/02/19 21:19:14 dsainty Exp $ +$NetBSD: patch-ac,v 1.2 2007/10/21 03:53:45 dsainty Exp $ Defining _XOPEN_SOURCE breaks the build under NetBSD. +The default C++ precision of 6 digits is Very risky in a database context. + +As with DATE fields, if a TIME field is unset (hour value 24+), output an +empty string. + --- libsupport/csvfile.cpp.orig 2003-06-20 11:37:47.000000000 +1200 +++ libsupport/csvfile.cpp 2007-02-19 21:19:46.000000000 +1300 @@ -1,5 +1,3 @@ @@ -10,3 +15,20 @@ Defining _XOPEN_SOURCE breaks the build under NetBSD. #include <iostream> #include <fstream> #include <sstream> +@@ -299,6 +297,7 @@ + break; + + case PalmLib::FlatFile::Field::FLOAT: ++ fldstr.precision(12); + fldstr << field.v_float; + break; + +@@ -329,7 +328,7 @@ + break; + + case PalmLib::FlatFile::Field::TIME: +- { ++ if (field.v_time.hour <= 23) { + char buf[1024]; + struct tm tm; + const struct tm * tm_ptr; |