8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libbc / inc / include / dirent.h
blob03a8891f7808854cdb8500b849892f5b121e80d5
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 1989 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984 AT&T */
28 /* All Rights Reserved */
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * Filesystem-independent directory information.
36 #ifndef __dirent_h
37 #define __dirent_h
39 #include <sys/types.h>
41 #ifndef _POSIX_SOURCE
42 #define d_ino d_fileno /* compatability */
43 #ifndef NULL
44 #define NULL 0
45 #endif
46 #endif /* !_POSIX_SOURCE */
49 * Definitions for library routines operating on directories.
51 typedef struct __dirdesc {
52 int dd_fd; /* file descriptor */
53 long dd_loc; /* buf offset of entry from last readddir() */
54 long dd_size; /* amount of valid data in buffer */
55 long dd_bsize; /* amount of entries read at a time */
56 long dd_off; /* Current offset in dir (for telldir) */
57 char *dd_buf; /* directory data buffer */
58 } DIR;
60 extern DIR *opendir(/* char *dirname */);
61 extern struct dirent *readdir(/* DIR *dirp */);
62 extern int closedir(/* DIR *dirp */);
63 #ifndef _POSIX_SOURCE
64 extern void seekdir(/* DIR *dirp, int loc */);
65 extern long telldir(/* DIR *dirp */);
66 #endif /* POSIX_SOURCE */
67 extern void rewinddir(/* DIR *dirp */);
69 #ifndef lint
70 #define rewinddir(dirp) seekdir((dirp), (long)0)
71 #endif
73 #include <sys/dirent.h>
75 #endif /* !__dirent_h */