[PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX
Gedare Bloom
gedare@rtems.org
Wed Jan 25 00:27:00 GMT 2017
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
>
More information about the Newlib
mailing list