Fix build on 5.x/6.x and amd64.
This commit is contained in:
parent
5d7fef9499
commit
69db68734f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=126829
@ -1,6 +1,9 @@
|
||||
--- src/reader.cpp.orig Sat Jul 7 11:16:01 2001
|
||||
+++ src/reader.cpp Thu Oct 16 20:54:13 2003
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/reader.cpp.orig
|
||||
+++ src/reader.cpp
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include <new>
|
||||
@ -8,7 +11,33 @@
|
||||
|
||||
// for stat:
|
||||
#include <sys/types.h>
|
||||
@@ -227,7 +228,7 @@
|
||||
@@ -117,7 +118,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
-INLINE bool Reader::is_open() const
|
||||
+bool Reader::is_open() const
|
||||
{
|
||||
return _is_open;
|
||||
}
|
||||
@@ -195,14 +196,14 @@
|
||||
return _offset;
|
||||
}
|
||||
|
||||
-INLINE off_t Reader::tell() const
|
||||
+off_t Reader::tell() const
|
||||
{
|
||||
if(!is_open())
|
||||
return -1;
|
||||
return _offset;
|
||||
}
|
||||
|
||||
-INLINE off_t Reader::size() const
|
||||
+off_t Reader::size() const
|
||||
{
|
||||
return _size;
|
||||
}
|
||||
@@ -231,7 +232,7 @@
|
||||
// free the page which is the furthest away from the page we are loading
|
||||
|
||||
// this could be trouble if off_t is unsigned!
|
||||
|
@ -1,18 +1,34 @@
|
||||
--- src/reader.hpp.orig Fri Feb 13 13:28:32 2004
|
||||
+++ src/reader.hpp Sat Dec 18 01:46:26 2004
|
||||
@@ -34,9 +34,13 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/reader.hpp.orig
|
||||
+++ src/reader.hpp
|
||||
@@ -33,12 +33,6 @@
|
||||
|
||||
#include "local.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
-#ifdef DEBUG
|
||||
-#define INLINE
|
||||
+# define INLINE
|
||||
#else
|
||||
-#else
|
||||
-#define INLINE inline
|
||||
+# if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
|
||||
+# define INLINE __attribute__((always_inline))
|
||||
+# else
|
||||
+# define INLINE inline
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
-#endif
|
||||
-
|
||||
typedef vector<uchar> ReadBuffer;
|
||||
|
||||
#ifdef __GNUC__
|
||||
@@ -54,12 +48,12 @@
|
||||
bool open(const string& filename);
|
||||
bool close();
|
||||
bool eof();
|
||||
- INLINE bool is_open() const;
|
||||
+ bool is_open() const;
|
||||
|
||||
size_t read( ReadBuffer& v, size_t numBytes );
|
||||
off_t seek( off_t offset );
|
||||
- INLINE off_t tell() const; // returns the current offset or -1 if !open
|
||||
- INLINE off_t size() const;
|
||||
+ off_t tell() const; // returns the current offset or -1 if !open
|
||||
+ off_t size() const;
|
||||
const char* lastError() const;
|
||||
const char* filename() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user