TigerHash.cpp compile fails on ppc

Bug #268353 reported by Edward Sheldrake
2
Affects Status Importance Assigned to Milestone
DC++
Fix Released
Low
Unassigned

Bug Description

HASH_SIZE is undefined inside the #ifdef TIGER_BIG_ENDIAN code.

It needs replacing with BYTES.

Operating system is Fedora 9, DC++ version was the 0.707 source and it's still in 0.708.

This affects LinuxDC++ and also dclib/valknut since TigerHash.cpp is used there too.

Unfortunately I can't even get a simple answer for if ppc is even big endian (it depends on the OS?), there is a gentoo bug about this suggesting it isn't but then they also managed to incorrectly replace HASH_SIZE with BLOCK_SIZE.

Related branches

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

How can HASH_SIZE be undefined? It is a class enum in TigerHash.h and its declaration is not dependent on any #ifdef, thus it should be available everywhere. Can you paste the compiler error you receive and provide a link to the gentoo bug? Also, I believe PowerPC is bi-endian, but does most of its processing in big-endian.

Changed in dcplusplus:
status: New → Incomplete
Revision history for this message
Edward Sheldrake (ejs1920) wrote :

Original dclib bug report:
https://sourceforge.net/tracker/index.php?func=detail&aid=2073595&group_id=181579&atid=897767

Gentoo bug report about dclib:
http://bugs.gentoo.org/show_bug.cgi?id=234660

Both bug reports have:
TigerHash.cpp: In member function ‘uint8_t* dcpp::TigerHash::finalize()’:
TigerHash.cpp:238: error: ‘HASH_SIZE’ was not declared in this scope
TigerHash.cpp:240: error: ‘HASH_SIZE’ was not declared in this scope

Line numbers do not match the DC++ source because some minor changes are made for dclib, to compile just the hashing code.

HASH_SIZE is no longer defined, instead there now is BITS and BYTES. This was changed sometime after 0.699 and before 0.705.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Ah, sorry, I was looking at the linuxdcpp core by accident and TigerHash has since been changed in DC++. I checked in a fix for this.

Changed in dcplusplus:
importance: Undecided → Low
status: Incomplete → Fix Committed
Pietry (pietry)
Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.