From: Thomas Veerman Date: Tue, 29 Nov 2011 11:39:22 +0000 (+0000) Subject: Fix stat symbols X-Git-Tag: v3.2.0~209 X-Git-Url: http://zhaoyanbai.com/repos/icons/debian/static/datamaps.china.min.js?a=commitdiff_plain;h=41e69065b9ed80671860329156aab7864daf040b;p=minix.git Fix stat symbols --- diff --git a/lib/nbsd_libc/compat-minix/Makefile.inc b/lib/nbsd_libc/compat-minix/Makefile.inc index afc7ead47..eaa63c7c8 100644 --- a/lib/nbsd_libc/compat-minix/Makefile.inc +++ b/lib/nbsd_libc/compat-minix/Makefile.inc @@ -24,6 +24,7 @@ ASM= compat__opendir230.S compat__alphasort30.S compat__ctime50.S \ compat__sigfillset14.S compat__sigismember14.S compat__siglongjmp14.S \ compat__sigpending14.S compat__sigprocmask14.S compat__sigsetjmp14.S \ compat__sigsuspend14.S compat__time50.S compat__time2posix50.S \ + compat__stat50.S compat__fstat50.S compat__lstat50.S \ compat__time2posix_z50.S compat__timegm50.S compat__timelocal50.S \ compat__timelocal_z50.S compat__timeoff50.S compat__tzalloc50.S \ compat__tzfree50.S compat__tzgetname50.S compat__tzset50.S \ diff --git a/lib/nbsd_libc/sys-minix/stat.c b/lib/nbsd_libc/sys-minix/stat.c index 21f96f7a9..353d733b1 100644 --- a/lib/nbsd_libc/sys-minix/stat.c +++ b/lib/nbsd_libc/sys-minix/stat.c @@ -5,7 +5,6 @@ #include #include - /* XXX until that st_Xtime macroses used, we have to undefine them, * because of minix_prev_stat */ @@ -31,9 +30,7 @@ static void prev_stat2new_stat(struct stat *new, struct minix_prev_stat *prev) new->st_ctimespec.tv_sec = prev->st_ctime; } -int _stat(const char *name, struct stat *buffer); - -int _stat(const char *name, struct stat *buffer) +int stat(const char *name, struct stat *buffer) { message m; int r; @@ -64,9 +61,7 @@ int _stat(const char *name, struct stat *buffer) return r; } -int _fstat(int fd, struct stat *buffer); - -int _fstat(int fd, struct stat *buffer) +int fstat(int fd, struct stat *buffer) { message m; int r; @@ -95,9 +90,7 @@ int _fstat(int fd, struct stat *buffer) return r; } -int _lstat(const char *name, struct stat *buffer); - -int _lstat(const char *name, struct stat *buffer) +int lstat(const char *name, struct stat *buffer) { message m; int r; diff --git a/nbsd_include/sys/stat.h b/nbsd_include/sys/stat.h index a451cafa3..c10014e3b 100644 --- a/nbsd_include/sys/stat.h +++ b/nbsd_include/sys/stat.h @@ -176,13 +176,17 @@ __BEGIN_DECLS int chmod(const char *, mode_t); int mkdir(const char *, mode_t); int mkfifo(const char *, mode_t); -int stat(const char *, struct stat *) __RENAME(_stat); -int fstat(int, struct stat *) __RENAME(_fstat); -int lstat(const char *, struct stat *) __RENAME(_lstat); +#ifndef __LIBC12_SOURCE__ +int stat(const char *, struct stat *) __RENAME(__stat50); +int fstat(int, struct stat *) __RENAME(__fstat50); +#endif mode_t umask(mode_t); #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) int fchmod(int, mode_t); +#ifndef __LIBC12_SOURCE__ +int lstat(const char *, struct stat *) __RENAME(__lstat50); int mknod(const char *, mode_t, dev_t) __RENAME(__mknod50); +#endif #endif /* defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) */ __END_DECLS