Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!longway!std-unix From: std-unix@longway.TIC.COM (Moderator, John S. Quarterman) Newsgroups: comp.std.unix Subject: Query about Message-ID: <437@longway.TIC.COM> Date: 22 Nov 89 11:38:36 GMT Reply-To: Andy Tanenbaum Organization: VU Informatica, Amsterdam Lines: 34 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman) From: Andy Tanenbaum The header is required by P1003.1 to have a field d_name [] Now the question arises about what size to use there. One possibility is d_name[NAME_MAX+1] However, doing this means that must be included. As far as I can see, the following is a conforming application: #include main() { (void) opendir("/usr"); } If one uses NAME_MAX in , we have a conforming application that won't even compile. Another solution is to put #define _NAME_MAX 14 in and use that (assuming the result of the discussion on name space pollution permits this). It might work, but it is hardly elegant. What's an implementer to do? Andy Tanenbaum (ast@cs.vu.nl) Volume-Number: Volume 17, Number 65