From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 31 22:13:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD95E16A412 for ; Sun, 31 Dec 2006 22:13:16 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id BF55613C457 for ; Sun, 31 Dec 2006 22:13:16 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id kBVMDF8g086663 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 31 Dec 2006 14:13:15 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id kBVMDFnP086662; Sun, 31 Dec 2006 14:13:15 -0800 (PST) Received: from fbsd61 ([192.168.200.61]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA27673; Sun, 31 Dec 06 14:08:11 PST Date: Sun, 31 Dec 2006 14:09:55 -0800 From: perryh@pluto.rain.com To: dmw@unete.cl Message-Id: <45983533.nD9Vm0IfHU3DbCZC%perryh@pluto.rain.com> References: <45975e1c.zZgcyHPeHeBwZNlg%perryh@pluto.rain.com> <200612310937.55142.dmw@unete.cl> In-Reply-To: <200612310937.55142.dmw@unete.cl> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: how to deal with const X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2006 22:13:16 -0000 > If you need strstr(3) in your project is allready defined > in libkern. The implementation is identical, but using the > __DECONST macro. > > Take a look in /usr/src/sys/libkern/strstr.c for the function > definition and /usr/src/sys/geom/label/g_label.c for usage. > > The function prototype is defined in sys/libkern.h There's no strstr.c in my (6.1) libkern, but sys/cdefs.h does provide __DECONST and it certainly looks like the intended solution. Thanks for the pointer.