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: uses libc iconv on FreeBSD #1381

Merged

Conversation

shenlebantongying
Copy link
Collaborator

The GNU libiconv has this thing that rename iconv_open to libiconv_open when LIBICONV_PLUG not defined.

image

The flag LIBICONV_PLUG effectively turns GNU libiconv's header to the base system's iconv header. This might be abuse, but SDL also does this.

https://github.com/libsdl-org/SDL/blob/d6ebbc2fa4abdbe0bd53d0ce8804a492ecb042b9/src/stdlib/SDL_iconv.c#L27-L28

Combined with #1380 should close #1369

Is FreeBSD's libc iconv good enough?

Based on the early design doc of FreeBSD's Iconv, it supports a similar dynamic loading mechanism to GNU libconv so encoding supports should not be a problem.

http://citrus.bsdclub.org/

One can add new locale and encoding without recompiling system libraries by dynamic linking.

Copy link

sonarcloud bot commented Jan 25, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@shenlebantongying shenlebantongying merged commit 4304fc9 into xiaoyifang:staged Jan 25, 2024
13 checks passed
@shenlebantongying shenlebantongying deleted the use-libc-iconv-freebsd branch March 21, 2024 22:28
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

1 participant