Re: [AD] x color conversion again

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, 2004-11-26 at 13:29 +0100, Evert Glebbeek wrote:

> Anyone know what happened to this?
> Looking at the CVS repository, it seems like the patch isn't there.
> I'm asking because the original issue the patch was to fix has come up 
> again (see http://www.allegro.cc/forums/view_thread.php?_id=433530).
> Maybe rather then an #ifdef 0 around the current code we could detect for 
> BeOS?
> 

Yes, odd. Anyway, I attached a new patch.. it just checks the GCC
version for <3 - since I don't know how to check for the gas version.
But all non BeOS/QNX systems will have gcc 3.x (or debian even 4.x for
some reason) by now - and the ones who still have 2.95 are BeOS/QNX, and
they are the ones with the wrong gas.

-- 
Elias Pschernig
Index: src/misc/icolconv.s
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/icolconv.s,v
retrieving revision 1.27
diff -u -r1.27 icolconv.s
--- src/misc/icolconv.s	27 Jul 2004 08:07:45 -0000	1.27
+++ src/misc/icolconv.s	26 Nov 2004 13:58:37 -0000
@@ -27,7 +27,11 @@
 
 
 /* Better keep the stack pointer 16-byte aligned on modern CPUs */
+#if defined(__GNUC) && (__GNUC__ < 3)
+#define SLOTS_TO_BYTES(n) (n*4)
+#else
 #define SLOTS_TO_BYTES(n) (((n*4+15)/16)*16)
+#endif
 
 
 .text


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/