Configure: Fix the fflush(NULL) test in cross builds
authorBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 04:06:40 +0000 (01:06 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:25 +0000 (14:44 -0300)
Second attempt at this. This is less portable than the previous
version, since it assumes that the target system will have a cat, but unlike
the previous version this now actually works.

Configure

index a6fa428..29a6152 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -19712,7 +19712,8 @@ EOCP
                    # Copy the .c file to the remote host ($to is an ssh-alike if targethost is set)
                    if $test "X$targethost" != X; then
                        $to tryp.c
-                       $run ./tryp \< tryp.c 2>/dev/null > tryp.out
+                       $to tryp
+                       $run "cat tryp.c | ./tryp" 2>/dev/null > tryp.out
                    else
                        $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
                    fi
@@ -19781,7 +19782,8 @@ EOCP
            $rm -f tryp.out
            if $test "X$targethost" != X; then
                $to tryp.c
-               $run ./tryp \< tryp.c 2>/dev/null > tryp.out
+                $to tryp
+                $run "cat tryp.c | ./tryp" 2>/dev/null > tryp.out
            else
                $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
            fi