Path: utzoo!attcan!uunet!wuarchive!cs.utexas.edu!longway!std-unix From: mark@jhereg.Minnetech.MN.ORG (Mark H. Colburn) Newsgroups: comp.std.unix Subject: Re: Query about Message-ID: <443@longway.TIC.COM> Date: 24 Nov 89 12:58:23 GMT References: <437@longway.TIC.COM> Sender: std-unix@longway.TIC.COM Reply-To: mark@jhereg.Minnetech.MN.ORG (Mark H. Colburn) Organization: Open Systems Architects, Inc., Mpls, MN Lines: 26 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman) From: mark@jhereg.Minnetech.MN.ORG (Mark H. Colburn) In article <437@longway.TIC.COM> Andy Tanenbaum writes: >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] > At least three implementations that I know of define dname as follows: d_name[1]; And, they put it at the end of the strucutre. In this way, when the structure is allocated, the implementation may allocate enough space for the directory name, no matter what it is. For a good, publicly available example, you might want to check out Doug Gwyn's dirent library. -- Mark H. Colburn mark@Minnetech.MN.ORG Open Systems Architects, Inc. Volume-Number: Volume 17, Number 71