Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 80251 Details for
Bug 123461
pearpc does not compile on amd64 and fails to compile with modular X
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches it to make it 64-bit clean
pearpc-0.4-make-64-good.patch (text/plain), 2.38 KB, created by
John Sonnenschein
on 2006-02-20 00:47:22 UTC
(
hide
)
Description:
patches it to make it 64-bit clean
Filename:
MIME Type:
Creator:
John Sonnenschein
Created:
2006-02-20 00:47:22 UTC
Size:
2.38 KB
patch
obsolete
>diff -cr pearpc-0.4/src/tools/crc32.cc pearpc-0.4.0/src/tools/crc32.cc >*** pearpc-0.4/src/tools/crc32.cc Thu Nov 24 17:01:10 2005 >--- pearpc-0.4.0/src/tools/crc32.cc Mon Feb 20 00:19:43 2006 >*************** >*** 5,11 **** > > #include "crc32.h" > >! static const uint32 crc32table[0x100] = { > 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, > 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, > 0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, >--- 5,11 ---- > > #include "crc32.h" > >! static const uint64 crc32table[0x100] = { > 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, > 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, > 0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, >*************** >*** 101,115 **** > > #define DO_CRC(b) crc = (crc >> 8) ^ crc32table[(*(byte*)&crc) ^ (b)] > >! uint32 ether_crc(size_t len, const byte *p) > { >! uint32 crc = 0xffffffff; // preload shift register, per CRC-32 spec > > #ifdef RUN_FASTER >! for (; (((uint32)p)&0x03)!=0 && len>0; len--) > DO_CRC(*p++); // will execute if *p is not dword aligned >! for (; len>=sizeof(uint32); p += sizeof(uint32), len -= sizeof(uint32)) { >! uint32 data = *(uint32*)p; > DO_CRC(((byte *)&data)[0]); > DO_CRC(((byte *)&data)[1]); > DO_CRC(((byte *)&data)[2]); >--- 101,115 ---- > > #define DO_CRC(b) crc = (crc >> 8) ^ crc32table[(*(byte*)&crc) ^ (b)] > >! uint64 ether_crc(size_t len, const byte *p) > { >! uint64 crc = 0xffffffff; // preload shift register, per CRC-32 spec > > #ifdef RUN_FASTER >! for (; (((uint64)p)&0x03)!=0 && len>0; len--) > DO_CRC(*p++); // will execute if *p is not dword aligned >! for (; len>=sizeof(uint64); p += sizeof(uint64), len -= sizeof(uint64)) { >! uint64 data = *(uint64*)p; > DO_CRC(((byte *)&data)[0]); > DO_CRC(((byte *)&data)[1]); > DO_CRC(((byte *)&data)[2]); >diff -cr pearpc-0.4/src/tools/crc32.h pearpc-0.4.0/src/tools/crc32.h >*** pearpc-0.4/src/tools/crc32.h Thu Nov 24 17:01:10 2005 >--- pearpc-0.4.0/src/tools/crc32.h Mon Feb 20 00:19:43 2006 >*************** >*** 9,14 **** > #include <stddef.h> > #include "system/types.h" > >! uint32 ether_crc(size_t len, const byte *p); > > #endif /* _CRC32_H_ */ >--- 9,14 ---- > #include <stddef.h> > #include "system/types.h" > >! uint64 ether_crc(size_t len, const byte *p); > > #endif /* _CRC32_H_ */
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 123461
: 80251 |
80252