blob: 5571300df90eb373bca7416d1bc058669a4113fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$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;
|