Date: Sat, 16 Jun 2012 08:38:54 -0500 From: "jfoug" <jfoug@....net> To: <john-dev@...ts.openwall.com> Subject: RE: Re: [patch] optional new raw sha1 implemetation >For memrchr, my man page says to define _GNU_SOURCE before including >string.h but that did not help. After looking at the header I define >__USE_GNU instead, and undef it after including string.h. Not sure >what's up with that? That will not be portable. Not all builds are gcc. Since this is in a non-hot area, we simply should scan backwards with a char pointer, and set it when we find it. Or simply keep the length, or scan forward. Or we could memset the buffer, make it large enough (17 chars at least), then simply scan from tail, and know when we get to the 80, that we are chopping off the right one. Jim.
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux - Powered by OpenVZ