aboutsummaryrefslogtreecommitdiff
path: root/archivers/libcabinet
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-10-01 11:41:38 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-10-01 11:41:38 +0000
commit383b0be16e67874f358ead36fff0bdc7c4f682c7 (patch)
tree1e478aa0b618fcebd199b8591bd2ec3290fb7506 /archivers/libcabinet
parenteb814b5d2ecb8ad00852775b239ec31ecfb91a44 (diff)
downloadports-383b0be16e67874f358ead36fff0bdc7c4f682c7.tar.gz
ports-383b0be16e67874f358ead36fff0bdc7c4f682c7.zip
Notes
Diffstat (limited to 'archivers/libcabinet')
-rw-r--r--archivers/libcabinet/files/patch-cftypes.cpp47
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;