summaryrefslogtreecommitdiff
path: root/comms/plp/patches/patch-ag
blob: 502244ba21f4767862833423711a418d1502a0c8 (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
35
36
37
$NetBSD: patch-ag,v 1.3 2011/12/19 13:44:07 wiz Exp $

--- rfsv/rfsv16.cc.orig	1999-11-02 22:01:01.000000000 +0000
+++ rfsv/rfsv16.cc
@@ -19,10 +19,11 @@
 //
 //  e-mail philip.proudman@btinternet.com
 
-#include <stream.h>
+#include <iostream>
+using namespace std;
 #include <stdlib.h>
-#include <fstream.h>
-#include <iomanip.h>
+#include <fstream>
+#include <iomanip>
 #include <time.h>
 #include <string.h>
 
@@ -113,7 +114,7 @@ int rfsv16::dir(const char* dirName, buf
       if (version != 2) return 1;
       int status = a.getWord(2);
       long size = a.getDWord(4);
-      long date = a.getDWord(8);
+      time_t date = a.getDWord(8);
       const char *s = a.getString(16);
       a.discardFirstBytes(17+strlen(s));
 
@@ -238,7 +239,7 @@ int rfsv16::write(const char* localName,
   }
   unsigned char * buff = new unsigned char [RFSV_SENDLEN];
   while (ip &&!ip.eof()) {
-    ip.read(buff, RFSV_SENDLEN);
+    ip.read((char *)buff, RFSV_SENDLEN);
     bufferStore tmp(buff, ip.gcount());
     if (tmp.getLen() == 0) break;
     bufferStore a;