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

Refactors miniposix into a compatibility layer. #820

Open
wants to merge 1 commit into
base: vanilla
Choose a base branch
from

Conversation

OmniBlade
Copy link
Contributor

Inital implementation is aimed mostly at windows.
Intention is to provide layer for ports to implement missing C runtime
functions going forward.

@OmniBlade OmniBlade force-pushed the refactor/compat branch 4 times, most recently from 0821e66 to c2167aa Compare July 22, 2022 14:36
Inital implementation is aimed mostly at windows.
Intention is to provide layer for ports to implement missing C runtime
functions going forward.
@@ -19,7 +19,7 @@ SOFTWARE.
*/
#include <strings.h>

extern inline void explicit_bzero(void *s, size_t n);
extern inline void explicit_bzero(void* s, size_t n);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like only strcasecmp and strncasecmp are used, so it might be worth moving those into string.h and removing the rest of the functions in these two files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strcasecmp is in the posix header strings.h so assuming we were to standardise on that you would want to just include that header unconditionally in all other code that uses those functions. Since pretty much all other platforms except windows have these functions there it makes sense for this header at least to exist. I can drop the strict reproduction of the other contents of the strings.h header of course if we don't use them.

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.

2 participants