summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2000-02-04 18:31:22 +0000
committerwtc%netscape.com <devnull@localhost>2000-02-04 18:31:22 +0000
commitbdc0cdce615110a7a22e7989a291bfd54f30771f (patch)
tree9e45edbd66d462321d648b513048f92586598e68
parenta6a2b360588998d0c13d260a23f464e68af5c537 (diff)
downloadnspr-hg-bdc0cdce615110a7a22e7989a291bfd54f30771f.tar.gz
Bugsplat bug #361776: handle the different type of the 'len' argument
to streambuf::setbuf in 64-bit AIX. Modified files: prstrms.h, prstrms.cpp (NSPRPUB_RELEASE_4_0_BRANCH)
-rw-r--r--lib/prstreams/prstrms.cpp2
-rw-r--r--lib/prstreams/prstrms.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/prstreams/prstrms.cpp b/lib/prstreams/prstrms.cpp
index 09ecc26c..0fb34f79 100644
--- a/lib/prstreams/prstrms.cpp
+++ b/lib/prstreams/prstrms.cpp
@@ -222,7 +222,7 @@ PRfilebuf::underflow()
}
streambuf*
-PRfilebuf::setbuf(char *buffptr, int bufflen)
+PRfilebuf::setbuf(char *buffptr, PRstreambuflen bufflen)
{
if (is_open() && (ebuf()))
return 0;
diff --git a/lib/prstreams/prstrms.h b/lib/prstreams/prstrms.h
index 2af53953..43ce7fed 100644
--- a/lib/prstreams/prstrms.h
+++ b/lib/prstreams/prstrms.h
@@ -31,6 +31,12 @@
#endif
#include <iostream.h>
+#if defined(AIX) && defined(__64BIT__)
+typedef long PRstreambuflen;
+#else
+typedef int PRstreambuflen;
+#endif
+
#if defined (PRFSTREAMS_BROKEN)
// fix it sometime
@@ -51,7 +57,7 @@ public:
~PRfilebuf();
virtual int overflow(int=EOF);
virtual int underflow();
- virtual streambuf *setbuf(char *buff, int bufflen);
+ virtual streambuf *setbuf(char *buff, PRstreambuflen bufflen);
virtual streampos seekoff(streamoff, ios::seek_dir, int);
virtual int sync();
PRfilebuf *open(const char *name, int mode, int flags);