standards/145517: POSIX getline() missing
David Schultz
das at FreeBSD.ORG
Fri Apr 9 21:30:05 UTC 2010
The following reply was made to PR standards/145517; it has been noted by GNATS.
From: David Schultz <das at FreeBSD.ORG>
To: RXmi Denis-Courmont <rem at videolan.org>
Cc: freebsd-gnats-submit at FreeBSD.ORG
Subject: Re: standards/145517: POSIX getline() missing
Date: Fri, 9 Apr 2010 16:43:40 -0400
On Thu, Apr 08, 2010, RXmi Denis-Courmont wrote:
> VLC media player compilation reportedly fails due to getline() not being defined.
The relevant caveat here is the one described in the COMPATIBILITY
section of the manpage:
COMPATIBILITY
Many application writers used the name getline before the getline() func-
tion was introduced in IEEE Std 1003.1 ("POSIX.1"), so a prototype is not
provided by default in order to avoid compatibility problems. Applica-
tions that wish to use the getline() function described herein should
either request a strict IEEE Std 1003.1-2008 ("POSIX.1") environment by
defining the macro _POSIX_C_SOURCE to the value 200809 or greater, or by
defining the macro _WITH_GETLINE, prior to the inclusion of <stdio.h>.
For compatibility with GNU libc, defining either _BSD_SOURCE or
_GNU_SOURCE prior to the inclusion of <stdio.h> will also make getline()
available.
More information about the freebsd-standards
mailing list