This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]