]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/blobdiff - libc/include/dirent.h
Merge "implement missing seekdir and telldir"
[android-sdk/platform-bionic.git] / libc / include / dirent.h
index 129cdfaeeeab597c3f6e1949e066487f2bc1ead5..63716a4b7cbcd108019d4f1139ba3b7040186a72 100644 (file)
@@ -46,28 +46,43 @@ __BEGIN_DECLS
 #define DT_WHT 14
 #endif
 
-struct dirent {
-  uint64_t         d_ino;
-  int64_t          d_off;
-  unsigned short   d_reclen;
-  unsigned char    d_type;
-  char             d_name[256];
-};
+#define __DIRENT64_BODY \
+    uint64_t         d_ino; \
+    int64_t          d_off; \
+    unsigned short   d_reclen; \
+    unsigned char    d_type; \
+    char             d_name[256]; \
+
+struct dirent { __DIRENT64_BODY };
+struct dirent64 { __DIRENT64_BODY };
+
+#undef __DIRENT64_BODY
+
+/* glibc compatibility. */
+#undef _DIRENT_HAVE_D_NAMLEN /* Linux doesn't have a d_namlen field. */
+#define _DIRENT_HAVE_D_RECLEN
+#define _DIRENT_HAVE_D_OFF
+#define _DIRENT_HAVE_D_TYPE
+
 #define d_fileno d_ino
-#define dirent64 dirent
 
 typedef struct DIR DIR;
 
 extern DIR* opendir(const char*);
 extern DIR* fdopendir(int);
 extern struct dirent* readdir(DIR*);
+extern struct dirent64* readdir64(DIR*);
 extern int readdir_r(DIR*, struct dirent*, struct dirent**);
+extern int readdir64_r(DIR*, struct dirent64*, struct dirent64**);
 extern int closedir(DIR*);
 extern void rewinddir(DIR*);
+extern void seekdir(DIR*, long);
+extern long telldir(DIR*);
 extern int dirfd(DIR*);
 extern int alphasort(const struct dirent**, const struct dirent**);
+extern int alphasort64(const struct dirent64**, const struct dirent64**);
 extern int scandir(const char*, struct dirent***, int (*)(const struct dirent*), int (*)(const struct dirent**, const struct dirent**));
-extern int getdents(unsigned int, struct dirent*, unsigned int);
+extern int scandir64(const char*, struct dirent64***, int (*)(const struct dirent64*), int (*)(const struct dirent64**, const struct dirent64**));
 
 __END_DECLS