diff configure @ 18476:b642d1b8f332

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
author diego
date Sat, 13 May 2006 14:32:37 +0000
parents 59e41f71a3fa
children c085c630b7f5
line wrap: on
line diff
--- 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