Bug 19486 - iconv(3) declaration does not match man page
Summary: iconv(3) declaration does not match man page
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man-pages
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-20 19:48 UTC by Jesper Skov
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-24 08:48:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Jesper Skov 2000-10-20 19:48:37 UTC
Man page sez it should be

       size_t iconv (iconv_t cd,
                     const char* * inbuf, size_t * inbytesleft,
                     char* * outbuf, size_t * outbytesleft);

while the iconv.h declaration is:

extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
                     size_t *__restrict __inbytesleft,
                     char **__restrict __outbuf,
                     size_t *__restrict __outbytesleft);

That is, missing const propery on inbuf. Judging from the semantics of
the function, I'd say it should be const like the man page suggests.

Jesper

Comment 1 Jakub Jelinek 2000-10-24 08:48:38 UTC
The man page is broken, the correct prototype is in glibc (and in its
texinfo documentation). The prototype has been mistakenly defined with
const char ** in the standards but that has been corrected since then.

Comment 2 Trond Eivind Glomsrxd 2000-10-24 18:58:59 UTC
Fixed in 1.31-2. Thanks


Note You need to log in before you can comment on or make changes to this bug.