-- Ron Lee <ron@debian.org> Sat, 27 Jan 2001 01:51:24 -0800
+wxwindows2.2 (2.2.8.4) unstable; urgency=low
+
+ * Put the (modified) size_t == ulong kludge back into sndwav.cpp
+ it's still needed until wxDataOutputStream is made 64 bit
+ friendly, which may not happen for 2.2 since it will probably
+ not be binary compatible.
+ * caps a memory leak in the jpeg handler.
+
+ -- Ron Lee <ron@debian.org> Sun, 25 Nov 2001 11:53:59 -0800
+
+wxwindows2.2 (2.2.8.3) unstable; urgency=low
+
+ * Backported size_t test from 2.3 tree, removes the need for
+ specific tests for various 64 bit platforms including now
+ S/390 (thanks to Gerhard Tonn for the report).
+ Closes: #120768
+
+ -- Ron Lee <ron@debian.org> Fri, 23 Nov 2001 20:53:49 -0800
+
wxwindows2.2 (2.2.8.2) unstable; urgency=low
* python-dev doesn't get me python? More bytes in Build-Dep then
#endif
#include "wx/stream.h"
+#include "wx/longlong.h"
#if wxUSE_STREAMS
bool IsOk() { return m_input->IsOk(); }
+ wxUint64 Read64();
wxUint32 Read32();
wxUint16 Read16();
wxUint8 Read8();
wxDataInputStream& operator>>(wxUint8& c);
wxDataInputStream& operator>>(wxUint16& i);
wxDataInputStream& operator>>(wxUint32& i);
+ wxDataInputStream& operator>>(wxUint64& i);
wxDataInputStream& operator>>(double& i);
wxDataInputStream& operator>>(float& f);
bool IsOk() { return m_output->IsOk(); }
+ void Write64(wxUint64 i);
void Write32(wxUint32 i);
void Write16(wxUint16 i);
void Write8(wxUint8 i);
wxDataOutputStream& operator<<(wxUint8 c);
wxDataOutputStream& operator<<(wxUint16 i);
wxDataOutputStream& operator<<(wxUint32 i);
+ wxDataOutputStream& operator<<(wxUint64 i);
wxDataOutputStream& operator<<(double f);
wxDataOutputStream& operator<<(float f);
#endif // compilers
#endif // HAVE_BOOL
-#if !defined(HAVE_BOOL) && !defined(bool)
+#if !defined(HAVE_BOOL) && !defined(bool) && !defined(VMS)
// NB: of course, this doesn't replace the standard type, because, for
// example, overloading based on bool/int parameter doesn't work and
// so should be avoided in portable programs
-#ifndef VMS
typedef unsigned int bool;
-#endif
#endif // bool
typedef short int WXTYPE;
#define wxInt8 char signed
#define wxUint8 char unsigned
-#ifdef __WIN16__
+#if defined(__WIN16__) || (defined(SIZEOF_INT) && (SIZEOF_INT == 2))
#define wxInt16 int signed
#define wxUint16 int unsigned
#define wxInt32 long signed
#define wxUint32 long unsigned
-#endif
-
-#ifdef __WIN32__
-#define wxInt16 short signed
-#define wxUint16 short unsigned
-#define wxInt32 int signed
-#define wxUint32 int unsigned
-#endif
-
-#ifdef __WXMAC__
-#define wxInt16 short signed
-#define wxUint16 short unsigned
-#define wxInt32 int signed
-#define wxUint32 int unsigned
-#endif
-
-#ifdef __WXOS2__
+#else
#define wxInt16 short signed
#define wxUint16 short unsigned
#define wxInt32 int signed
#define wxUint32 int unsigned
#endif
-#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXOS2__)
- #if defined(SIZEOF_INT)
- /* well, this shouldn't happen... */
- #define wxInt16 short signed
- #define wxUint16 short unsigned
- #define wxInt32 int signed
- #define wxUint32 int unsigned
- #else
- #define wxInt16 short signed
- #define wxUint16 short unsigned
- #define wxInt32 int signed
- #define wxUint32 int unsigned
- #endif
+#if defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
+#define wxInt64 long signed
+#define wxUint64 long unsigned
+#elif defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == 8)
+#define wxInt64 long long signed
+#define wxUint64 long long unsigned
+#else // FIXME: what else can we do here aside from implementing wxULongLong
+#define wxInt64 wxLongLong
+#define wxUint64 wxLongLong
#endif
#define wxByte wxUint8
#endif
// machine specific byte swapping
+#define wxUINT64_SWAP_ALWAYS(val) \
+ ((wxUint64) ( \
+ ((wxLongLong(val) & wxLongLong(0L, 0x000000ffU)) << 56) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0x0000ff00U)) << 40) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0x00ff0000U)) << 24) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0xff000000U)) << 8) | \
+ ((wxLongLong(val) & wxLongLong(0x000000ffL, 0U)) >> 8) | \
+ ((wxLongLong(val) & wxLongLong(0x0000ff00L, 0U)) >> 24) | \
+ ((wxLongLong(val) & wxLongLong(0x00ff0000L, 0U)) >> 40) | \
+ ((wxLongLong(val) & wxLongLong(0xff000000L, 0U)) >> 56)).GetValue())
+
+#define wxINT64_SWAP_ALWAYS(val) \
+ ((wxInt64) ( \
+ ((wxLongLong(val) & wxLongLong(0L, 0x000000ffU)) << 56) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0x0000ff00U)) << 40) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0x00ff0000U)) << 24) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0xff000000U)) << 8) | \
+ ((wxLongLong(val) & wxLongLong(0x000000ffL, 0U)) >> 8) | \
+ ((wxLongLong(val) & wxLongLong(0x0000ff00L, 0U)) >> 24) | \
+ ((wxLongLong(val) & wxLongLong(0x00ff0000L, 0U)) >> 40) | \
+ ((wxLongLong(val) & wxLongLong(0xff000000L, 0U)) >> 56)).GetValue())
+
+
#ifdef WORDS_BIGENDIAN
#define wxUINT16_SWAP_ON_BE(val) wxUINT16_SWAP_ALWAYS(val)
#define wxINT16_SWAP_ON_BE(val) wxINT16_SWAP_ALWAYS(val)
#define wxINT32_SWAP_ON_BE(val) wxINT32_SWAP_ALWAYS(val)
#define wxUINT32_SWAP_ON_LE(val) (val)
#define wxINT32_SWAP_ON_LE(val) (val)
+ #define wxUINT64_SWAP_ON_BE(val) wxUINT64_SWAP_ALWAYS(val)
+ #define wxUINT64_SWAP_ON_LE(val) (val)
#else
#define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val)
#define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val)
#define wxINT32_SWAP_ON_LE(val) wxINT32_SWAP_ALWAYS(val)
#define wxUINT32_SWAP_ON_BE(val) (val)
#define wxINT32_SWAP_ON_BE(val) (val)
+ #define wxUINT64_SWAP_ON_LE(val) wxUINT64_SWAP_ALWAYS(val)
+ #define wxUINT64_SWAP_ON_BE(val) (val)
#endif
// ----------------------------------------------------------------------------