Re: small fix for lib/sh/snprintf.c

2012-04-16 Thread Petr Sumbera
ision) * 0.5 : \ d + pow_10(-(p)->precision) * 0.5 where (-0 < 0.) isn't true. And there is probably no easy solution for this: http://en.wikipedia.org/wiki/Signed_zero Thanks, Petr On 04/16/12 01:14 AM, Chet Ramey wrote: On 4/13/12 9:57 AM, Petr Sumbera wrote:

Re: small fix for lib/sh/snprintf.c

2012-04-13 Thread Petr Sumbera
On 04/13/12 03:18 PM, Petr Sumbera wrote: Problem 2: == bash -c 'printf "x%+010.0fx\n" 123' x00+123x where it should be: x+00123x Fixed in chunk #3 (but the problem is there also for other types!). My fix breaks following case: bash -c 'pr

Re: small fix for lib/sh/snprintf.c

2012-04-13 Thread Petr Sumbera
should be: x+123 x Fixed in chunk #5 and #1. Problem 4: == bash -c 'printf "%f\n" -123' -inf where it should be: -123.00 Fixed in chunk #2. -- Petr On 04/13/12 02:27 AM, Chet Ramey wrote: On 4/12/12 12:25 PM, Petr Sumbera wrote: Hi, we are running Bas

small fix for lib/sh/snprintf.c

2012-04-12 Thread Petr Sumbera
Hi, we are running Bash 3.2.38 on Solaris 10 where asprintf() isn't available. Thus code in snprintf.c is used. There is a problem with following command: bash -c 'printf "x%10.0fx\n" 123' x000123x Where correct output should be: x 123x It seems that '0' after '.' enables zero pad

patch bash32-049 is missing from bash 4.0

2010-04-08 Thread Petr Sumbera
Hi, It seems that patch http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-049 was left from version 4.0. Anyone has comment on this? Can this be radded? Thanks, Petr

Solaris getcwd() implementation vs BASH

2007-01-19 Thread Petr Sumbera
Hi All, Solaris doesn't implement getcwd() with support for dynamic allocation of memory. This BASH consider as broken so that configure defines GETCWD_BROKEN. Later in bash-3.2/config-bot.h it disables HAVE_GETCWD completely: /* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETC

Solaris getcwd() implementation vs BASH

2007-01-18 Thread Petr Sumbera
Hi All, Solaris doesn't implement getcwd() with support for dynamic allocation of memory. This BASH consider as broken so that configure defines GETCWD_BROKEN. Later in bash-3.2/config-bot.h it disables HAVE_GETCWD completely: /* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD