This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] --enable-libstdcxx-allocator


Phil Edwards wrote:
>On Fri, Mar 12, 2004 at 11:17:20PM -0600, Benjamin Kosnik wrote:
>> +     case x${target_os} in
>> +       xfreebsd*)
>
>Just an aside:  We're guaranteed that $target_os will be set to something
>by this point, so the 'x' isn't needed.  (I'll massage that next time I'm
>in that file.)

Actually, for your future reference when writing shell script, the 'x' is
*never* needed in case statements like this; only when using 'test'.

You can do this portably:
case ${foo} in
  "") echo "yes, foo was empty" ;;
esac

This is one reason I prefer case statements to 'if test' when using shell.  :-)

-- 
Make sure your vote will count.
http://www.verifiedvoting.org/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]