From owner-freebsd-current Mon Nov 5 11:55:10 2001 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 74A9337B417 for ; Mon, 5 Nov 2001 11:55:07 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id fA5JsFf90126; Mon, 5 Nov 2001 14:54:15 -0500 (EST) (envelope-from wollman) Date: Mon, 5 Nov 2001 14:54:15 -0500 (EST) From: Garrett Wollman Message-Id: <200111051954.fA5JsFf90126@khavrinen.lcs.mit.edu> To: Hajimu UMEMOTO Cc: current@FreeBSD.ORG Subject: Re: About stscasestr() prototyped with string.h of current lib In-Reply-To: <20011102.220113.74678450.ume@mahoroba.org> References: <20011102.173604.78790653.nin@smtp.shikoku.ne.jp> <20011102120117.A87038@nagual.pp.ru> <20011102.220113.74678450.ume@mahoroba.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I think nin said that having strcasestr() in our standard header > breaks existing program. Those programs are wrong, since strcasestr() is in the Implementation Namespace. The correct code (assuming one is using autoconf-like feature testing) would look something like: #ifdef HAVE_STRCASESTR /* assume already included */ #define my_strcasestr(a, b) strcasestr((a), (b)) #else const char *my_strcasestr(const char *, const char *); #endif -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message