Bug 34333 - iconv declaration inconsistent with documentation (and standard)
Summary: iconv declaration inconsistent with documentation (and standard)
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-02 12:13 UTC by Daniel Resare
Modified: 2016-11-24 14:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-02 12:13:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Daniel Resare 2001-04-02 12:13:42 UTC
The iconv() declaration is documented to be

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

but if you paste that declaration into a sourcefile that also includes
iconv.h and compile it you get:

iconv_decl.c:4: conflicting types for `iconv'
/usr/include/iconv.h:44: previous declaration of `iconv'

If you change your iconv() declaration removing const from 'const char
**inbuf' the snippet compiles ok. The documentation seems to be conformant
to UNIX98 (http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html)
so I think it is /usr/include/iconv.h that is in error here.

Comment 1 Jakub Jelinek 2001-04-02 12:27:25 UTC
The iconv prototype is defined in 2 places in Unix98,
http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.h.html
and
http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html
but these two prototypes are inconsistent.
This has been changed later on in the Austin group drafts, see e.g.
http://www.opengroup.org/austin/docs/austin_45r1.txt


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