mruby/mruby — pull request #2656 by murasesyuka (2014-11-26 16:53:43+00:00)
Title: adhoc fix for pass build

if CFLAGS without std=gnu99, mruby debugger make build error as follows:.

> "gcc" -g -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -DENABLE_DEBUG -DMRBGEM_MRUBY_BIN_DEBUGGER_VERSION=0.0.0 -I"/home/murase/git/mruby/include" -MMD -o "/home/murase/git/mruby/build/host-debug/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.o" -c "/home/murase/git/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c"
> /home/murase/git/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c: In function ‘parse_breakpoint_no’:
> /home/murase/git/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:63:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
> for(int i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0');
> ^
> /home/murase/git/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:82:3: note: in expansion of macro ‘STRTOUL’
> STRTOUL(l, args);
> ^
> /home/murase/git/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:63:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
> for(int i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0');
> ^
> /home/murase/git/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:82:3: note: in expansion of macro ‘STRTOUL’
> STRTOUL(l, args);
> ^
> ...

make adhoc patch. and Pull Request.

Why don't use to stdlib.h of strtoul()?