Skip to content

Commit

Permalink
Check if MinGW is defined and implement strsep().
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihaylov93 committed Oct 4, 2020
1 parent 5c75754 commit 40bfa92
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions simavr/sim/sim_utils.c
Expand Up @@ -27,6 +27,20 @@

#include "sim_utils.h"

#ifdef __MINGW32__
char *strsep(char **stringp, const char *delim) {
char *rv = *stringp;
if (rv) {
*stringp += strcspn(*stringp, delim);
if (**stringp)
*(*stringp)++ = '\0';
else
*stringp = 0;
}
return rv;
}
#endif

static argv_p
argv_realloc(
argv_p argv,
Expand Down

0 comments on commit 40bfa92

Please sign in to comment.