diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-10-01 19:41:38 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-10-01 19:41:38 +0800 |
commit | 409397d8c7d8b97770f10a0563cc7e35ede27397 (patch) | |
tree | cbc17fcaa48016d5ca391e0fa858f8666bc8be80 /archivers/libcabinet | |
parent | 3336445de6e971208cf1dc3d4c6552e8820ba25b (diff) | |
download | freebsd-ports-gnome-409397d8c7d8b97770f10a0563cc7e35ede27397.tar.gz freebsd-ports-gnome-409397d8c7d8b97770f10a0563cc7e35ede27397.tar.zst freebsd-ports-gnome-409397d8c7d8b97770f10a0563cc7e35ede27397.zip |
Fix breakage caused by values.h deorbiting.
Submitted by: bento
Diffstat (limited to 'archivers/libcabinet')
-rw-r--r-- | archivers/libcabinet/files/patch-cftypes.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/archivers/libcabinet/files/patch-cftypes.cpp b/archivers/libcabinet/files/patch-cftypes.cpp new file mode 100644 index 000000000000..b492d5acfae1 --- /dev/null +++ b/archivers/libcabinet/files/patch-cftypes.cpp @@ -0,0 +1,47 @@ + +$FreeBSD$ + +--- cftypes.cpp 2002/10/01 11:38:22 1.1 ++++ cftypes.cpp 2002/10/01 11:39:37 +@@ -10,7 +10,7 @@ + #ifndef __CFTYPES_CPP__ + #define __CFTYPES_CPP__ + +-#include <values.h> ++#include <limits.h> + #include <fstream.h> + #include "zlib.h" + #include "cftypes.h" +@@ -138,12 +138,12 @@ + + int io_read(istream& in, byte* buf, word len) + { +- while(len > MAXINT) ++ while(len > INT_MAX) + { +- if(in.read(buf, MAXINT).bad()) ++ if(in.read(buf, INT_MAX).bad()) + return (in.fail()) ? READ_ERROR : UNEXPECTED_EOF; +- len -= (word) MAXINT; +- buf += (word) MAXINT; ++ len -= (word) INT_MAX; ++ buf += (word) INT_MAX; + } + + return (in.read(buf, (int) len).bad()) +@@ -154,11 +154,11 @@ + + int io_write(ostream& out, const byte* buf, word len) + { +- while(len > MAXINT) ++ while(len > INT_MAX) + { +- if(out.write(buf, MAXINT).fail()) return WRITE_ERROR; +- len -= (word) MAXINT; +- buf += (word) MAXINT; ++ if(out.write(buf, INT_MAX).fail()) return WRITE_ERROR; ++ len -= (word) INT_MAX; ++ buf += (word) INT_MAX; + } + + return (out.write(buf, (int) len).fail()) ? WRITE_ERROR : OK; |