standards/145517: POSIX getline() missing
Rémi Denis-Courmont
rem at videolan.org
Thu Apr 8 15:30:02 UTC 2010
>Number: 145517
>Category: standards
>Synopsis: POSIX getline() missing
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-standards
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 08 15:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Rémi Denis-Courmont
>Release: Not known
>Organization:
VideoLAN project
>Environment:
Not provided
>Description:
VLC media player compilation reportedly fails due to getline() not being defined.
Forwarded from https://trac.videolan.org/vlc/ticket/3503:
| gmake[4]: Entering directory `/usr/home/igor/vlc-1.1.0-pre1/src'
| CC config/libvlccore_la-dirs_xdg.lo
| config/dirs_xdg.c: In function 'config_GetTypeDir': config/dirs_xdg.c:141: | error: implicit declaration of function 'getline'
| FreeBSD have not getline().
getline() and getdelim() are specified by POSIX here:
http://www.opengroup.org/onlinepubs/9699919799/functions/getline.html
>How-To-Repeat:
C-compile the following test case:
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char *line = NULL;
size_t linesize = 0;
ssize_t linelen;
while ((linelen = getline(&line, &linesize, stdin)) != -1)
fwrite(line, 1, linelen, stdout);
free(line);
if (ferror(stdin))
{
perror("Standard input");
return 1;
}
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-standards
mailing list