This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Mismatch between NAME_MAX and MAXNAMLEN


RTEMS users observe a problem with scandir() arising from difference
between NAME_MAX and MAXNAMLEN. MAXNAMLEN is defined in
libc/include/dirent.h. Our user's bug report is here [1].

MAXNAMLEN probably should agree with NAME_MAX according to [2].

We could change libc/include/dirent.h by adding:
#if defined(NAME_MAX)
#define MAXNAMLEN NAME_MAX
#else
#define MAXNAMLEN 1024
#endif

Or define MAXNAMLEN in RTEMS specific limits.h or syslimits.h headers.
But probably this mismatch can affect others.

What is preferred?

Gedare

[1] https://devel.rtems.org/ticket/1394
[2] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]