From: Sichen Zhao <1473996754@qq.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>,
newlib@sourceware.org
Cc: gedare@rtems.org, joel@rtems.org, christian.mauderer@embedded-brains.de
Subject: Re: [PATCH v2 2/2] Port strnstr.c to newlib.
Date: Fri, 25 Aug 2017 07:36:00 -0000 [thread overview]
Message-ID: <2dff1cfb-0225-f8ab-3add-bbcf9e60ed99@qq.com> (raw)
In-Reply-To: <5a878b0f-ddca-d997-3f3e-28312838f075@embedded-brains.de>
> 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() stuff is deprecated.
>
Ok, i see.
prev parent reply other threads:[~2017-08-25 7:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 6:21 [PATCH v2 1/2] Import strnstr.c from FreeBSD Sichen Zhao
2017-08-25 6:16 ` [PATCH v2 2/2] Port strnstr.c to newlib Sichen Zhao
2017-08-25 7:23 ` Sebastian Huber
2017-08-25 7:36 ` Sichen Zhao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2dff1cfb-0225-f8ab-3add-bbcf9e60ed99@qq.com \
--to=1473996754@qq.com \
--cc=christian.mauderer@embedded-brains.de \
--cc=gedare@rtems.org \
--cc=joel@rtems.org \
--cc=newlib@sourceware.org \
--cc=sebastian.huber@embedded-brains.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).