temporary holdover for backward compatibility
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 16 Feb 1990 05:12:56 +0000 (21:12 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 16 Feb 1990 05:12:56 +0000 (21:12 -0800)
SCCS-vsn: sys/sys/dir.h 7.1

usr/src/sys/sys/dir.h [new file with mode: 0644]

diff --git a/usr/src/sys/sys/dir.h b/usr/src/sys/sys/dir.h
new file mode 100644 (file)
index 0000000..4c07123
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 1982, 1986, 1989 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *     @(#)dir.h       7.1 (Berkeley) %G%
+ */
+
+/*
+ * The information in this file should be obtained from <dirent.h>
+ * and is provided solely (and temporarily) for backward compatibility.
+ */
+
+#ifndef _DIRENT_
+
+#include <dirent.h>
+
+/*
+ * Backwards compatibility.
+ */
+#define direct dirent
+
+/*
+ * The DIRSIZ macro gives the minimum record length which will hold
+ * the directory entry.  This requires the amount of space in struct direct
+ * without the d_name field, plus enough space for the name with a terminating
+ * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
+ */
+#undef DIRSIZ
+#define DIRSIZ(dp) \
+    ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
+
+#endif /* _DIRENT_ */