libportable to adapt L header functions.

Change-Id: Ie15c321ee3b1b21f264b12641bc064ee33dec418
This commit is contained in:
WenHan Gu
2014-07-30 11:01:56 +08:00
committed by Andrew Hsieh
parent 9b87a9735a
commit bce5ab4f3f
83 changed files with 861 additions and 10464 deletions

View File

@@ -14,52 +14,4 @@
* limitations under the License.
*/
#include <portability.h>
#include <stat_portable.h>
#include <sys/stat.h>
int WRAP(fstat)(int fd, struct stat_portable *s) {
struct stat mips64_stat;
int ret = REAL(fstat)(fd, &mips64_stat);
stat_ntop(&mips64_stat, s);
return ret;
}
static inline int WRAP(fstat64)(int fd, struct stat64_portable *s) {
return WRAP(fstat)(fd, (struct stat_portable*)s);
}
int WRAP(fstatat)(int dirfd, const char *path, struct stat_portable *s, int flags) {
struct stat mips64_stat;
int ret = REAL(fstatat)(dirfd, path, &mips64_stat, flags);
stat_ntop(&mips64_stat, s);
return ret;
}
static inline int WRAP(fstatat64)(int dirfd, const char *path,
struct stat64_portable *s, int flags) {
return WRAP(fstatat)(dirfd, path, (struct stat_portable*)s, flags);
}
int WRAP(lstat)(const char *path, struct stat_portable *s) {
struct stat mips64_stat;
int ret = REAL(lstat)(path, &mips64_stat);
stat_ntop(&mips64_stat, s);
return ret;
}
static inline int WRAP(lstat64)(const char *path, struct stat64_portable *s) {
return WRAP(lstat)(path, (struct stat_portable*)s);
}
int WRAP(stat)(const char* path, struct stat_portable* s) {
struct stat mips64_stat;
int ret = REAL(stat)(path, &mips64_stat);
stat_ntop(&mips64_stat, s);
return ret;
}
static inline int WRAP(stat64)(const char* path, struct stat64_portable *s) {
return WRAP(stat)(path, (struct stat_portable*)s);
}