[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: iconv() prototype
From: |
Andreas Jaeger |
Subject: |
Re: iconv() prototype |
Date: |
26 Feb 2001 18:11:05 +0100 |
User-agent: |
Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.1 (Channel Islands) |
Fumitoshi UKAI <address@hidden> writes:
> Hi,
>
> On address@hidden, Mr. Tajiri claims that iconv() prototype is
> wrong, it should be necessary to add const to inbuf. That is,
> prototype of iconv() in iconv.h
>
> extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
> size_t *__restrict __inbytesleft,
> char **__restrict __outbuf,
> size_t *__restrict __outbytesleft);
>
> should be
>
> extern size_t iconv (iconv_t __cd, const char **__restrict __inbuf,
> size_t *__restrict __inbytesleft,
> char **__restrict __outbuf,
> size_t *__restrict __outbytesleft);
>
>
> As I checked `The Single UNIX Specification, Version 2' from The Open
> Group, the latter is correct.
>
> Why does glibc declare as former?
> Is there any reason for this?
This will be changed in the upcoming XPG6, glibc follows that change
already.
Andreas
--
Andreas Jaeger
SuSE Labs address@hidden
private address@hidden
http://www.suse.de/~aj
- iconv() prototype, Fumitoshi UKAI, 2001/02/26
- Re: iconv() prototype,
Andreas Jaeger <=