Michael Jennings wrote:


John wins again.

Michael,

Thanks for your support, again. :-)

Just so that no one thinks we're ganging up on them, here is one for you ;-)

libast from Eterm CVS fails to build with gcc4 on x86_64.

/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include/libast -I../include -I../include/libast -I/usr/X11R6/include -g -O2 -MT mbuff.lo -MD -MP -MF .deps/mbuff.Tpo -c mbuff.c -fPIC -DPIC -o .libs/mbuff.o
mbuff.c: In function 'spif_mbuff_reverse':
mbuff.c:498: error: invalid lvalue in assignment
make[2]: *** [mbuff.lo] Error 1
make[2]: Leaving directory `/home/ellson/FIX/Linux.x86_64/build/eterm/libast/src'


The problem is that the xor trick isn't working for swapping pointers. One possible work around is to use
the more straightfoward SWAP code:

RCS file: /cvsroot/enlightenment/eterm/libast/include/libast.h,v
retrieving revision 1.58
diff -u -r1.58 libast.h
--- include/libast.h    15 Dec 2004 00:00:19 -0000      1.58
+++ include/libast.h    2 Jun 2005 14:25:33 -0000
@@ -281,11 +281,11 @@
 * @param a The first variable.
 * @param b The second variable.
 */
-#if STRICT_ISO_C99
+// #if STRICT_ISO_C99
#  define BINSWAP(a, b)  SWAP(a, b)
-#else
-# define BINSWAP(a, b) (((long) (a)) ^= ((long) (b)) ^= ((long) (a)) ^= ((lon g) (b)))
-#endif
+// #else
+// # define BINSWAP(a, b) (((long) (a)) ^= ((long) (b)) ^= ((long) (a)) ^= (( long) (b)))
+// #endif

/**
 * Make sure a char pointer is non-NULL before printing it.


John



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to