#define _GNU_SOURCE #include size_t strnlen(const char *s,size_t maxlen) { const char* max=s+maxlen; const char* orig=s; while (s