diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-05-20 10:07:16 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-05-20 10:11:29 -0400 |
commit | 67975a5944706e382fe1e7b00d226715c6242358 (patch) | |
tree | e93dd37df57f49d4327567479521014f380206e5 /src/str.c | |
parent | 30c9945e0da19305ebad88a2835653ff4f409313 (diff) | |
download | stasis-67975a5944706e382fe1e7b00d226715c6242358.tar.gz |
Mass attempt at windows portability
Diffstat (limited to 'src/str.c')
-rw-r--r-- | src/str.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -2,7 +2,18 @@ * @file strings.c */ #include <unistd.h> -#include "str.h" +#include "omc.h" + +#if defined(OMC_OS_WINDOWS) +char *strsep(char **str, const char *delim) { + static char *last; + return strtok_r(*str, delim, &last); +} + +char *strndup(const char *str, size_t nelem) { + return calloc(nelem, sizeof(*str)); +} +#endif int num_chars(const char *sptr, int ch) { int result = 0; |