diff options
author | 2006-01-31 13:11:37 +0000 | |
---|---|---|
committer | 2006-01-31 13:11:37 +0000 | |
commit | a72d9f50829c017391b5bbdb6e733ab11de3d64c (patch) | |
tree | 45a12c54dec1ad929dc2aa486446537762eb0619 /app-text/djvu/files | |
parent | Unstable on hppa. (diff) | |
download | historical-a72d9f50829c017391b5bbdb6e733ab11de3d64c.tar.gz historical-a72d9f50829c017391b5bbdb6e733ab11de3d64c.tar.bz2 historical-a72d9f50829c017391b5bbdb6e733ab11de3d64c.zip |
Fixed gcc-4 compilation problem, see bug #120801.
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-text/djvu/files')
-rw-r--r-- | app-text/djvu/files/digest-djvu-3.5.16 | 2 | ||||
-rw-r--r-- | app-text/djvu/files/djvu-3.5.16-gcc41-hash.patch | 180 | ||||
-rw-r--r-- | app-text/djvu/files/djvu-3.5.16-gcc41.patch | 26 |
3 files changed, 208 insertions, 0 deletions
diff --git a/app-text/djvu/files/digest-djvu-3.5.16 b/app-text/djvu/files/digest-djvu-3.5.16 index 405a43141371..1ccbfc349293 100644 --- a/app-text/djvu/files/digest-djvu-3.5.16 +++ b/app-text/djvu/files/digest-djvu-3.5.16 @@ -1 +1,3 @@ MD5 5591c99a50aed1613a796a5aa4978fc0 djvulibre-3.5.16.tar.gz 1803961 +RMD160 7b4aaf69665d7ee33ec5476be88b3d9e075a26f0 djvulibre-3.5.16.tar.gz 1803961 +SHA256 3d90cdb7ad4c0481ec90796f12cfaf5240c4d73ba59e158d8ee333fec0837b58 djvulibre-3.5.16.tar.gz 1803961 diff --git a/app-text/djvu/files/djvu-3.5.16-gcc41-hash.patch b/app-text/djvu/files/djvu-3.5.16-gcc41-hash.patch new file mode 100644 index 000000000000..f11a8bdfec38 --- /dev/null +++ b/app-text/djvu/files/djvu-3.5.16-gcc41-hash.patch @@ -0,0 +1,180 @@ +--- libdjvu/GContainer.h.old 2006-01-29 11:04:51.000000000 +0100 ++++ libdjvu/GContainer.h 2006-01-29 11:05:32.000000000 +0100 +@@ -134,6 +134,88 @@ + //@{ + + ++// ------------------------------------------------------------ ++// HASH FUNCTIONS ++// ------------------------------------------------------------ ++ ++ ++/** @name Hash functions ++ These functions let you use template class \Ref{GMap} with the ++ corresponding elementary types. The returned hash code may be reduced to ++ an arbitrary range by computing its remainder modulo the upper bound of ++ the range. ++ @memo Hash functions for elementary types. */ ++//@{ ++ ++/** Hashing function (unsigned int). */ ++static inline unsigned int ++hash(const unsigned int & x) ++{ ++ return x; ++} ++ ++/** Hashing function (int). */ ++static inline unsigned int ++hash(const int & x) ++{ ++ return (unsigned int)x; ++} ++ ++/** Hashing function (long). */ ++static inline unsigned int ++hash(const long & x) ++{ ++ return (unsigned int)x; ++} ++ ++/** Hashing function (unsigned long). */ ++static inline unsigned int ++hash(const unsigned long & x) ++{ ++ return (unsigned int)x; ++} ++ ++/** Hashing function (void *). */ ++static inline unsigned int ++hash(void * const & x) ++{ ++ return (unsigned long) x; ++} ++ ++/** Hashing function (const void *). */ ++static inline unsigned int ++hash(const void * const & x) ++{ ++ return (unsigned long) x; ++} ++ ++/** Hashing function (float). */ ++static inline unsigned int ++hash(const float & x) ++{ ++ // optimizer will get rid of unnecessary code ++ unsigned int *addr = (unsigned int*)&x; ++ if (sizeof(float)<2*sizeof(unsigned int)) ++ return addr[0]; ++ else ++ return addr[0]^addr[1]; ++} ++ ++/** Hashing function (double). */ ++static inline unsigned int ++hash(const double & x) ++{ ++ // optimizer will get rid of unnecessary code ++ unsigned int *addr = (unsigned int*)&x; ++ if (sizeof(double)<2*sizeof(unsigned int)) ++ return addr[0]; ++ else if (sizeof(double)<4*sizeof(unsigned int)) ++ return addr[0]^addr[1]; ++ else ++ return addr[0]^addr[1]^addr[2]^addr[3]; ++} ++ ++ + + // ------------------------------------------------------------ + // HELPER CLASSES +@@ -1266,88 +1348,6 @@ + }; + + +-// ------------------------------------------------------------ +-// HASH FUNCTIONS +-// ------------------------------------------------------------ +- +- +-/** @name Hash functions +- These functions let you use template class \Ref{GMap} with the +- corresponding elementary types. The returned hash code may be reduced to +- an arbitrary range by computing its remainder modulo the upper bound of +- the range. +- @memo Hash functions for elementary types. */ +-//@{ +- +-/** Hashing function (unsigned int). */ +-static inline unsigned int +-hash(const unsigned int & x) +-{ +- return x; +-} +- +-/** Hashing function (int). */ +-static inline unsigned int +-hash(const int & x) +-{ +- return (unsigned int)x; +-} +- +-/** Hashing function (long). */ +-static inline unsigned int +-hash(const long & x) +-{ +- return (unsigned int)x; +-} +- +-/** Hashing function (unsigned long). */ +-static inline unsigned int +-hash(const unsigned long & x) +-{ +- return (unsigned int)x; +-} +- +-/** Hashing function (void *). */ +-static inline unsigned int +-hash(void * const & x) +-{ +- return (unsigned long) x; +-} +- +-/** Hashing function (const void *). */ +-static inline unsigned int +-hash(const void * const & x) +-{ +- return (unsigned long) x; +-} +- +-/** Hashing function (float). */ +-static inline unsigned int +-hash(const float & x) +-{ +- // optimizer will get rid of unnecessary code +- unsigned int *addr = (unsigned int*)&x; +- if (sizeof(float)<2*sizeof(unsigned int)) +- return addr[0]; +- else +- return addr[0]^addr[1]; +-} +- +-/** Hashing function (double). */ +-static inline unsigned int +-hash(const double & x) +-{ +- // optimizer will get rid of unnecessary code +- unsigned int *addr = (unsigned int*)&x; +- if (sizeof(double)<2*sizeof(unsigned int)) +- return addr[0]; +- else if (sizeof(double)<4*sizeof(unsigned int)) +- return addr[0]^addr[1]; +- else +- return addr[0]^addr[1]^addr[2]^addr[3]; +-} +- +- + //@} + //@} + //@} diff --git a/app-text/djvu/files/djvu-3.5.16-gcc41.patch b/app-text/djvu/files/djvu-3.5.16-gcc41.patch new file mode 100644 index 000000000000..922acf2be5c3 --- /dev/null +++ b/app-text/djvu/files/djvu-3.5.16-gcc41.patch @@ -0,0 +1,26 @@ +--- libdjvu/GURL.h.old 2006-01-29 10:22:53.000000000 +0100 ++++ libdjvu/GURL.h 2006-01-29 10:24:04.000000000 +0100 +@@ -278,10 +278,10 @@ + //@} + + /// Returns TRUE if #gurl1# and #gurl2# are the same +- bool GURL::operator==(const GURL & gurl2) const; ++ bool operator==(const GURL & gurl2) const; + + /// Returns TRUE if #gurl1# and #gurl2# are different +- bool GURL::operator!=(const GURL & gurl2) const; ++ bool operator!=(const GURL & gurl2) const; + + /// Assignment operator + GURL & operator=(const GURL & url); +--- libdjvu/ByteStream.h.old 2006-01-29 10:24:38.000000000 +0100 ++++ libdjvu/ByteStream.h 2006-01-29 10:24:55.000000000 +0100 +@@ -242,7 +242,7 @@ + and writes it to the specified stream. */ + void formatmessage( const char *fmt, ... ); + /** Looks up the message and writes it to the specified stream. */ +- void ByteStream::writemessage( const char *message ); ++ void writemessage( const char *message ); + /** Writes a one-byte integer to a ByteStream. */ + void write8 (unsigned int card8); + /** Writes a two-bytes integer to a ByteStream. |