--- flow-tools-0.67/src/flow-export.c	2003-12-04 06:55:31.000000000 +0100
+++ flow-tools-0.67-q1/src/flow-export.c	2004-09-23 15:07:41.442757096 +0200
@@ -57,6 +57,7 @@
 #define DB_DEFAULT_DBTABLE "raw"
 #define DB_DEFAULT_DBUSER "netflow"
 #define DB_DEFAULT_DBPWD "netflow"
+#define DB_QUOTE putchar(34)
 
 #endif /* MYSQL */
 
@@ -70,6 +71,7 @@
 #define DB_DEFAULT_DBTABLE "raw"
 #define DB_DEFAULT_DBUSER "netflow"
 #define DB_DEFAULT_DBPWD "netflow"
+#define DB_QUOTE putchar(39)
 
 #endif /* PGSQL*/
 
@@ -1199,10 +1201,10 @@
 
   if (xfields & FT_XFIELD_EXADDR) {
     if (comma) fmt_buf[len++] = ',';
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->exaddr)),
       FMT_JUST_LEFT);
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     comma = 1;
   }
 
@@ -1257,28 +1259,28 @@
 
   if (xfields & FT_XFIELD_SRCADDR) {
     if (comma) fmt_buf[len++] = ',';
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->srcaddr)),
       FMT_JUST_LEFT);
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     comma = 1;
   }
 
   if (xfields & FT_XFIELD_DSTADDR) {
     if (comma) fmt_buf[len++] = ',';
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->dstaddr)),
       FMT_JUST_LEFT);
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     comma = 1;
   }
 
   if (xfields & FT_XFIELD_NEXTHOP) {
     if (comma) fmt_buf[len++] = ',';
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->nexthop)),
       FMT_JUST_LEFT);
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     comma = 1;
   }
 
@@ -1375,19 +1377,19 @@
 
   if (xfields & FT_XFIELD_PEER_NEXTHOP) {
     if (comma) fmt_buf[len++] = ',';
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->peer_nexthop)),
       FMT_JUST_LEFT);
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     comma = 1;
   }
 
   if (xfields & FT_XFIELD_ROUTER_SC) {
     if (comma) fmt_buf[len++] = ',';
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     len += fmt_ipv4(fmt_buf+len, *((u_int32*)(rec+fo->router_sc)),
       FMT_JUST_LEFT);
-    if (quote) fmt_buf[len++] = '"';
+    if (quote) fmt_buf[len++] = DB_QUOTE;
     comma = 1;
   }
 
