From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86699 invoked by alias); 25 Aug 2017 06:21:39 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 86670 invoked by uid 89); 25 Aug 2017 06:21:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.2 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT autolearn=ham version=3.3.2 spammy=HTo:D*qq.com, Fax X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Aug 2017 06:21:36 +0000 Received: from [78.47.166.52] (helo=sslproxy04.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dl7zq-0006cw-01; Fri, 25 Aug 2017 08:21:34 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy04.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dl7zp-0002ZU-Py; Fri, 25 Aug 2017 08:21:33 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id CCC462A1677; Fri, 25 Aug 2017 08:22:14 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id shSq7j3AW33c; Fri, 25 Aug 2017 08:22:13 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 1070B2A0A9D; Fri, 25 Aug 2017 08:22:13 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id T5pCYt3_lSVK; Fri, 25 Aug 2017 08:22:13 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id A82012A166C; Fri, 25 Aug 2017 08:22:10 +0200 (CEST) Subject: Re: [PATCH v2 2/2] Port strnstr.c to newlib. To: Sichen Zhao <1473996754@qq.com>, newlib@sourceware.org Cc: gedare@rtems.org, joel@rtems.org, christian.mauderer@embedded-brains.de References: <1503641725-11948-1-git-send-email-1473996754@qq.com> <1503641725-11948-2-git-send-email-1473996754@qq.com> From: Sebastian Huber Message-ID: <5a878b0f-ddca-d997-3f3e-28312838f075@embedded-brains.de> Date: Fri, 25 Aug 2017 07:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1503641725-11948-2-git-send-email-1473996754@qq.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00875.txt.bz2 On 25/08/17 08:15, Sichen Zhao wrote: > --- > newlib/libc/include/string.h | 3 +++ > newlib/libc/string/Makefile.am | 1 + > newlib/libc/string/strnstr.c | 13 ++++++------- > 3 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h > index 7833aa1..304d8a5 100644 > --- a/newlib/libc/include/string.h > +++ b/newlib/libc/include/string.h > @@ -121,6 +121,9 @@ size_t _EXFUN(strnlen,(const char *, size_t)); > #if __BSD_VISIBLE > char *_EXFUN(strsep,(char **, const char *)); > #endif > +#if __BSD_VISIBLE > +char *_EXFUN(strnstr,(const char *, const char *, size_t)); > +#endif I would rather use the FreeBSD prototype: #if __BSD_VISIBLE char *strnstr(const char *, const char *, size_t) __pure; #endif This makes the strnstr.c modifications unnecessary. I think the _EXFUN()=20 stuff is deprecated. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG.