removed strtok_r compat (Win)

Mingw-w64 implements strtok_r() and the macro was commented-out, anyways
This commit is contained in:
Martin Pulec
2023-08-10 08:25:32 +02:00
parent 34c48a15ca
commit 6c6253c9e2
2 changed files with 0 additions and 31 deletions

View File

@@ -300,7 +300,6 @@ AC_DEFUN([DEFINE_CUDA], [
AC_SUBST(DLL_LIBS)
AC_CHECK_FUNCS(usleep)
AC_CHECK_FUNCS(strtok_r)
AC_CHECK_FUNCS(timespec_get)
# ---------------------------------------------------------------------

View File

@@ -154,36 +154,6 @@ typedef DWORD gid_t;
extern "C" {
#endif
// MinGW-w64 defines some broken macro for strtok_r in pthread.h
// which can be accidently included before this resulting in compilation
// error
#undef strtok_r
#if 0
static inline char * strtok_r(char *str, const char *delim, char **save);
/*
* Public domain licensed code taken from:
* http://en.wikibooks.org/wiki/C_Programming/Strings#The_strtok_function
*/
static inline char *strtok_r(char *s, const char *delimiters, char **lasts)
{
char *sbegin, *send;
sbegin = s ? s : *lasts;
sbegin += strspn(sbegin, delimiters);
if (*sbegin == '\0') {
/* *lasts = ""; */
*lasts = sbegin;
return NULL;
}
send = sbegin + strcspn(sbegin, delimiters);
if (*send != '\0')
*send++ = '\0';
*lasts = send;
return sbegin;
}
#endif
int uname(struct utsname *);
int getopt(int, char * const *, const char *);
//int strncasecmp(const char *, const char*, int len);