Skip to content

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.
#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