-
Notifications
You must be signed in to change notification settings - Fork 374
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
Add a musl compatible fallback for libc detection on Linux #1072
Conversation
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 isn't an approval or disapproval, just some observations, but I'm personally interested. I've never directly used musl before, but through zig and some os development research I at least know of it. At the very least making ACE slightly more platform agnostic can never a bad thing.
#define ACE_LACKS_ISCTYPE | ||
#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS | ||
|
||
// Following the example set by uclib undef some festures |
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.
I think would be better to actually fix these instead, which would benefit the ulibc support too. For example ACE_SCANDIR_CMP_USES_VOIDPTR
up on line 112 looks like it's just assuming __GLIBC__
is defined, so that could be fixed by adding an check for defined (__GLIBC__)
before trying to use it.
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.
I do not feel competent enough to perform this task. I would be thankful if this could be handled in another PR by someone else.
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.
That's understandable. ACE is a labyrinth of macros.
We switched from glibc to musl to ease the maintenance of a very old hardware. One of the advantages of musl is its Linux Kernel independence. It simply "works" with Kernels 2.6.39 and up and it can even be back ported to older Kernels with little effort: |
ACE_Dev_Poll_Reactor is using __uint32_t for no apparent reason. Since struct epoll_event.events is defined as uint32_t and using __uint32_t breaks compatibility with musl, __uint32_t should be replaced with uint32_t. But to conform with ACE Guidelines I'm using ACE_UINT32.
closed due to inactivity |
The libc detection code is very glibc centric. At the end of config-linux.h there was already a uclib fixup. I've added an additional section for musl.
Follow up to #914