Home | History | Annotate | Line # | Download | only in gen
compat___fts31.c revision 1.2.6.1
      1  1.2.6.1      yamt /*	$NetBSD: compat___fts31.c,v 1.2.6.1 2012/04/17 00:05:16 yamt Exp $	*/
      2      1.1  christos 
      3      1.1  christos #include "namespace.h"
      4      1.1  christos #include <sys/cdefs.h>
      5      1.1  christos #include <dirent.h>
      6      1.1  christos 
      7      1.2  christos #define	__LIBC12_SOURCE__
      8      1.2  christos 
      9      1.1  christos __warn_references(__fts_children31,
     10      1.1  christos     "warning: reference to compatibility __fts_children31();"
     11      1.1  christos     " include <fts.h> for correct reference")
     12      1.1  christos __warn_references(__fts_close31,
     13      1.1  christos     "warning: reference to compatibility __fts_close31();"
     14      1.1  christos     " include <fts.h> for correct reference")
     15      1.1  christos __warn_references(__fts_open31,
     16      1.1  christos     "warning: reference to compatibility __fts_open31();"
     17      1.1  christos     " include <fts.h> for correct reference")
     18      1.1  christos __warn_references(__fts_read31,
     19      1.1  christos     "warning: reference to compatibility __fts_read31();"
     20      1.1  christos     " include <fts.h> for correct reference")
     21      1.1  christos __warn_references(__fts_set31,
     22      1.1  christos     "warning: reference to compatibility __fts_set31();"
     23      1.1  christos     " include <fts.h> for correct reference")
     24      1.1  christos 
     25      1.1  christos #include <sys/stat.h>
     26      1.2  christos #include <compat/sys/time.h>
     27      1.2  christos #include <compat/sys/stat.h>
     28      1.1  christos 
     29      1.2  christos #define	__fts_stat_t	struct stat30
     30      1.1  christos #define	__fts_number_t	long
     31      1.2  christos #define	__fts_dev_t	uint32_t
     32      1.2  christos #define	__fts_level_t	short
     33      1.1  christos 
     34  1.2.6.1      yamt #ifndef ftsent_namelen_truncate
     35  1.2.6.1      yamt #define ftsent_namelen_truncate(a)	\
     36  1.2.6.1      yamt     ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
     37  1.2.6.1      yamt #endif
     38  1.2.6.1      yamt #ifndef ftsent_pathlen_truncate
     39  1.2.6.1      yamt #define ftsent_pathlen_truncate(a)	\
     40  1.2.6.1      yamt     ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
     41  1.2.6.1      yamt #endif
     42  1.2.6.1      yamt 
     43      1.2  christos #define	stat		__stat30
     44      1.2  christos #define	lstat		__lstat30
     45      1.2  christos #define	fstat		__fstat30
     46      1.2  christos 
     47      1.2  christos #undef	fts_children
     48      1.2  christos #define	fts_children __fts_children31
     49      1.2  christos #undef	fts_close
     50      1.2  christos #define	fts_close __fts_close31
     51      1.2  christos #undef	fts_open
     52      1.2  christos #define	fts_open  __fts_open31
     53      1.2  christos #undef	fts_read
     54      1.2  christos #define	fts_read __fts_read31
     55      1.2  christos #undef	fts_set
     56      1.2  christos #define	fts_set __fts_set31
     57      1.1  christos 
     58      1.1  christos #include <fts.h>
     59      1.1  christos #include <compat/include/fts.h>
     60      1.1  christos 
     61      1.2  christos #define	__FTS_COMPAT_LEVEL
     62      1.1  christos 
     63      1.1  christos #include "gen/fts.c"
     64