tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: iconv(3) protype mismatch with POSIX

   Date: Thu, 16 Jun 2016 12:27:47 +0200
   From: Kamil Rytarowski <>

   On 16.06.2016 05:28, David Holland wrote:
   > On Sun, May 29, 2016 at 03:54:29AM +0200, Kamil Rytarowski wrote:
   >  > This is an interesting exercise to use C11.. however:
   >  > 1. Not all ports moved to gcc 4.9+,
   >  > 2. pcc doesn't support it,
   >  > 3. it won't work as a valid and acceptable C++ code.
   >  > 4. Many software expects system headers to be C89, GNU89 etc, and
   >  > doesn't request C11.
   > None of that matters, it just needs to be wrapped in suitable ifdefs.

   All of them matters to me and C11 in a public-header is no-go.

We already have plenty of conditionals like this for C99 and C++ in
public header files -- for example, __restrict, __BEGIN_DECLS, &c.
Can't hurt to add

#if (__STDC_VERSION__ - 0) > 201112L
#define iconv ...

or whatever, if we want to do that.

   >  > How about the Solaris 11 move? Leave "extern" option for those who rally
   >  > want it and SUS/POSIX for others.
   > "extern" option?


   These calls with and without const should be ABI compatible.

Can you explain how an application uses this, and how this helps?
Does illumos use _POSIX_C_SOURCE vs _SOLARIS_SOURCE or something to
select the declaration?

Home | Main Index | Thread Index | Old Index