diff --git a/winbuild/dist/include/winbuild.h b/winbuild/dist/include/winbuild.h index 24f15458..014f8461 100644 --- a/winbuild/dist/include/winbuild.h +++ b/winbuild/dist/include/winbuild.h @@ -131,6 +131,29 @@ inline void* memmem (void* buf, size_t buflen, void* pat, size_t patlen) return 0; } +#ifndef HAVE_STRSEP +inline char *strsep(char **stringp, const char *delim) +{ + char *res; + + if (!stringp || !*stringp || !**stringp) { + return NULL; + } + + res = *stringp; + while(**stringp && !strchr(delim, **stringp)) { + ++(*stringp); + } + + if (**stringp) { + **stringp = '\0'; + ++(*stringp); + } + + return res; +} +#endif + #define va_copy(a, b) memcpy(&(a), &(b), sizeof(va_list)) #define usleep(x) Sleep((x)/1000) diff --git a/winbuild/sgminer.vcxproj b/winbuild/sgminer.vcxproj index 9d3fb6bc..806b1694 100644 --- a/winbuild/sgminer.vcxproj +++ b/winbuild/sgminer.vcxproj @@ -273,6 +273,7 @@ + @@ -318,6 +319,7 @@ + @@ -328,6 +330,7 @@ + diff --git a/winbuild/sgminer.vcxproj.filters b/winbuild/sgminer.vcxproj.filters index 087ca83c..b0546660 100644 --- a/winbuild/sgminer.vcxproj.filters +++ b/winbuild/sgminer.vcxproj.filters @@ -212,6 +212,9 @@ Source Files\algorithm + + Source Files + @@ -379,6 +382,12 @@ Header Files\algorithm + + Header Files + + + Header Files +