mephistoу меня вопрос по getline.
Почему если не использовать
#define _GNU_SOURCE выдает предупреждение
Код
getline.c: In function ‘main’:
getline.c:14: warning: implicit declaration of function ‘getline’
Вот что нашел
Код
- Macro: _GNU_SOURCE
If you define this macro, everything is included: ANSI C, POSIX.1,
POSIX.2, BSD, SVID, X/Open, and GNU extensions. In the cases where
POSIX.1 conflicts with BSD, the POSIX definitions take precedence.
If you want to get the full effect of `_GNU_SOURCE' but make the
BSD definitions take precedence over the POSIX definitions, use
this sequence of definitions:
#define _GNU_SOURCE
#define _BSD_SOURCE
#define _SVID_SOURCE
Note that if you do this, you must link your program with the BSD
compatibility library by passing the `-lbsd-compat' option to the
compiler or linker. *Note:* If you forget to do this, you may get
very strange errors at run time.
Это связано с какими то стандартами?