Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 78405 Details for
Bug 120801
djvu-3.5.16 fails to build with gcc 4.1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
djvu-3.5.16-gcc41-hash.patch
djvu-3.5.16-gcc41-hash.patch (text/plain), 4.06 KB, created by
Kristiaan Lenaerts
on 2006-01-29 02:33:05 UTC
(
hide
)
Description:
djvu-3.5.16-gcc41-hash.patch
Filename:
MIME Type:
Creator:
Kristiaan Lenaerts
Created:
2006-01-29 02:33:05 UTC
Size:
4.06 KB
patch
obsolete
>--- 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]; >-} >- >- > //@} > //@} > //@}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 120801
:
78404
| 78405