headers/libc: remove largefile interfaces
[unleashed.git] / include / ftw.h
blob518da49fad17e63f0cca92ff3024a57158256000
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 /* Copyright (c) 1988 AT&T */
29 /* All Rights Reserved */
32 #ifndef _FTW_H
33 #define _FTW_H
35 #include <sys/feature_tests.h>
37 #include <sys/types.h>
38 #include <sys/stat.h>
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
45 * Codes for the third argument to the user-supplied function.
48 #define FTW_F 0 /* file */
49 #define FTW_D 1 /* directory */
50 #define FTW_DNR 2 /* directory without read permission */
51 #define FTW_NS 3 /* unknown type, stat failed */
52 #define FTW_SL 4 /* symbolic link */
53 #define FTW_DP 6 /* directory */
54 #define FTW_SLN 7 /* symbolic link that points to nonexistent file */
55 #define FTW_DL 8 /* private interface for find utility */
58 * Codes for the fourth argument to nftw. You can specify the
59 * union of these flags.
62 #define FTW_PHYS 01 /* use lstat instead of stat */
63 #define FTW_MOUNT 02 /* do not cross a mount point */
64 #define FTW_CHDIR 04 /* chdir to each directory before reading */
65 #define FTW_DEPTH 010 /* call descendents before calling the parent */
66 #define FTW_ANYERR 020 /* return FTW_NS on any stat failure */
67 #define FTW_HOPTION 040 /* private interface for find utility */
68 #define FTW_NOLOOP 0100 /* private interface for find utility */
70 #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || defined(_XPG4_2)
71 struct FTW
73 int __quit;
74 int base;
75 int level;
77 #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) ... */
80 * legal values for quit
83 #define FTW_SKD 1
84 #define FTW_FOLLOW 2
85 #define FTW_PRUNE 4
87 extern int ftw(const char *,
88 int (*)(const char *, const struct stat *, int), int);
89 extern int _xftw(int, const char *,
90 int (*)(const char *, const struct stat *, int), int);
91 #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || defined(_XPG4_2)
92 extern int nftw(const char *,
93 int (*)(const char *, const struct stat *, int, struct FTW *),
94 int, int);
95 #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) ... */
97 #define _XFTWVER 2 /* version of file tree walk */
99 #ifdef __cplusplus
101 #endif
103 #endif /* _FTW_H */