gheja / gbdk

GameBoy Developer's Kit (GBDK) 2.96a from 2002 tuned so it can be compiled on a modern system (Ubuntu 18.04 LTS and 16.04 LTS).
84 stars 10 forks source link

error: number of arguments doesn't match prototype -- getline() #6

Closed gheja closed 10 years ago

gheja commented 10 years ago

asmain.c: In function 'main': asmain.c:291:3: error: too few arguments to function 'getline' In file included from asmain.c:15:0: /usr/include/stdio.h:671:20: note: declared here make[2]: *\ [asmain.o] Error 1 make[2]: Leaving directory '/home/builder/project/sdcc/as/mcs51' make[2]: Entering directory '/home/builder/project/sdcc/as'

lklex.c: In function 'getline': lklex.c:425:1: error: number of arguments doesn't match prototype In file included from lklex.c:16:0: /usr/include/stdio.h:671:20: error: prototype declaration make[4]: *\ [obj/-z80/lklex.o] Error 1 make[4]: Leaving directory '/home/builder/project/sdcc/link/z80'

... and a lot more instances of these messages ...

gheja commented 10 years ago

It seems that the getline() was changed in stdio.h in recent versions of GCC.

Currently this is in the stdio.hu: extern _IO_ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __wur;

Need to update all instances in the code...

NEMS1996 commented 4 years ago

So is there any workaround for this or is it a deadlock?

gheja commented 4 years ago

I believe I fixed this in commit 2ffb56732a65d862248a2b7ddb94c110d424547 I mentioned in the close comment.