b52eaddf49
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. Correctly terminate default string values on NUL. Bump PKGREVISION. Submitted upstream as: http://sourceforge.net/tracker/index.php?func=detail&aid=1817213&group_id=10524&atid=360524
34 lines
914 B
Text
34 lines
914 B
Text
$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 @@
|
|
-#define _XOPEN_SOURCE
|
|
-
|
|
#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;
|