# HG changeset patch # User diego # Date 1147530757 0 # Node ID b642d1b8f332ce0f8b17edeba0bc4e0ace777658 # Parent 23fedcdd08a0d751b18a686469a6fc515dc95880 Linkers, assisted by a compiler, can optimize out the string that is being used to test for endianness. Prevent the linker from optimizing out the string, as it is being returned. patch by Derek E. Lewis, dlewis^#@^#solnetworks^#.^#net diff -r 23fedcdd08a0 -r b642d1b8f332 configure --- a/configure Sat May 13 10:49:46 2006 +0000 +++ b/configure Sat May 13 14:32:37 2006 +0000 @@ -6790,8 +6790,7 @@ short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'), (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0}; int main(){ - char* s = (char*)ascii_name; - return 0; + return (int)ascii_name; } EOF if cc_check ; then