This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX
- From: Gedare Bloom <gedare at rtems dot org>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 24 Jan 2017 19:27:17 -0500
- Subject: Re: [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX
- Authentication-results: sourceware.org; auth=none
- References: <1485248642-11921-1-git-send-email-sebastian.huber@embedded-brains.de>
Suggest to fix the spelling of MAXNAMLEN in the commit message so that
(git log | grep) works.
On Tue, Jan 24, 2017 at 4:04 AM, Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
> Override MAXNAMELEN definition in <dirent.h> and make sure it equals
> NAME_MAX.
>
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
> newlib/libc/sys/rtems/include/sys/dirent.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/newlib/libc/sys/rtems/include/sys/dirent.h b/newlib/libc/sys/rtems/include/sys/dirent.h
> index 5a3a54d..47a0c8f 100644
> --- a/newlib/libc/sys/rtems/include/sys/dirent.h
> +++ b/newlib/libc/sys/rtems/include/sys/dirent.h
> @@ -50,6 +50,10 @@ struct dirent {
> char d_name[NAME_MAX + 1];
> };
>
> +#if __BSD_VISIBLE
> +#define MAXNAMLEN NAME_MAX
> +#endif
> +
> int scandir ( const char *dirname,
> struct dirent *** namelist,
> int (*select)(const struct dirent *),
> --
> 1.8.4.5
>