Changeset 620 in kBuild
- Timestamp:
- Nov 26, 2006 6:54:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kmkbuiltin/ftsfake.h
r370 r620 1 /* $NetBSD: fts.h,v 1.12 2005/02/03 04:39:32 perry Exp $ */ 2 1 3 /* 2 4 * Copyright (c) 1989, 1993 … … 11 13 * notice, this list of conditions and the following disclaimer in the 12 14 * documentation and/or other materials provided with the distribution. 13 * 3. All advertising materials mentioning features or use of this software 14 * must display the following acknowledgement: 15 * This product includes software developed by the University of 16 * California, Berkeley and its contributors. 17 * 4. Neither the name of the University nor the names of its contributors 15 * 3. Neither the name of the University nor the names of its contributors 18 16 * may be used to endorse or promote products derived from this software 19 17 * without specific prior written permission. … … 32 30 * 33 31 * @(#)fts.h 8.3 (Berkeley) 8/14/94 34 * $FreeBSD: src/include/fts.h,v 1.10 2004/05/12 21:38:39 peadar Exp $35 */36 37 /** @file38 * FreeBSD 5.339 * @changed bird: No whiteout, no fts_symfd. Replaced fts_rfd with fts_rdir40 32 */ 41 33 … … 49 41 dev_t fts_dev; /* starting device # */ 50 42 char *fts_path; /* path for this descent */ 51 #ifdef _MSC_VER52 char *fts_rdir; /* path of root */53 #else54 43 int fts_rfd; /* fd for root */ 55 #endif 56 int fts_pathlen; /* sizeof(path) */ 57 int fts_nitems; /* elements in the sort array */ 44 u_int fts_pathlen; /* sizeof(path) */ 45 u_int fts_nitems; /* elements in the sort array */ 58 46 int (*fts_compar) /* compare function */ 59 (const struct _ftsent * const *, const struct _ftsent * const*);47 (const struct _ftsent **, const struct _ftsent **); 60 48 61 49 #define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ … … 66 54 #define FTS_SEEDOT 0x020 /* return dot and dot-dot */ 67 55 #define FTS_XDEV 0x040 /* don't cross devices */ 68 #if !defined(__EMX__) && !defined(_MSC_VER)69 56 #define FTS_WHITEOUT 0x080 /* return whiteout information */ 70 #endif71 57 #define FTS_OPTIONMASK 0x0ff /* valid user option mask */ 72 58 … … 74 60 #define FTS_STOP 0x200 /* (private) unrecoverable error */ 75 61 int fts_options; /* fts_open options, global flags */ 76 void *fts_clientptr; /* thunk for sort function */77 62 } FTS; 78 63 … … 86 71 char *fts_path; /* root path */ 87 72 int fts_errno; /* errno for this node */ 88 #ifndef _MSC_VER89 73 int fts_symfd; /* fd for symlink */ 90 #endif91 74 u_short fts_pathlen; /* strlen(fts_path) */ 92 75 u_short fts_namelen; /* strlen(fts_name) */ … … 94 77 ino_t fts_ino; /* inode */ 95 78 dev_t fts_dev; /* device */ 79 #ifdef __LIBC12_SOURCE__ 80 u_int16_t fts_nlink; /* link count */ 81 #else 96 82 nlink_t fts_nlink; /* link count */ 83 #endif 97 84 98 85 #define FTS_ROOTPARENTLEVEL -1 … … 113 100 #define FTS_SL 12 /* symbolic link */ 114 101 #define FTS_SLNONE 13 /* symbolic link without target */ 115 #ifndef _MSC_VER116 102 #define FTS_W 14 /* whiteout object */ 117 #endif118 103 u_short fts_info; /* user flags for FTSENT structure */ 119 104 120 105 #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ 121 106 #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ 122 #ifndef _MSC_VER123 107 #define FTS_ISW 0x04 /* this is a whiteout object */ 124 #endif125 108 u_short fts_flags; /* private flags for FTSENT structure */ 126 109 … … 131 114 u_short fts_instr; /* fts_set() instructions */ 132 115 116 #ifdef __LIBC12_SOURCE__ 117 struct stat12 *fts_statp; /* stat(2) information */ 118 #else 133 119 struct stat *fts_statp; /* stat(2) information */ 134 char *fts_name; /* file name */ 135 FTS *fts_fts; /* back pointer to main FTS*/120 #endif 121 char fts_name[1]; /* file name */ 136 122 } FTSENT; 137 123 124 #include <sys/cdefs.h> 138 125 126 __BEGIN_DECLS 127 #ifdef __LIBC12_SOURCE__ 139 128 FTSENT *fts_children(FTS *, int); 140 129 int fts_close(FTS *); 141 void *fts_get_clientptr(FTS *);142 #define fts_get_clientptr(fts) ((fts)->fts_clientptr)143 FTS *fts_get_stream(FTSENT *);144 #define fts_get_stream(ftsent) ((ftsent)->fts_fts)145 130 FTS *fts_open(char * const *, int, 146 int (*)(const FTSENT * const *, const FTSENT * const*));131 int (*)(const FTSENT **, const FTSENT **)); 147 132 FTSENT *fts_read(FTS *); 148 133 int fts_set(FTS *, FTSENT *, int); 149 void fts_set_clientptr(FTS *, void *); 134 #else 135 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children13); 136 int fts_close(FTS *) __RENAME(__fts_close13); 137 FTS *fts_open(char * const *, int, 138 int (*)(const FTSENT **, const FTSENT **)) 139 __RENAME(__fts_open13); 140 FTSENT *fts_read(FTS *) __RENAME(__fts_read13); 141 int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set13); 142 #endif 143 __END_DECLS 150 144 151 145 #endif /* !_FTS_H_ */ 152
Note:
See TracChangeset
for help on using the changeset viewer.