-
Notifications
You must be signed in to change notification settings - Fork 314
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
musl libc support #298
musl libc support #298
Conversation
musl has no macro, so it can not be detected straigthforward. HAVE_STRTOD_L tells that strdod_l() is available HAVE_LOCALE_H tells that the header locale.h is available
LGTM. But Dan is the expert on this subject. We should wait for him to review after he gets back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a moment, I was on the fence if we should use defined for all of these new macro references. However, it is not necessary and compile against glibc gives no warnings. I can add the parenthesis myself.
@@ -30,7 +30,7 @@ | |||
#include <sys/param.h> | |||
#endif | |||
|
|||
#if defined(__GLIBC__) && !defined(__APPLE__) | |||
#if defined(__GLIBC__) && !defined(__APPLE__) || HAVE_LOCALE_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have parenthesis to clarify the order of logical operations. && is higher precedence than ||:
#if (defined(__GLIBC__) && !defined(__APPLE__)) || HAVE_LOCALE_H
reverts: mltframework#298. There is no gurantee that either HAVE_STRTOD_L or HAVE_LOCALE_H will be defined at compile-time. Try for example building this project :) The locale usage is now defined in POSIX and therefore we can now assume it will be available on Linux, except for ancient systems. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html Another way of dealing with this would be to have a global mlt_config.h where HAVE_LOCALE_H and HAVE_STRTOD_L are defined to values determined when mlt is installed.
reverts: #298. There is no gurantee that either HAVE_STRTOD_L or HAVE_LOCALE_H will be defined at compile-time. Try for example building this project :) The locale usage is now defined in POSIX and therefore we can now assume it will be available on Linux, except for ancient systems. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html Another way of dealing with this would be to have a global mlt_config.h where HAVE_LOCALE_H and HAVE_STRTOD_L are defined to values determined when mlt is installed.
musl has no macro, so it can not be detected straigthforward.
HAVE_STRTOD_L tells that strdod_l() is available
HAVE_LOCALE_H tells that the header locale.h is available