1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

Compatibility update for MSVS

Added an implementation of strsep() that should work with MSVS.
Hopefully resolves issue #278
This commit is contained in:
Yann St. Arnaud 2014-06-20 17:23:26 -04:00
parent 3f83f221fb
commit 83b2ac9ec7

View File

@ -70,6 +70,25 @@ static inline int setpriority(__maybe_unused int which, __maybe_unused int who,
return 0; return 0;
} }
//implement strsep() for windows
static char* strsep(char** stringp, const char* delim)
{
char* start = *stringp;
char* p;
p = ((start != NULL)?strpbrk(start, delim):NULL);
if(p == NULL)
*stringp = NULL;
else
{
*p = '\0';
*stringp = p + 1;
}
return start;
}
typedef unsigned long int ulong; typedef unsigned long int ulong;
typedef unsigned short int ushort; typedef unsigned short int ushort;
typedef unsigned int uint; typedef unsigned int uint;