critical impact:
mbstate_t - incompatible data type (CrCh116)
Problem description
The mbstate_t data type definition on Tru64 UNIX and HP-UX is different.
The mbstate_t structure is an opaque data structure. On HP-UX, mbstate_t is defined only if _XOPEN_SOURCE is defined to be equal to 500. If your code accesses any member of this structure, it is not portable, and cannot be ported to HP-UX. This structure is mostly used by the identified restartable versions of I18N Application Programming Interfaces(APIs). Identifiers
 mbrlen |
 mbsinit |
 mbstate_t |
 wcsrtombs |
|
 mbrtowc |
 mbsrtowcs |
 wcrtomb |
|
|
See also
Solution description
Review and modify your code.
The APIs that use mbstate_t are functionally equivalent to the nonrestartable versions in locales that do not use shift-state encoding. The only advantage
to using some of these restartable APIs is that additional error codes might be returned in some cases. Neither Tru64 UNIX nor HP-UX provide any locales that use shift-state encoding.
If your code uses the mbstate_t structure, you must do
the following:
- Define _XOPEN_SOURCE=500.
- Initialize the structure to zero before porting to HP-UX.
New behavior
See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| I18N |
C, C++ |
any HP-UX 11i version |
critical |
changed |
|