Merge "Refresh header byteswap.h and dirent.h"

This commit is contained in:
Andrew Hsieh
2012-11-21 08:14:44 -08:00
committed by Gerrit Code Review
2 changed files with 21 additions and 19 deletions

View File

@@ -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)

View File

@@ -60,19 +60,20 @@ struct dirent {
typedef struct DIR DIR;
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 readdir_r(DIR* dirp, struct dirent* entry, struct dirent** result);
extern int closedir(DIR* dirp);
extern void rewinddir(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 **));
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);
__END_DECLS