[PATCH v2] RTEMS: Harmonize MAXNAMLEN and NAME_MAX

Corinna Vinschen vinschen@redhat.com
Wed Jan 25 11:38:00 GMT 2017


On Jan 25 07:07, Sebastian Huber wrote:
> Override MAXNAMLEN 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

Pushed.

Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20170125/ba9907aa/attachment.sig>


More information about the Newlib mailing list