Refreshed the silly copy of <sys/dirent.h>. _KERNEL was still spelled
KERNEL, and the changes to remove the <sys/types.h> prerequisite had not reached here. Removed unused/wrong include of <sys/types.h> in synopsis.
This commit is contained in:
parent
f5ead3860a
commit
b6c7fd537e
|
@ -40,7 +40,6 @@
|
||||||
.Nm dirent
|
.Nm dirent
|
||||||
.Nd directory file format
|
.Nd directory file format
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Fd #include <sys/types.h>
|
|
||||||
.Fd #include <dirent.h>
|
.Fd #include <dirent.h>
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
Directories provide a convenient hierarchical method of grouping
|
Directories provide a convenient hierarchical method of grouping
|
||||||
|
@ -87,6 +86,8 @@ The directory entry format is defined in the file
|
||||||
#ifndef _SYS_DIRENT_H_
|
#ifndef _SYS_DIRENT_H_
|
||||||
#define _SYS_DIRENT_H_
|
#define _SYS_DIRENT_H_
|
||||||
|
|
||||||
|
#include <machine/ansi.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The dirent structure defines the format of directory entries returned by
|
* The dirent structure defines the format of directory entries returned by
|
||||||
* the getdirentries(2) system call.
|
* the getdirentries(2) system call.
|
||||||
|
@ -99,10 +100,10 @@ The directory entry format is defined in the file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct dirent {
|
struct dirent {
|
||||||
u_int32_t d_fileno; /* file number of entry */
|
__uint32_t d_fileno; /* file number of entry */
|
||||||
u_int16_t d_reclen; /* length of this record */
|
__uint16_t d_reclen; /* length of this record */
|
||||||
u_int8_t d_type; /* file type, see below */
|
__uint8_t d_type; /* file type, see below */
|
||||||
u_int8_t d_namlen; /* length of string in d_name */
|
__uint8_t d_namlen; /* length of string in d_name */
|
||||||
#ifdef _POSIX_SOURCE
|
#ifdef _POSIX_SOURCE
|
||||||
char d_name[255 + 1]; /* name must be no longer than this */
|
char d_name[255 + 1]; /* name must be no longer than this */
|
||||||
#else
|
#else
|
||||||
|
@ -139,7 +140,7 @@ struct dirent {
|
||||||
#define _GENERIC_DIRSIZ(dp) \
|
#define _GENERIC_DIRSIZ(dp) \
|
||||||
((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
|
((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
|
||||||
|
|
||||||
#ifdef KERNEL
|
#ifdef _KERNEL
|
||||||
#define GENERIC_DIRSIZ(dp) _GENERIC_DIRSIZ(dp)
|
#define GENERIC_DIRSIZ(dp) _GENERIC_DIRSIZ(dp)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue