From 03747ec11bb1a73543383ee66a1991c5cb6be869 Mon Sep 17 00:00:00 2001 From: Kirill Ponomarev Date: Wed, 18 Aug 2004 18:32:34 +0000 Subject: Fix build with gcc-3.4 PR: ports/70634 Submitted by: Ports Fury --- textproc/word2x/Makefile | 8 +--- textproc/word2x/files/patch-fifo.h | 82 +++++++++++++++++++++++++++++++++++++- 2 files changed, 82 insertions(+), 8 deletions(-) (limited to 'textproc/word2x') diff --git a/textproc/word2x/Makefile b/textproc/word2x/Makefile index c9055a74b581..31e80af34c8b 100644 --- a/textproc/word2x/Makefile +++ b/textproc/word2x/Makefile @@ -22,10 +22,4 @@ GNU_CONFIGURE= yes MAN1= word2x.1 PLIST_FILES= bin/rtest2 bin/word2x -.include - -.if ${OSVERSION} >= 502126 -BROKEN= "Does not compile with gcc 3.4.2" -.endif - -.include +.include diff --git a/textproc/word2x/files/patch-fifo.h b/textproc/word2x/files/patch-fifo.h index 87925cf21709..cc80ff4338c6 100644 --- a/textproc/word2x/files/patch-fifo.h +++ b/textproc/word2x/files/patch-fifo.h @@ -1,5 +1,5 @@ --- fifo.h.orig Fri Aug 6 09:09:02 1999 -+++ fifo.h Wed Mar 31 20:12:59 2004 ++++ fifo.h Wed Aug 18 22:28:00 2004 @@ -4,7 +4,8 @@ #ifndef __FIFO_H__ #define __FIFO_H__ @@ -10,3 +10,83 @@ #include #ifndef NULL #define NULL (void *) 0 +@@ -19,8 +20,8 @@ + const T *data; + struct queue *next; + } queue; +- struct queue *start; +- struct queue **end; ++ struct fifo::queue *start; ++ struct fifo::queue **end; + int length; + + public: +@@ -61,7 +62,7 @@ + template + void fifo::clear(void) + { +- struct queue *ptr, *next; ++ struct fifo::queue *ptr, *next; + + ptr=start; + while (ptr!=NULL) +@@ -79,7 +80,7 @@ + template + fifo::~fifo(void) + { +- struct queue *ptr, *next; ++ struct fifo::queue *ptr, *next; + + ptr=start; + while (ptr!=NULL) +@@ -94,12 +95,12 @@ + template + void fifo::enqueue(const T *d) + { +- struct queue *q; ++ struct fifo::queue *q; + + #ifdef DEBUG_FIFO + cerr<<"Queue "<<(void *) d<<"\n"; + #endif +- q=new(struct queue); ++ q=new(struct fifo::queue); + q->next=NULL; + q->data=d; + *end=q; +@@ -110,7 +111,7 @@ + template + void fifo::insert(const T *d) + { +- struct queue *q; ++ struct fifo::queue *q; + #ifdef CONSIST_CHECK + if (end==NULL) + { +@@ -119,7 +120,7 @@ + } + #endif + +- q=new(struct queue); ++ q=new(struct fifo::queue); + q->next=start; + q->data=d; + start=q; +@@ -132,7 +133,7 @@ + const T *fifo::dequeue(void) + { + const T *d; +- struct queue *q; ++ struct fifo::queue *q; + #ifdef CONSIST_CHECK + if (end==NULL) + { +@@ -206,7 +207,7 @@ + template + void fifo::rev(void) + { +- struct queue *p, *n, *hdr, **ep; ++ struct fifo::queue *p, *n, *hdr, **ep; + #ifdef CONSIST_CHECK + if (end==NULL || d->end==NULL) + { -- cgit v1.2.3