Opened 14 years ago
Closed 14 years ago
#6646 closed enhancement (fixed)
implicit declaration of function 'getline'
Reported by: | diger | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | getline getdelim posix | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
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; }
Change History (3)
comment:1 by , 14 years ago
Component: | - General → System/POSIX |
---|---|
Keywords: | getline getdelim posix added |
Type: | bug → enhancement |
Version: | R1/alpha2 → R1/Development |
comment:2 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Note:
See TracTickets
for help on using tickets.
Added missing prototypes in hrev38880.