[U-Boot] strtonum() is gawk specific extension

The following patch "Check that u-boot.bin size looks correct": http://patchwork.ozlabs.org/patch/355151/ Uses strtonum() function which is gawk specific extension: https://www.gnu.org/software/gawk/manual/html_node/Strtonum-Function.html
As a result, currenlty, u-boot/master generates build errors on systems with alternative awk implementations e.g. I get:
awk: line 2: function strtonum never defined
Either gawk shall be required and explicitly used or the implementation changed.
Best, Vasili

Hi,
On 15 June 2014 06:56, Vasili Galka vvv444@gmail.com wrote:
The following patch "Check that u-boot.bin size looks correct": http://patchwork.ozlabs.org/patch/355151/ Uses strtonum() function which is gawk specific extension: https://www.gnu.org/software/gawk/manual/html_node/Strtonum-Function.html
As a result, currenlty, u-boot/master generates build errors on systems with alternative awk implementations e.g. I get:
awk: line 2: function strtonum never defined
Either gawk shall be required and explicitly used or the implementation changed.
I thought of an ugly way and sent a patch using bc, but please let me know if you have something better.
Regards, Simon

Hi Simon,
On Wed, Jun 18, 2014 at 9:10 AM, Simon Glass sjg@chromium.org wrote:
I thought of an ugly way and sent a patch using bc, but please let me know if you have something better.
I honestly don't know. Is bc considered "standard" and always comes on Linux systems? Maybe there shall be a list of prerequisites in README file? For example some configurations require openssl on the host.
Best, Vasili
participants (2)
-
Simon Glass
-
Vasili Galka