This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: V3 PATCH: Fix const-correctness in use of iconv


>>>>> Mark Mitchell writes:

>>>>> "Ulrich" == Ulrich Drepper <drepper@redhat.com> writes:
Ulrich> Haven't you seen what I've written?  const char * is

Mark> No, I haven't.  I just see code that doesn't compile. :-)

Ulrich> wrong.  I am member of the group which decides about this.
Ulrich> Why do you think you know this better?

Mark> If you continue to take this tone in your messages, I will simply
Mark> cease replying to them.  It's not me-versus-you; we're just trying to
Mark> get the job done.  Please treat me with the same respect I treat you.

Mark> The GNU/Linux iconv.h contains a prototype that uses `const char **',
Mark> as does the Solaris 2.8 version.  So, the V3 headers need to work with
Mark> those headers.  I think you should either submit a change to have
Mark> fixincludes fix this, or have autoconf detect that situation and work
Mark> around it in codecvt.h.

Btw. glibc 2.2 will have:

* Convert at most *INBYTESLEFT bytes from *INBUF according to the
   code conversion algorithm specified by CD and place up to
   *OUTBYTESLEFT bytes in buffer at *OUTBUF.  */
extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
                     size_t *__restrict __inbytesleft,
                     char **__restrict __outbuf,
                     size_t *__restrict __outbytesleft);

And that's the way to go according to the open group - we should
really write a fixincludes for this.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]