Annotation of 43BSDReno/contrib/isode-beta/h/sys.dirent.h, revision 1.1

1.1     ! root        1: /*
        !             2:        <sys/dirent.h> -- file system independent directory entry (SVR3)
        !             3: 
        !             4:        last edit:      25-Apr-1987     D A Gwyn
        !             5: 
        !             6:        prerequisite:   <sys/types.h>
        !             7: */
        !             8: 
        !             9: 
        !            10: /* The following nonportable ugliness could have been avoided by defining
        !            11:    DIRENTSIZ and DIRENTBASESIZ to also have (struct dirent *) arguments. */
        !            12: #define        DIRENTBASESIZ           (((struct dirent *)0)->d_name \
        !            13:                                - (char *)&((struct dirent *)0)->d_ino)
        !            14: #define        DIRENTSIZ( namlen )     ((DIRENTBASESIZ + sizeof(long) + (namlen)) \
        !            15:                                / sizeof(long) * sizeof(long))
        !            16: 
        !            17: /* DAG -- the following was moved from <dirent.h>, which was the wrong place */
        !            18: #define        MAXNAMLEN       512             /* maximum filename length */
        !            19: 
        !            20: #ifndef NAME_MAX
        !            21: #define        NAME_MAX        (MAXNAMLEN - 1) /* DAG -- added for POSIX */
        !            22: #endif
        !            23: 
        !            24: 
        !            25: #ifdef dirent
        !            26: #undef dirent
        !            27: #endif
        !            28: struct dirent                          /* data from getdents()/readdir() */
        !            29:        {
        !            30: #ifdef apollo
        !            31:        long    d_ino;                  /* inode number of entry */
        !            32:        unsigned short  d_reclen;               /* length of this record */
        !            33:        unsigned short  d_namlen;               /* length of string in d_name */
        !            34:        off_t   d_off;                  /* offset of disk directory entry */
        !            35:        char    d_name[MAXNAMLEN + 1];  /* name must be no longer than this */
        !            36: #else
        !            37:        long            d_ino;          /* inode number of entry */
        !            38:        off_t           d_off;          /* offset of disk directory entry */
        !            39:        unsigned short  d_reclen;       /* length of this record */
        !            40:        char            d_name[1];      /* name of file */      /* non-POSIX */
        !            41: #endif
        !            42:        };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.