Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 116311 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]
upstream's 64bit patch
sswf-1.8.0-64bit.patch (text/plain), 2.21 KB, created by
Christoph Mende (RETIRED)
on 2007-04-15 14:23:07 UTC
(
hide
)
Description:
upstream's 64bit patch
Filename:
MIME Type:
Creator:
Christoph Mende (RETIRED)
Created:
2007-04-15 14:23:07 UTC
Size:
2.21 KB
patch
obsolete
>--- sswf-1.8.0-old/src/lib/libsswf_util.c++ 2006-11-28 09:08:07.000000000 +0100 >+++ sswf-1.8.0/src/lib/libsswf_util.c++ 2007-04-03 04:31:15.000000000 +0200 >@@ -1,8 +1,8 @@ >-/* libsswf_utils.c++ -- written by Alexis WILKE for Made to Order Software Corp. (c) 2002-2006 */ >+/* libsswf_utils.c++ -- written by Alexis WILKE for Made to Order Software Corp. (c) 2002-2007 */ > > /* > >-Copyright (c) 2002-2006 Made to Order Software Corp. >+Copyright (c) 2002-2007 Made to Order Software Corp. > > Permission is hereby granted, free of charge, to any > person obtaining a copy of this software and >@@ -493,9 +493,17 @@ using namespace sswf; > * The swap() function swaps the content of buffer s1 with buffer s2. > * 'size' bytes are swapped. > * >+ * If you have a 64 bits system, 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. >+ * > * 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 >- * default 8 bits at a time function is used. >+ * of 4 bytes, then the swap is done 32 bits at a time. >+ * >+ * Otherwise the 8 bits (1 byte) at a time function is used. >+ * >+ * \note >+ * Modifications to support 64-bit by Fabio A. Correa <facorread at gmail> > * > * \param s1 One of the buffers to swap > * \param s2 One of the buffers to swap >@@ -509,7 +517,21 @@ void sswf::swap(void *s1, void *s2, size > if(size == 0) { > return; > } >- if((size & 3) == 0 && (((int32_t) s1) & 3) == 0 && (((int32_t) s2) & 3) == 0) { >+ // on 64 bits systems, swap 64 bits at once >+ if(sizeof(void *) == 8 && (size & 7) == 0 && (((intptr_t) s1) & 7) == 0 && (((intptr_t) s2) & 7) == 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((size & 3) == 0 && (((intptr_t) s1) & 3) == 0 && (((intptr_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