revert own commit 28662.
strnlen is a GNU extension according to http://unixpapa.com/incnote/string.html
This commit is contained in:
@@ -342,3 +342,9 @@ void BLI_timestr(double _time, char *str)
|
||||
str[11]=0;
|
||||
}
|
||||
|
||||
/* determine the length of a fixed-size string */
|
||||
size_t BLI_strnlen(const char *str, size_t maxlen)
|
||||
{
|
||||
const char *end = memchr(str, '\0', maxlen);
|
||||
return end ? (size_t) (end - str) : maxlen;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user