Skip to content

Commit 40bfa92

Browse files
committed
Check if MinGW is defined and implement strsep().
1 parent 5c75754 commit 40bfa92

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

simavr/sim/sim_utils.c

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@
2727

2828
#include "sim_utils.h"
2929

30+
#ifdef __MINGW32__
31+
char *strsep(char **stringp, const char *delim) {
32+
char *rv = *stringp;
33+
if (rv) {
34+
*stringp += strcspn(*stringp, delim);
35+
if (**stringp)
36+
*(*stringp)++ = '\0';
37+
else
38+
*stringp = 0;
39+
}
40+
return rv;
41+
}
42+
#endif
43+
3044
static argv_p
3145
argv_realloc(
3246
argv_p argv,

0 commit comments

Comments
 (0)