summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authordsainty <dsainty@pkgsrc.org>2007-10-21 03:53:45 +0000
committerdsainty <dsainty@pkgsrc.org>2007-10-21 03:53:45 +0000
commitb52eaddf49c0222bb83ab5be6da0e49c85259ce1 (patch)
tree52dcddca04fe558fbfe41a5007ce4a557bddfc5e /databases
parent51da164fe64f4a8beb034d240af6decefabc39ed (diff)
downloadpkgsrc-b52eaddf49c0222bb83ab5be6da0e49c85259ce1.tar.gz
Patch a few bugs:
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
Diffstat (limited to 'databases')
-rw-r--r--databases/palm-db-tools/Makefile3
-rw-r--r--databases/palm-db-tools/distinfo5
-rw-r--r--databases/palm-db-tools/patches/patch-ac24
-rw-r--r--databases/palm-db-tools/patches/patch-ae16
4 files changed, 44 insertions, 4 deletions
diff --git a/databases/palm-db-tools/Makefile b/databases/palm-db-tools/Makefile
index e08bc38ba25..5d6d8d6e504 100644
--- a/databases/palm-db-tools/Makefile
+++ b/databases/palm-db-tools/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2007/02/19 21:57:51 dsainty Exp $
+# $NetBSD: Makefile,v 1.3 2007/10/21 03:53:45 dsainty Exp $
#
DISTNAME= ${PKGNAME_NOREV:S/./_/g}
PKGNAME= palm-db-tools-0.3.6
+PKGREVISION= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=palm-db-tools/}
diff --git a/databases/palm-db-tools/distinfo b/databases/palm-db-tools/distinfo
index cece04f7287..adc8cdf7be4 100644
--- a/databases/palm-db-tools/distinfo
+++ b/databases/palm-db-tools/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/02/19 21:19:14 dsainty Exp $
+$NetBSD: distinfo,v 1.2 2007/10/21 03:53:45 dsainty Exp $
SHA1 (palm-db-tools-0_3_6.tar.gz) = b8ef6ed7059f5f71571622af6ece86b61cfacee6
RMD160 (palm-db-tools-0_3_6.tar.gz) = 26a5ce1ab9d558a4b42f3278be809b31eefb19b4
Size (palm-db-tools-0_3_6.tar.gz) = 201644 bytes
SHA1 (patch-aa) = 63810ff29c59b3abb48f43b55ca92968711ec943
SHA1 (patch-ab) = cc36b595666e8843728485a804f74322adb38b07
-SHA1 (patch-ac) = 48608e84abfaa34c813b002a0213183365d5d9ad
+SHA1 (patch-ac) = 27389d2f7dff02407d60a9f3a1a8d34b188df797
SHA1 (patch-ad) = 0c8d624367a135fb5b0cf7ab5514f52f8cf3ac16
+SHA1 (patch-ae) = 17a8f9b67cbc89177b05ac1ee63c77c22fa6704f
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;
diff --git a/databases/palm-db-tools/patches/patch-ae b/databases/palm-db-tools/patches/patch-ae
new file mode 100644
index 00000000000..64bf8768166
--- /dev/null
+++ b/databases/palm-db-tools/patches/patch-ae
@@ -0,0 +1,16 @@
+$NetBSD: patch-ae,v 1.1 2007/10/21 03:53:45 dsainty Exp $
+
+Correctly terminate default string values on NUL.
+
+--- libflatfile/DB.cpp.orig 2003-06-20 11:37:46.000000000 +1200
++++ libflatfile/DB.cpp 2007-10-12 17:57:05.000000000 +1300
+@@ -275,7 +276,8 @@
+ switch (type) {
+
+ case PalmLib::FlatFile::Field::STRING:
+- theReturn << std::string((const char *)chunk.data()+2, chunk.size() - 2);
++ // c_str: The default value is (or at least may be) NUL terminated.
++ theReturn << std::string((const char *)chunk.data()+2, chunk.size() - 2).c_str();
+ break;
+
+ case PalmLib::FlatFile::Field::BOOLEAN: