#296 Cosmetic: BSD/GNU specific option for echo

open-accepted
Josh Coalson
5
2007-08-31
2007-08-29
laurent
No

On Solaris 10, flac 1.2.0, there's a cosmetic-only issue with the test scripts, they're using the "-n" option for echo, which is available on BSD and GNU echo, not on SysV ones.

Result looks like:

-n noise: encode via pipes...
-n decode via pipes...
-n compare...
OK

It can be either replaced by /usr/ucb/echo on Solaris (the BSD-compatibility version), or maybe a more generic way would be to use printf, which is standard.

It's trivial in any case, so I can provide a patch for either solution.

Discussion

  • Josh Coalson
    Josh Coalson
    2007-08-31

    Logged In: YES
    user_id=78173
    Originator: NO

    ok, if you have a patch that would be great... how far back in solaris does /usr/ucb/echo go?

     
  • Josh Coalson
    Josh Coalson
    2007-08-31

    • assigned_to: nobody --> jcoalson
    • status: open --> open-accepted
     
  • laurent
    laurent
    2007-09-01

    Patch to use printf instead of echo -n

     
  • laurent
    laurent
    2007-09-01

    Logged In: YES
    user_id=1447460
    Originator: YES

    /usr/ucb has always been in Solaris, it's the compatibility tools from when they switched from BSD-based SunOS to System V-based Solaris around '90.

    Here is a basic patch, only replacing echo -n by a printf, via a variable. Is that ok?
    File Added: tests_scripts_echo.patch