diff options
author | John Wiegley <johnw@newartisans.com> | 2005-02-10 00:01:40 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:40:57 -0400 |
commit | 1c7669671c46e463251589fad07aa470b27f80e8 (patch) | |
tree | 0a76ad83f7bbf5b24b5d2c971a2dea37b58ffae4 /util.h | |
parent | a874bc851eec27da958b643e7c0eb4c62f2cd109 (diff) | |
download | fork-ledger-1c7669671c46e463251589fad07aa470b27f80e8.tar.gz fork-ledger-1c7669671c46e463251589fad07aa470b27f80e8.tar.bz2 fork-ledger-1c7669671c46e463251589fad07aa470b27f80e8.zip |
Changes to support building with gcc 2.95.
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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++; |