Skip to content

Fix improper check for mbrlen/mblen, to deal with the configuration failure for Android below API level 26#56

Open
zjyhjqs wants to merge 1 commit intoapache:masterfrom
zjyhjqs:master
Open

Fix improper check for mbrlen/mblen, to deal with the configuration failure for Android below API level 26#56
zjyhjqs wants to merge 1 commit intoapache:masterfrom
zjyhjqs:master

Conversation

@zjyhjqs
Copy link

@zjyhjqs zjyhjqs commented Apr 8, 2024

(I know this is not a GitHub project. But my application for JIRA account hasn't been replied yet.)

The usage place (IconvLCPTranscoder::calcRequiredSize) will check the existence of ::mbrlen first. If not then use the ::mblen as alternative.

#if HAVE_MBRLEN
int l=::mbrlen( src, MB_CUR_MAX, &st );
#else
int l=::mblen( src, MB_CUR_MAX );
#endif

NDK doesn't provide the implementation of ::mblen below API level 26. Only checks HAVE_MBLEN would consequence to configuration failure.

The usage place (`IconvLCPTranscoder::calcRequiredSize`) will check the existence of `::mbrlen` first. If not then use the `::mblen` as alternative.
NDK doesn't provide the implementation of `::mblen` below API level 26. Only checks `HAVE_MBLEN` would consequence to configuration failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant