Date: Sat, 15 Dec 2012 01:51:07 +0100 From: magnum <john.magnum@...hmail.com> To: "john-dev@...ts.openwall.com" <john-dev@...ts.openwall.com> Subject: Use of strnlen() While implementing --min-len (experimental, but committed) in wordlist.c I thought strnlen should be a lot quicker than strlen in many use cases. But I get this: wordlist.c: In function ‘dummy_rules_apply’: wordlist.c:211: warning: implicit declaration of function ‘strnlen’ This happens under OSX as well as Linux. The man page for OSX just says I should include string.h, which we do. The man page for Linux also mentions feature macros, which I have never really understood. I tried "#define _XOPEN_SOURCE 700" right before including string.h but it made no difference. Despite the warning, it works fine - but something is not right. What do I need to do? And this seem to be a late extension... is there any way I could conditionally use strnlen and fallback to strlen? magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.