Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 113883 Details for
Bug 171587
media-video/sswf-1.8.0 amd64: cast void*->int32_t compile error
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Evaluate the size of void* while executing sswf::patch()
sswf-1.8.0.patch (text/plain), 1.65 KB, created by
Fabio Correa
on 2007-03-20 16:24:12 UTC
(
hide
)
Description:
Evaluate the size of void* while executing sswf::patch()
Filename:
MIME Type:
Creator:
Fabio Correa
Created:
2007-03-20 16:24:12 UTC
Size:
1.65 KB
patch
obsolete
>diff --recursive --unified sswf-1.8.0/src/lib/libsswf_util.c++ sswf-1.8.0-new/src/lib/libsswf_util.c++ >--- sswf-1.8.0/src/lib/libsswf_util.c++ 2006-11-28 03:08:07.000000000 -0500 >+++ sswf-1.8.0-new/src/lib/libsswf_util.c++ 2007-03-20 11:07:26.000000000 -0500 >@@ -489,12 +489,12 @@ > > > /** \brief Swap the content of two buffers >- * >+ * Modifications to 64-bit by Fabio A. Correa <facorread at gmail> > * The swap() function swaps the content of buffer s1 with buffer s2. > * 'size' bytes are swapped. > * >- * If s1 and s2 both point to a 32 bit value and the size is a multiple >- * of 4 bytes, then the swap is done 32 bits at a time. Otherwise the >+ * If s1 and s2 both point to a 64 bit value and the size is a multiple >+ * of 8 bytes, then the swap is done 64 bits at a time. Otherwise the > * default 8 bits at a time function is used. > * > * \param s1 One of the buffers to swap >@@ -509,7 +509,20 @@ > if(size == 0) { > return; > } >- if((size & 3) == 0 && (((int32_t) s1) & 3) == 0 && (((int32_t) s2) & 3) == 0) { >+ if((sizeof(void*) == 8) && (size & 4) == 0 && ((((int64_t)s1) & 4) == 0) && ((((int64_t)s2) & 4) == 0)) { >+ int64_t a; >+ >+ assert(sizeof(int64_t) == 8, "the swap() function assumes that the sizeof(int64_t) == 8...\n"); >+ do { >+ a = * (int64_t *) s1; >+ * (int64_t *) s1 = * (int64_t *) s2; >+ * (int64_t *) s2 = a; >+ s1 = (int64_t *) s1 + 1; >+ s2 = (int64_t *) s2 + 1; >+ size -= sizeof(int64_t); >+ } while(size > 0); >+ } >+ else if((sizeof(void*) == 4) && (size & 3) == 0 && (((int32_t) s1) & 3) == 0 && (((int32_t) s2) & 3) == 0) { > int32_t a; > > assert(sizeof(int32_t) == 4, "the swap() function assumes that the sizeof(int32_t) == 4...\n"); >
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 171587
:
113883
|
113887
|
116311