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 android float_reader #99

Closed
wants to merge 1 commit into from
Closed

Conversation

jiayuehua
Copy link
Contributor

@jiayuehua jiayuehua commented Jan 31, 2024

build on android 25c report error:


/ mnt/vcpkg-ci/b/scnlib/src/v2.0.0-cc5e6bd45f.clean/src/scn/impl/reader/float_reader.cpp:272:22: error: no member named 'wcstof_l' in the global namespace; did you mean 'wcstold_l'?
            return ::wcstof_l(str, str_end, cloc);
                   ~~^~~~~~~~
                     wcstold_l
/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/wchar.h:191:13: note: 'wcstold_l' declared here
long double wcstold_l(const wchar_t* __s, wchar_t** __end_ptr, locale_t __l) __INTRODUCED_IN(21);
            ^
/mnt/vcpkg-ci/b/scnlib/src/v2.0.0-cc5e6bd45f.clean/src/scn/impl/reader/float_reader.cpp:275:22: error: no member named 'wcstod_l' in the global namespace; did you mean 'wcstold_l'?
            return ::wcstod_l(str, str_end, cloc);
                   ~~^~~~~~~~
                     wcstold_l
/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/wchar.h:191:13: note: 'wcstold_l' declared here
long double wcstold_l(const wchar_t* __s, wchar_t** __end_ptr, locale_t __l) __INTRODUCED_IN(21);


and from /android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/wchar.h we can see those functions are only supported on ANDROID_API >= 28

131 │ #if ANDROID_API >= 28
132 │ double wcstod_l(const wchar_t* __s, wchar_t** __end_ptr, locale_t __l) __INTRODUCED_IN(28);
133 │ #endif /* ANDROID_API >= 28 */

141 │ #if ANDROID_API >= 28
142 │ float wcstof_l(const wchar_t* __s, wchar_t** __end_ptr, locale_t __l) __INTRODUCED_IN(28);
143 │ #endif /* ANDROID_API >= 28 */

@jiayuehua
Copy link
Contributor Author

microsoft/vcpkg#36459

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7e014d4) 79.25% compared to head (fdf07a5) 79.25%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #99   +/-   ##
=======================================
  Coverage   79.25%   79.25%           
=======================================
  Files          57       57           
  Lines        3952     3952           
=======================================
  Hits         3132     3132           
  Misses        820      820           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eliaskosunen
Copy link
Owner

Merged to master in 6079d84, thanks!

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.

None yet

2 participants