first pass at function prototypes with cdefs.h
[unix-history] / usr / src / sys / sys / dir.h
CommitLineData
5701928c
KM
1/*
2 * Copyright (c) 1982, 1986, 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
6dc0e27a 5 * %sccs.include.redist.c%
5701928c 6 *
91befe9c 7 * @(#)dir.h 7.3 (Berkeley) %G%
5701928c
KM
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
91befe9c
KB
15#ifndef _DIR_H_
16#define _DIR_H_
5701928c
KM
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
91befe9c 35#endif /* !_DIR_H_ */