Subject: Re: iconv(3) prototype
To: Pavel Cahyna <pavel.cahyna@st.cuni.cz>
From: Noriyuki Soda <soda@sra.co.jp>
List: tech-userlevel
Date: 08/02/2004 20:36:07
>> Not to start anything, but fwiw GNU defines theirs as const, too.  And

> Not to start anything, but fwiw GNU defines theirs as const, too.  And

FWIW, there is const qualifier in <iconv.h> on some commercial UNIX
systems. Although this may be backward compat thing.
e.g.

Solaris 8:

extern size_t   iconv(iconv_t, const char **, size_t *, char **, size_t *);

HP-UX11.23:

#ifdef _INCLUDE_XOPEN_SOURCE_500
extern size_t   iconv(iconv_t, const char **, size_t *, char **, size_t *);
#else
extern size_t   iconv(iconv_t, char **, size_t *, char **, size_t *);
#endif

Tru64 v5.1:

/*
 * provide backward compatible prototype for iconv arguments
 */
#if defined(_XOPEN_SOURCE) && !defined(_LIBC_POLLUTION_H_)

extern size_t   iconv(iconv_t, char **, size_t *, char **, size_t *);

#else /* XOPEN_SOURCE */

extern size_t   iconv(iconv_t, const char **, size_t *, char **, size_t *);

#endif /* _XOPEN_SOURCE && !_LIBC_POLLUTION_H_ */
--
soda