NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/43909: getcap(3) is missing from curses(3).



>Number:         43909
>Category:       lib
>Synopsis:       getcap(3) is missing from curses(3).
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 27 02:00:00 +0000 2010
>Originator:     Takahiro Kambe
>Release:        NetBSD 5.99.39
>Organization:
        
>Environment:
        
        
System: NetBSD hpmicro.a.back-street.net 5.99.39 NetBSD 5.99.39 (HPMICRO) #10: 
Sat Sep 25 13:03:13 JST 2010 
taca%hpmicro.a.back-street.net@localhost:/var/obj/sys/arch/amd64/compile/HPMICRO
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        getcap(3) is described in curses(3) and <curses.h>, but there
        is no function in libcuress.*.
>How-To-Repeat:
        Compile and link a program which use getcap(3).

getcap-test.c:

--------------------------------------------------------------------

#include <curses.h>

int
main()
{
        WINDOW *w;
        char *s;

        w = initscr();
        if (w != NULL) {
                s = getcap("cm");
                printf("getcap(cm) %s NULL\n",
                       (s == NULL)? "returns": "dosen't return");
        }
}

--------------------------------------------------------------------

% cc getcap-test.c -lcurses

        It succeeds on NetBSD 4.0_STABLE or NetBSD 5.1_RC4 but on 5.99.39:

/var/tmp//ccXwtLxn.o: In function `main':
getcap-test.c:(.text+0x1e): undefined reference to `getcap'

>Fix:
        I don't know getcap(3) is really deprecated or accidently
        removed from curses(3).  If former, we shoudn't have getcap()
        in curses.h.  I belive it was accidently removed...

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index