From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2820 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: strcasestr.c Date: Thu, 21 Feb 2013 00:56:51 +0100 Message-ID: <20130220235651.GV6181@port70.net> References: <201302141459.r1EExuU3024259@core.courtesan.com> <20130214152349.GA20323@brightrain.aerifal.cx> <20130217190452.GH20323@brightrain.aerifal.cx> <51254E0F.7010206@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1361404622 2073 80.91.229.3 (20 Feb 2013 23:57:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 23:57:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2821-gllmg-musl=m.gmane.org@lists.openwall.com Thu Feb 21 00:57:25 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U8JXQ-000112-8r for gllmg-musl@plane.gmane.org; Thu, 21 Feb 2013 00:57:24 +0100 Original-Received: (qmail 25638 invoked by uid 550); 20 Feb 2013 23:57:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25630 invoked from network); 20 Feb 2013 23:57:03 -0000 Content-Disposition: inline In-Reply-To: <51254E0F.7010206@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2820 Archived-At: * John Spencer [2013-02-20 23:28:31 +0100]: > On 02/17/2013 08:04 PM, Rich Felker wrote: > >On Thu, Feb 14, 2013 at 10:23:49AM -0500, Rich Felker wrote: > >>On Thu, Feb 14, 2013 at 09:59:56AM -0500, Todd C. Miller wrote: > >>>When investigating using the musl strstr.c ofr OpenBSD I noticed > >>>that musl only has a stub for strcasestr() that calls strstr(). > > according to git log, this function dates back to the very first > musl commit ever... > > >Since strcasestr is nonstandard and not clearly specified, > > it's so non-standard that even nobody uses it. > i looked up the usage of the function in codesearch.debian.net, and > the only *user* (from all ~20K debian packages) of the function is > gnu wget. it seems wget only use it for str = strcasestr(str, "charset="); when parsing text mime headers i'll just note here that glibc has sse4.2 optimization for strcasestr.. in case someone runs into performance troubles finding the charset in mime headers.. (they tolower by 16bytes and find match with vectorized operations)