Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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