am 3de1121e: Merge "Refresh header byteswap.h and dirent.h"
* commit '3de1121e22d78b2ab22f57a392e7204ed073907f': Refresh header byteswap.h and dirent.h
This commit is contained in:
@@ -28,7 +28,8 @@
|
||||
#ifndef _BYTESWAP_H_
|
||||
#define _BYTESWAP_H_
|
||||
|
||||
#include <sys/endian.h>
|
||||
/* endian.h rather than sys/endian.h so we get the machine-specific file. */
|
||||
#include <endian.h>
|
||||
|
||||
#define bswap_16(x) swap16(x)
|
||||
#define bswap_32(x) swap32(x)
|
||||
|
||||
@@ -51,28 +51,29 @@ __BEGIN_DECLS
|
||||
* who assume to be able to access it directly. sad...
|
||||
*/
|
||||
struct dirent {
|
||||
uint64_t d_ino;
|
||||
int64_t d_off;
|
||||
unsigned short d_reclen;
|
||||
unsigned char d_type;
|
||||
char d_name[256];
|
||||
uint64_t d_ino;
|
||||
int64_t d_off;
|
||||
unsigned short d_reclen;
|
||||
unsigned char d_type;
|
||||
char d_name[256];
|
||||
};
|
||||
|
||||
typedef struct DIR DIR;
|
||||
typedef struct DIR DIR;
|
||||
|
||||
extern DIR* opendir(const char* dirpath);
|
||||
extern DIR* fdopendir(int fd);
|
||||
extern struct dirent* readdir(DIR* dirp);
|
||||
extern int readdir_r(DIR* dirp, struct dirent* entry, struct dirent** result);
|
||||
extern int closedir(DIR* dirp);
|
||||
extern void rewinddir(DIR* dirp);
|
||||
extern int dirfd(DIR* dirp);
|
||||
extern int alphasort(const struct dirent** a, const struct dirent** b);
|
||||
extern int scandir(const char* dir, struct dirent*** namelist,
|
||||
int(*filter)(const struct dirent*),
|
||||
int(*compar)(const struct dirent**,
|
||||
const struct dirent**));
|
||||
|
||||
extern int getdents(unsigned int, struct dirent*, unsigned int);
|
||||
extern DIR* opendir(const char* dirpath);
|
||||
extern DIR* fdopendir(int fd);
|
||||
extern struct dirent* readdir(DIR* dirp);
|
||||
extern int readdir_r(DIR* dirp, struct dirent *entry, struct dirent **result);
|
||||
extern int closedir(DIR* dirp);
|
||||
extern void rewinddir(DIR *dirp);
|
||||
extern int dirfd(DIR* dirp);
|
||||
extern int alphasort(const void *a, const void *b);
|
||||
extern int scandir(const char *dir, struct dirent ***namelist,
|
||||
int(*filter)(const struct dirent *),
|
||||
int(*compar)(const struct dirent **,
|
||||
const struct dirent **));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user