Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Apr 2010 15:25:27 GMT
From:      Rémi Denis-Courmont <rem@videolan.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   standards/145517: POSIX getline() missing
Message-ID:  <201004081525.o38FPRIA060056@www.freebsd.org>
Resent-Message-ID: <201004081530.o38FU1JE013063@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004081525.o38FPRIA060056>