Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 102302 Details for
Bug 155617
games-action/abuse_sdl-0.7.0-r3 - ebuild + patches for adding support for amd64 arch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
abuse_sdl-0.7.0-fixes.patch
abuse_sdl-0.7.0-fixes.patch (text/plain), 1.92 KB, created by
Pacho Ramos
on 2006-11-18 13:48:41 UTC
(
hide
)
Description:
abuse_sdl-0.7.0-fixes.patch
Filename:
MIME Type:
Creator:
Pacho Ramos
Created:
2006-11-18 13:48:41 UTC
Size:
1.92 KB
patch
obsolete
>diff -ur abuse_sdl-0.7.0.orig/src/include/stack.hpp abuse_sdl-0.7.0/src/include/stack.hpp >--- abuse_sdl-0.7.0.orig/src/include/stack.hpp 2002-12-15 06:00:32.000000000 +0100 >+++ abuse_sdl-0.7.0/src/include/stack.hpp 2006-08-16 16:54:58.000000000 +0200 >@@ -13,20 +13,38 @@ > { > public : > T **sdata; >- long son; >- >- grow_stack(int max_size) { sdata=(T **)jmalloc(max_size,"pointer stack"); son=0; } >+ unsigned int son, _max_size; >+ /* <sigh> the max_size parameter is the number of bytes of the pointerstack >+ instead of the number of entries which it ofcourse should have been. >+ This breaks on 64 bit since the caller assumes 4 bytes per pointer and >+ thus on 64 bit allocates not enough memory. Instead of fixing all callers >+ we work around this by multiplying maxsize by 2 on 64 bit. */ >+ grow_stack(unsigned int max_size) >+ { >+ max_size *= sizeof(void*)/sizeof(int); >+ sdata = (T **)jmalloc(max_size, "pointer stack"); >+ son=0; >+ _max_size=max_size; >+ } >+ > void push(T *data) > { > sdata[son]=data; > son++; >+ if (son >= (_max_size/sizeof(int))) >+ { >+ lbreak("stack overflow\n"); >+ exit(0); >+ } > } > >- T *pop(long total) >- { if (total>son) { lbreak("stack underflow\n"); exit(0); } >+ T *pop(unsigned int total) >+ { >+ if (total>son) { lbreak("stack underflow\n"); exit(0); } > son-=total; > return sdata[son]; > } >+ > void clean_up() > { > if (son!=0) fprintf(stderr,"Warning cleaning up stack and not empty\n"); >diff -ur abuse_sdl-0.7.0.orig/src/light.cpp abuse_sdl-0.7.0/src/light.cpp >--- abuse_sdl-0.7.0.orig/src/light.cpp 2006-08-16 16:56:33.000000000 +0200 >+++ abuse_sdl-0.7.0/src/light.cpp 2006-08-16 16:36:07.000000000 +0200 >@@ -348,7 +348,7 @@ > // f->write(green_light,256*64); > for (int i=0;i<TTINTS;i++) > f->write(tints[i],256); >- fp->write(bright_tint,256); >+ f->write(bright_tint,256); > // f.write(trans_table,256*256); > } > delete f;
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 155617
:
102299
|
102300
|
102301
| 102302 |
102712
|
116332
|
119682