xref: /original-bsd/sys/sys/dir.h (revision 6b3572dd)
1 /*
2  * Copyright (c) 1982, 1986, 1989 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)dir.h	7.2 (Berkeley) 06/28/90
8  */
9 
10 /*
11  * The information in this file should be obtained from <dirent.h>
12  * and is provided solely (and temporarily) for backward compatibility.
13  */
14 
15 #ifndef _DIRENT_
16 
17 #include <dirent.h>
18 
19 /*
20  * Backwards compatibility.
21  */
22 #define direct dirent
23 
24 /*
25  * The DIRSIZ macro gives the minimum record length which will hold
26  * the directory entry.  This requires the amount of space in struct direct
27  * without the d_name field, plus enough space for the name with a terminating
28  * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
29  */
30 #undef DIRSIZ
31 #define DIRSIZ(dp) \
32     ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
33 
34 #endif /* _DIRENT_ */
35