Path: utzoo!attcan!uunet!longway!std-unix From: std-unix@longway.TIC.COM (Moderator, John S. Quarterman) Newsgroups: comp.std.unix Subject: Re: Query about Message-ID: <444@longway.TIC.COM> Date: 25 Nov 89 19:33:54 GMT References: <437@longway.TIC.COM> <438@longway.TIC.COM> <441@longway.TIC.COM> <442@longway.TIC.COM> Reply-To: Andy Tanenbaum Organization: VU Informatica, Amsterdam Lines: 17 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman) From: Andy Tanenbaum In article <442@longway.TIC.COM> gwyn@brl.arpa (Doug Gwyn) writes: >That's what happens when programmers assume things that are not promised >by the standards. I don't follow. What is it that that the standards don't promise. Surely a programmer may declare a struct dirent, since readdir() returns a pointer to one of them. Furthermore, a programmer may assume that d_name is an array of characters that can hold a file name. I don't see how you can put a file name in 1 character. I don't see any alternative than to allocate NAME_MAX+1 characters there. Why doesn't the standard require to have as a prerequisite, so that NAME_MAX is at least known. Andy Tanenbaum (ast@cs.vu.nl) Volume-Number: Volume 17, Number 72