I'm knee-deep in [K&R88] and I get chided by gcc
because the function getline()
, which K&R use as example and practise material, is now in stdio.h
(and has been since around 2010, I'm told.)
Would there be any manner to tell the compiler to play it like it's 1988 and to have my homespun version supersede the one from the library ?
(yes it's futile, but wadding in [K&R88] is my new hobby ;-)
Obligatory compiler output :
gcc -g -Wall -o "pgm" "pgm.c" (in directory: /home/eric/Development/6.087)
pgm.c:9:7: error: conflicting types for ‘getline’
9 | char *getline(){
| ^~~~~~~
In file included from pgm.c:1:
/usr/include/stdio.h:616:18: note: previous declaration of ‘getline’ was here
616 | extern __ssize_t getline (char **__restrict __lineptr,
| ^~~~~~~
Compilation failed.