From 6a69d7fc632129310b76dd373379261420fadebf Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 28 Nov 2012 11:34:13 +0000 Subject: libc/sysdeps: Add new interfaces for new architectures Signed-off-by: Markos Chandras Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common-generic/bits/dirent.h | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 libc/sysdeps/linux/common-generic/bits/dirent.h (limited to 'libc/sysdeps/linux/common-generic/bits/dirent.h') diff --git a/libc/sysdeps/linux/common-generic/bits/dirent.h b/libc/sysdeps/linux/common-generic/bits/dirent.h new file mode 100644 index 000000000..74edd305d --- /dev/null +++ b/libc/sysdeps/linux/common-generic/bits/dirent.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#ifndef _DIRENT_H +# error "Never use directly; include instead." +#endif + +#include +#include + +struct dirent + { +#ifndef __USE_FILE_OFFSET64 +# if __BYTE_ORDER == __LITTLE_ENDIAN + __U32_TYPE d_ino; + __U32_TYPE __pad1; + __S32_TYPE d_off; + __S32_TYPE __pad2; +# else + __U32_TYPE __pad1; + __U32_TYPE d_ino; + __S32_TYPE __pad2; + __S32_TYPE d_off; +# endif /* __LITTLE_ENDIAN */ +#else + __U64_TYPE d_ino; + __S64_TYPE d_off; +#endif + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + } __ARCH_64BIT_ALIGNMENT__; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __U64_TYPE d_ino; + __S64_TYPE d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; +#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 -- cgit v1.2.3