public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX
@ 2017-01-24  9:04 Sebastian Huber
  2017-01-25  0:27 ` Gedare Bloom
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Huber @ 2017-01-24  9:04 UTC (permalink / raw)
  To: newlib; +Cc: Sebastian Huber

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX
  2017-01-24  9:04 [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX Sebastian Huber
@ 2017-01-25  0:27 ` Gedare Bloom
  0 siblings, 0 replies; 2+ messages in thread
From: Gedare Bloom @ 2017-01-25  0:27 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: newlib

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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-25  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24  9:04 [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX Sebastian Huber
2017-01-25  0:27 ` Gedare Bloom

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).