mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 20:40:15 +00:00
removed strtok_r compat (Win)
Mingw-w64 implements strtok_r() and the macro was commented-out, anyways
This commit is contained in:
@@ -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)
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user