From: Jens Axboe Date: Wed, 23 Jan 2013 23:28:24 +0000 (-0700) Subject: windows: don't provide strsep(), fio already has one X-Git-Tag: fio-2.0.14~89 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=36744c7511b71defe1c60666ae175ec8a5ed22c8;ds=sidebyside windows: don't provide strsep(), fio already has one Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 7c12b016..f730dfdb 100755 --- a/configure +++ b/configure @@ -157,7 +157,6 @@ CYGWIN*) echo "CONFIG_CLOCK_MONOTONIC=y" >> $config_host_mak echo "CONFIG_GETTIMEOFDAY=y" >> $config_host_mak echo "CONFIG_FADVISE=y" >> $config_host_mak - echo "CONFIG_STRSEP=y" >> $config_host_mak echo "CONFIG_SOCKLEN_T=y" >> $config_host_mak echo "CONFIG_POSIX_FALLOCATE=y" >> $config_host_mak echo "CONFIG_FADVISE=y" >> $config_host_mak diff --git a/os/windows/posix.c b/os/windows/posix.c index f5d53001..67e71c8e 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -628,39 +628,6 @@ long long strtoll(const char *restrict str, char **restrict endptr, return _strtoi64(str, endptr, base); } -char *strsep(char **stringp, const char *delim) -{ - char *orig = *stringp; - BOOL gotMatch = FALSE; - int i = 0; - int j = 0; - - if (*stringp == NULL) - return NULL; - - while ((*stringp)[i] != '\0') { - j = 0; - while (delim[j] != '\0') { - if ((*stringp)[i] == delim[j]) { - gotMatch = TRUE; - (*stringp)[i] = '\0'; - *stringp = *stringp + i + 1; - break; - } - j++; - } - if (gotMatch) - break; - - i++; - } - - if (!gotMatch) - *stringp = NULL; - - return orig; -} - int poll(struct pollfd fds[], nfds_t nfds, int timeout) { struct timeval tv;