<div>Oh, ugh. Was it anything modern where this failed? Please don't tell me this is on Irix or Ultrix or something equally obscure.</div><div><br></div><div>Jason, would you prefer this part of my patch be reverted until we can find something that works universally?<br>
<br><div class="gmail_quote">2010/11/20 Måns Rullgård <span dir="ltr"><<a href="mailto:mans@mansr.com">mans@mansr.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Sean McGovern <<a href="mailto:gseanmcg@gmail.com">gseanmcg@gmail.com</a>> writes:<br>
<br>
> echo "int i = 0x42494745; double f = 0x1.0656e6469616ep+102;" > conftest.c<br>
> $CC $CFLAGS conftest.c -c -o conftest.o 2>$DEVNULL || die "endian test failed"<br>
> -if grep -q BIGE conftest.o && grep -q FPendian conftest.o ; then<br>
> +if (strings -a conftest.o | grep -q BIGE) && (strings -a conftest.o | grep -q FPendian) ; then<br>
> define WORDS_BIGENDIAN<br>
> -elif !(grep -q EGIB conftest.o && grep -q naidnePF conftest.o) ; then<br>
> +elif !(strings -a conftest.o | grep -q EGIB && strings -a conftest.o | grep -q naidnePF) ; then<br>
> die "endian test failed"<br>
> fi<br>
<br>
I remember encountering some system where this didn't work.<br>
Unfortunately, I don't remember which one. It has to do with this<br>
part of the 'strings' spec:<br>
<br>
A printable string is any sequence of four (by default) or more<br>
printable characters terminated by a <newline> or NUL character.<br>
<br>
You can't be certain that the test word will be followed by a zero.<br>
<font color="#888888"><br>
--<br>
Måns Rullgård<br>
<a href="mailto:mans@mansr.com">mans@mansr.com</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br>
</div></div></blockquote></div><br></div>