* strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
wide char to SO/UTF-8 sequence.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | ||||
| 2009-05-08  IWAMURO Motonori <deenheart@gmail.com> | ||||
|  | ||||
| 	* strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting | ||||
| 	wide char to SO/UTF-8 sequence. | ||||
|  | ||||
| 2009-05-08  Corinna Vinschen  <corinna@vinschen.de> | ||||
|  | ||||
| 	* include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as | ||||
|   | ||||
| @@ -432,6 +432,7 @@ sys_cp_wcstombs (wctomb_p f_wctomb, char *charset, char *dst, size_t len, | ||||
|          ASCII SO; UTF-8 representation of invalid char. */ | ||||
|       if (bytes == -1 && *charset != 'U'/*TF-8*/) | ||||
|         { | ||||
| 	  _REENT->_errno = 0; | ||||
| 	  buf[0] = 0x0e; /* ASCII SO */ | ||||
| 	  bytes = __utf8_wctomb (_REENT, buf + 1, pw, charset, &ps); | ||||
| 	  if (bytes == -1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user