diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-06-04 18:31:57 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-06-04 18:31:57 +0000 |
commit | 09e967c2d732783b2579e4e120cd9b608404cb00 (patch) | |
tree | 8d2783a6a7e33608c6012efd6a88b8f5694df81d /mdk-stage1/dietlibc/include/dirent.h | |
parent | 18fcff49d3c836697d3b75a3d01d31c700e69974 (diff) | |
download | drakx-09e967c2d732783b2579e4e120cd9b608404cb00.tar drakx-09e967c2d732783b2579e4e120cd9b608404cb00.tar.gz drakx-09e967c2d732783b2579e4e120cd9b608404cb00.tar.bz2 drakx-09e967c2d732783b2579e4e120cd9b608404cb00.tar.xz drakx-09e967c2d732783b2579e4e120cd9b608404cb00.zip |
Merge from R9_0-AMD64, most notably:
- AMD64 support to insmod-busybox, minilibc, et al.
- Sync with insmod-modutils 2.4.19 something but everyone should use
dietlibc nowadays
- Factor out compilation and prefix with $(DIET) for dietlibc builds
- 64-bit & varargs fixes
Diffstat (limited to 'mdk-stage1/dietlibc/include/dirent.h')
-rw-r--r-- | mdk-stage1/dietlibc/include/dirent.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/mdk-stage1/dietlibc/include/dirent.h b/mdk-stage1/dietlibc/include/dirent.h index b0ad4f5ec..ad8b3a41a 100644 --- a/mdk-stage1/dietlibc/include/dirent.h +++ b/mdk-stage1/dietlibc/include/dirent.h @@ -3,15 +3,30 @@ #include <sys/cdefs.h> #include <sys/types.h> +#include <limits.h> -#include <linux/dirent.h> +struct dirent { + long d_ino; + off_t d_off; + unsigned short d_reclen; + char d_name[256]; /* We must not include limits.h! */ +}; + +#ifndef __STRICT_ANSI__ +struct dirent64 { + uint64_t d_ino; + int64_t d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; +}; +#endif #define d_fileno d_ino /* Backwards compatibility. */ #undef _DIRENT_HAVE_D_NAMLEN #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF -#define _DIRENT_HAVE_D_TYPE typedef struct __dirstream DIR; @@ -23,4 +38,27 @@ void rewinddir (DIR *__dirp) __THROW; void seekdir (DIR *__dirp, long int __pos) __THROW; long int telldir (DIR *__dirp) __THROW; +int scandir(const char *dir, struct dirent ***namelist, + int (*selection)(const struct dirent *), + int (*compar)(const struct dirent **, const struct dirent **)) __THROW; +int scandir64(const char *dir, struct dirent64 ***namelist, + int (*selection)(const struct dirent64 *), + int (*compar)(const struct dirent64 **, const struct dirent64 **)) __THROW; + +int alphasort(const struct dirent **a, const struct dirent **b) __THROW __attribute__((const)); +int alphasort64(const struct dirent64 **a, const struct dirent64 **b) __THROW __attribute__((const)); + +#define MAXNAMLEN NAME_MAX + +#ifdef _BSD_SOURCE +extern int dirfd(DIR *dirp) __THROW; +#endif + +#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 +#define dirent dirent64 +#define readdir readdir64 +#define scandir scandir64 +#define alphasort alphasort64 +#endif + #endif |