pkgsrc/comms/plp/patches/patch-aj
wiz cbbd0ce5d3 Fix build with gcc-4.5.
Mark as not MAKE_JOBS_SAFE (doesn't wait for library to be built before
linking it).
2011-12-19 13:44:07 +00:00

58 lines
1.3 KiB
Text

$NetBSD: patch-aj,v 1.2 2011/12/19 13:44:07 wiz Exp $
--- ncp/link.cc.orig 1999-04-12 21:49:12.000000000 +0000
+++ ncp/link.cc
@@ -19,9 +19,10 @@
//
// e-mail philip.proudman@btinternet.com
-#include <stream.h>
#include <stdlib.h>
#include <stdio.h>
+#include <iostream>
+using namespace std;
#include "bool.h"
#include "../defaults.h"
@@ -30,7 +31,7 @@
#include "bufferstore.h"
#include "bufferarray.h"
-link::link(const char *fname, int baud, IOWatch &iow, bool _s5, bool _verbose) :
+Link::Link(const char *fname, int baud, IOWatch &iow, bool _s5, bool _verbose) :
s5(_s5)
{
p = new packet(fname, baud, iow, PACKET_LAYER_DIAGNOSTICS);
@@ -43,16 +44,16 @@ link::link(const char *fname, int baud,
failed = false;
}
-link::~link() {
+Link::~Link() {
delete p;
}
-void link::send(const bufferStore &buff) {
+void Link::send(const bufferStore &buff) {
if (buff.getLen() > 300) abort();
sendQueue.pushBuffer(buff);
}
-bufferArray link::poll() {
+bufferArray Link::poll() {
bufferArray ret;
bufferStore buff;
unsigned char type;
@@ -145,10 +146,10 @@ bufferArray link::poll() {
return ret;
}
-bool link::stuffToSend() {
+bool Link::stuffToSend() {
return (somethingToSend || !sendQueue.empty());
}
-bool link::hasFailed() {
+bool Link::hasFailed() {
return failed;
}