This is the mail archive of the
newlib-cvs@sourceware.org
mailing list for the newlib project.
[newlib-cygwin] RTEMS: Harmonize MAXNAMLEN and NAME_MAX
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: newlib-cvs at sourceware dot org
- Date: 25 Jan 2017 11:37:39 -0000
- Subject: [newlib-cygwin] RTEMS: Harmonize MAXNAMLEN and NAME_MAX
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e692cfc121c76a14919752d2ac5e0f9f3e95d5bb
commit e692cfc121c76a14919752d2ac5e0f9f3e95d5bb
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Wed Jan 25 07:07:12 2017 +0100
RTEMS: Harmonize MAXNAMLEN and NAME_MAX
Override MAXNAMLEN definition in <dirent.h> and make sure it equals
NAME_MAX.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diff:
---
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 *),