From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932790AbcFQSiR (ORCPT ); Fri, 17 Jun 2016 14:38:17 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40829 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751807AbcFQSiQ (ORCPT ); Fri, 17 Jun 2016 14:38:16 -0400 Subject: Re: [PATCH v2] lib: Make strreplace prototype compatible with C++ To: Matt Ullman , Linus Torvalds References: <20160617172412.9644-1-staticfox@staticfox.net> Cc: linux-kernel@vger.kernel.org From: Randy Dunlap Message-ID: <57644395.9010505@infradead.org> Date: Fri, 17 Jun 2016 11:38:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160617172412.9644-1-staticfox@staticfox.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/17/16 10:24, Matt Ullman wrote: > Since "new" is a keyword in C++, this breaks compilation when string.h > is included in a C++ file. For example, this affects VirtualBox Guest > Additions. > > https://www.virtualbox.org/pipermail/vbox-dev/2015-August/013368.html > > Signed-off-by: Matt Ullman > --- > Thanks for your feedback and I agree. I've made the requested changes. I didn't see and could not find any reply to v1. Who is that comment addressed to? Linus? fwiw, I prefer v1 of the patch. and so does scripts/kernel-doc. > include/linux/string.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/string.h b/include/linux/string.h > index 26b6f6a..1e5183b 100644 > --- a/include/linux/string.h > +++ b/include/linux/string.h > @@ -115,7 +115,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t); > extern void * memchr(const void *,int,__kernel_size_t); > #endif > void *memchr_inv(const void *s, int c, size_t n); > -char *strreplace(char *s, char old, char new); > +char *strreplace(char *, char, char); > > extern void kfree_const(const void *x); > > -- ~Randy