From owner-svn-src-all@freebsd.org Tue Aug 11 06:00:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1FED99D421; Tue, 11 Aug 2015 06:00:53 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A9F699D9; Tue, 11 Aug 2015 06:00:53 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.home.us.delphij.net (c-71-202-112-39.hsd1.ca.comcast.net [71.202.112.39]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 4F1361282D; Mon, 10 Aug 2015 23:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1439272846; x=1439287246; bh=sm8vGl9CqoaO4cbVDz4mjN3AUGNcKKgRwbDFR/Rlpbk=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=trWWtETQYqFtuSfcJolAtvu5SQB72yOSWQB/42o0CIxWh5NlIMTzvC81bcOYRcQI4 u84Fk6kKzv6oOqWaCRwGNSlWiEfgxrAKedTGvk9x3dnQL/r5WvDKYcuml88SiQy6dZ 3GyJ5knh7UluA3dWbldkTckaj/ld+YHv5+oQizvU= Subject: Re: svn commit: r286601 - head/usr.bin/patch To: Ed Schouten , d@delphij.net References: <201508102131.t7ALVo5J050735@repo.freebsd.org> <55C931CE.3030806@delphij.net> Cc: Xin LI , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Xin Li Message-ID: <55C98F8B.4020103@delphij.net> Date: Mon, 10 Aug 2015 23:00:43 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2015 06:00:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 8/10/15 22:51, Ed Schouten wrote: > 2015-08-11 1:20 GMT+02:00 Xin Li : >> Do you have a better solution for this? No, this is not ideal >> but I didn't find a better alternative (or maybe I have missed >> something obvious?) >> >> I think with the current POSIX definition of the interface, we >> have only two options: either strdup() or cast away const (I'd >> rather hide this kind of uglyness in the library), no? > > Casting const away should be all right in this case. Committed as r286617, please let me know if you want other changes, etc. Perhaps we should convert the tree over time to use __DECONST instead then? Cheers, -----BEGIN PGP SIGNATURE----- iQIbBAEBCgAGBQJVyY+KAAoJEJW2GBstM+nsI4MP+LG3zqlTe2UvL+AL03K2LECM 3qXdiDjkFEhlmyTJ4lQIO2BgqOfQSvxkxaeCs8mMYuOSyPFVmk9tYgS57QKkcoPq rqDCD+w8P0njzvC+PhD5FNBaY0PEq3uapyoqAMvbSMWKS6n4d1Mw5nHrWm3frkS4 filVI5ZBiP+FvxEYZIraqi/D9GFwsGDiaJoQFkn8KN/SjCq4nu01MMWXs9uwYFn7 dsf6xBiXw2XS5ugCQoJvE73EqtUQKNYXFLpqWFDfOroKPN+vILaZRgYeXERJazNh Sx8FWU97BioZhujn9XCS+68MLezS+5tN/ky6PAkcDpih3oW5z5q8E0wKHPR6UTKl 651d1NMfiP9bHYLErA2K8zl5iZ3LsIUikxeJE5nh33Mw02tgjlKkXbXq9AMen9Au Pcl7q09FYXf9RYmBbWrMfGaZdAlWpbP1DMKsVrKabXIXiKbieY+GF8knxJuuEdtS ZqxGlgXeMCWgRDix84ZYYqDSrJsEc0/0EyrlabLuTtf84Ax2xmtUGxt24O0y2S5u 8gJyji39ed0PneRAlPztFz0jiK++KmyLJOAI+cU3oNWoE+tIT+NwKWe7btZuR6A6 Oo0kGrTLX3VQkGOzRYiNd8NYOAGRzGppvuGsEEesAJF1NxX/Yu1rW9Cr7GQ9juWj 7/2k0+Nzy4p7i58Gkn4= =LyPN -----END PGP SIGNATURE-----