public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Cc: Sebastian Huber <sebastian.huber@embedded-brains.de>
Subject: [PATCH] RTEMS: Harmonize MAXNAMELEN and NAME_MAX
Date: Tue, 24 Jan 2017 09:04:00 -0000	[thread overview]
Message-ID: <1485248642-11921-1-git-send-email-sebastian.huber@embedded-brains.de> (raw)

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

             reply	other threads:[~2017-01-24  9:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24  9:04 Sebastian Huber [this message]
2017-01-25  0:27 ` Gedare Bloom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485248642-11921-1-git-send-email-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).