diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-05-13 14:32:37 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-05-13 14:32:37 +0000 |
commit | 76a2843b2b10912c28b0cd013ed383f606604eeb (patch) | |
tree | e4fa3f4c6f249307ac4056988a8048b94edd15db | |
parent | 2f1b01e3071cacf0447d014d4011a1f3fff67009 (diff) |
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
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18477 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-x | configure | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -6790,8 +6790,7 @@ if test "$_big_endian" = auto ; then 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 |