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.3 (Berkeley) 02/05/91 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 _DIR_H_ 16 #define _DIR_H_ 17 18 #include <dirent.h> 19 20 /* 21 * Backwards compatibility. 22 */ 23 #define direct dirent 24 25 /* 26 * The DIRSIZ macro gives the minimum record length which will hold 27 * the directory entry. This requires the amount of space in struct direct 28 * without the d_name field, plus enough space for the name with a terminating 29 * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. 30 */ 31 #undef DIRSIZ 32 #define DIRSIZ(dp) \ 33 ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) 34 35 #endif /* !_DIR_H_ */ 36