Date: Tue, 12 Feb 2013 21:20:54 +0100 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: strnlen function in formats.c I renamed it to fmt_strnlen and kept it in formats.c for now - but I changed so we always use it and don't bother trying to detect whether system has one or not. It's not performance sensitive in current use. magnum On 12 Feb, 2013, at 18:22 , "jfoug" <jfoug@....net> wrote: > A better change, might be to put it in misc, and to use a unique name, that > will not impact any compiler's libs. > > Something like size_t jstrnlen(const char *s, size_t max), building that as > a 'real' function in misc, and then changing the usages in format to use > that instead. > > I am pretty sure the function I put into format.c is pretty fast, and > stable, it could simply be moved to misc.c and renamed. > > Jim. > > From: Erik Winkler >> Testing the latest Jumbo with on iMac G5 running MacOS 10.5 I get an error > regarding the strnlen function. Apparently it does not exist on 10.5. >> >> Undefined symbols: >> "_strnlen", referenced from: >> _fmt_self_test in formats.o >> _fmt_self_test in formats.o >> ld: symbol(s) not found >> >> I corrected this by adding || (__APPLE__) to the if defined statement for > strnlen. Probably only needs to be done for 10.5 and below, but I don't > have 10.6 available to test it. The strnlen function is nonexistent or > broken >is some UNIX flavors, so maybe you want to think about making this a > permanent change. >> >> Regards, >> Erik > >
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.