blob: a53baa12c717ed5aeb76611157a431124cfa26e5 [file] [log] [blame]
#ifndef HAVE_STRNLEN
#include <sys/types.h>
#include <stdlib.h>
size_t gsh_strnlen(const char *s, size_t max)
{
register const char *p;
for (p = s; *p && max--; ++p)
/* do nothing */;
return p - s;
}
#endif