On 31 January 2018 at 12:14, Christian Borntraeger
<borntrae...@de.ibm.com> wrote:
> On 01/30/2018 04:41 PM, Eric Blake wrote:
>> On 01/30/2018 07:38 AM, Christian Borntraeger wrote:
>>> +++ b/configure
>>> @@ -1906,9 +1906,9 @@ int main(int argc, char *argv[]) {
>>>  EOF
>>>
>>>  if compile_object ; then
>>> -    if grep -q BiGeNdIaN $TMPO ; then
>>> +    if strings -a $TMPO | grep -q BiGeNdIaN ; then
>>>          bigendian="yes"
>>> -    elif grep -q LiTtLeEnDiAn $TMPO ; then
>>> +    elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
>>
>> Yes, this is indeed a more portable way to grep binary files (it's also
>> possible to do:
>>
>> tr -d '\0' < $TMPO | grep -q ...
>>
>> if we're worried about the availability of strings, but I don't see that
>> being a problem if no one reports it actually failing).
>>
>> Reviewed-by: Eric Blake <ebl...@redhat.com>
>
> Peter, does that patch work on MacOS and Windows? If yes we could
> get this patch in via the s390 tree.

I haven't tested but I think it should be fine. OSX provides
a strings binary that supports -a, and Windows cross-builds
so it will use the Linux strings.

thanks
-- PMM

Reply via email to