From 1c7669671c46e463251589fad07aa470b27f80e8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 10 Feb 2005 00:01:40 +0000 Subject: Changes to support building with gcc 2.95. --- util.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 8ab841de..0ed3e81f 100644 --- a/util.h +++ b/util.h @@ -1,6 +1,24 @@ #ifndef _UTIL_H #define _UTIL_H +#if defined(__GNUG__) && __GNUG__ < 3 +namespace std { + inline ostream & right (ostream & i) { + i.setf(i.right, i.adjustfield); + return i; + } + inline ostream & left (ostream & i) { + i.setf(i.left, i.adjustfield); + return i; + } +} +typedef unsigned long istream_pos_type; +typedef unsigned long ostream_pos_type; +#else +typedef std::istream::pos_type istream_pos_type; +typedef std::ostream::pos_type ostream_pos_type; +#endif // g++ version 2 + inline char * skip_ws(char * ptr) { while (*ptr == ' ' || *ptr == '\t' || *ptr == '\n') ptr++; -- cgit v1.2.3