[haiku-bugs] [Haiku] #6646: implicit declaration of function 'getline'

  • From: "diger" <trac@xxxxxxxxxxxx>
  • Date: Mon, 20 Sep 2010 21:27:47 -0000

#6646: implicit declaration of function 'getline'
-------------------------+--------------------------------------------------
   Reporter:  diger      |        Owner:  nobody   
       Type:  bug        |       Status:  new      
   Priority:  normal     |    Milestone:  R1       
  Component:  - General  |      Version:  R1/alpha2
   Keywords:             |   Blocked By:           
Has a Patch:  0          |     Platform:  All      
   Blocking:             |  
-------------------------+--------------------------------------------------
 VLC media player compilation reportedly fails due to getline() not being
 defined.


 {{{
 make[4]: Entering directory `/boot/home/src/vlc/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'
 }}}

 Haiku 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;
 }
 }}}

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6646>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: