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]

[PATCH] codecvt.h


	Both AIX and Glibc declare the second argument to iconv() as
"const char **".  The following patch removes the compiler error for me.
Have GNU/Linux systems seen the same errors?  I note a lot of ChangeLog
entries for codecvt.h enabling and disabling "const" for this same
function, so this needs some review.

Thanks, David


	* include/bits/codecvt.h (do_out, do_in): Constify __cfrom.

Index: codecvt.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/codecvt.h,v
retrieving revision 1.4
diff -c -p -r1.4 codecvt.h
*** codecvt.h	2000/10/31 01:26:05	1.4
--- codecvt.h	2000/11/06 18:31:54
*************** namespace std
*** 393,399 ****
  	  // Argument list for iconv specifies a byte sequence. Thus,
  	  // all to/from arrays must be brutally casted to char*.
  	  char* __cto = reinterpret_cast<char*>(__to);
! 	  char* __cfrom;
  	  size_t __conv;
  
  	  // Some encodings need a byte order marker as the first item
--- 393,399 ----
  	  // Argument list for iconv specifies a byte sequence. Thus,
  	  // all to/from arrays must be brutally casted to char*.
  	  char* __cto = reinterpret_cast<char*>(__to);
! 	  const char* __cfrom;
  	  size_t __conv;
  
  	  // Some encodings need a byte order marker as the first item
*************** namespace std
*** 495,501 ****
  	  // Argument list for iconv specifies a byte sequence. Thus,
  	  // all to/from arrays must be brutally casted to char*.
  	  char* __cto = reinterpret_cast<char*>(__to);
! 	  char* __cfrom;
  	  size_t __conv;
  
  	  // Some encodings need a byte order marker as the first item
--- 495,501 ----
  	  // Argument list for iconv specifies a byte sequence. Thus,
  	  // all to/from arrays must be brutally casted to char*.
  	  char* __cto = reinterpret_cast<char*>(__to);
! 	  const char* __cfrom;
  	  size_t __conv;
  
  	  // Some encodings need a byte order marker as the first item

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