-
Notifications
You must be signed in to change notification settings - Fork 106
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
WIP: Change gettext stubs to fix build without gettext. #50
WIP: Change gettext stubs to fix build without gettext. #50
Conversation
These changes are required to build audacious on FreeBSD when passing --disable-nls to configure. - Change _() to strip const from the string. This one is used in https://github.com/audacious-media-player/audacious/blob/73a881fb59bb27f60654b63a95d8c3de73a026ae/src/libaudgui/infowin.cc#L265 It fails due to the const qualifier - Add a gettext() stub This is used in https://github.com/audacious-media-player/audacious/blob/73a881fb59bb27f60654b63a95d8c3de73a026ae/src/libaudgui/prefs-window.cc#L534 Which does not look FreeBSD specific.
Thanks in advance for any feedback. |
- Updating main port and plugins together - Add patch to make build succeed when NLS option is off [1] [1] submitted upstream: audacious-media-player/audacious#50
Casting away |
I believe the call to |
I'm not very fluent in C++, so I need to study a little to do what you suggest. For this reason I'm marking this as WIP in the while. |
Thinking about this, first of all I can't find any reference regarding But I was thinking that using a simple Gettext accepts a Correct thing to do would be to perform an strcpy like operation (preferably using a safe replacement like strlcpy) to a newly allocated Not sure where and when such memory should be freed though. |
I also discovered this from getext man page:
Which would mean that simply stripping the const is not really that much different from what gettext is actually doing. |
As mentioned in the I've implemented a fix in e6e9016. Thanks for bringing the issue to our attention! |
These changes are required to build audacious on FreeBSD when passing --disable-nls to configure.
This one is used in
audacious/src/libaudgui/infowin.cc
Line 265 in 73a881f
It fails due to the const qualifier
This is used in
audacious/src/libaudgui/prefs-window.cc
Line 534 in 73a881f
Which does not look FreeBSD specific.