Closed ChaosKid42 closed 6 years ago
Wow, what's wrong with long int
on CentOS? That's a part of C99 standard.
Whatever, I merge.
Well. long
was not the issue. Using a declaration in the for loop was. Still no success in compiling on CentOS7:
==> rtb (compile)
Compiling c_src/rtb_db.c
c_src/rtb_db.c: In function 'generate_users_csv':
c_src/rtb_db.c:104:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i=1; i<=state->capacity; i++) {
^
c_src/rtb_db.c:104:3: note: use option -std=c99 or -std=gnu99 to compile your code
ERROR: compile failed while processing /home/rtb/rtb: rebar_abort
make: *** [src] Error 1
``'
Yeah, I commited the proper fix, thanks.
Even works on CentOS7 now! :-)
ANSI C89 is quite young IMHO. Only about 29 years. Can barely be considered stable ... :-)
Btw: Thanks!
Compiler on CentOS7 does not like variable declaration in for loops.