[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
iconv() prototype
From: |
Fumitoshi UKAI |
Subject: |
iconv() prototype |
Date: |
Tue, 27 Feb 2001 02:01:27 +0900 |
User-agent: |
Wanderlust/2.4.1 (Stand By Me) SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.0 (HANANOEN) |
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?
Thanks,
Fumitoshi UKAI
- iconv() prototype,
Fumitoshi UKAI <=