diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-28 03:18:23 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-28 03:18:23 +0000 |
commit | 675d62ac876ffe4719580d45b8c9469934ccf6d7 (patch) | |
tree | e666bd4a1d816842c070e4928715d66b82655fc2 /libc/sysdeps/linux/common/stat.c | |
parent | fd666fca933f7241ff75d06ff36c9282fd443335 (diff) | |
download | uClibc-alpine-675d62ac876ffe4719580d45b8c9469934ccf6d7.tar.bz2 uClibc-alpine-675d62ac876ffe4719580d45b8c9469934ccf6d7.tar.xz |
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/common/stat.c')
-rw-r--r-- | libc/sysdeps/linux/common/stat.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c index 7e7fe6bec..662ed665a 100644 --- a/libc/sysdeps/linux/common/stat.c +++ b/libc/sysdeps/linux/common/stat.c @@ -2,24 +2,30 @@ /* * stat() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ +/* need to hide the 64bit prototype or the strong_alias() + * will fail when __NR_stat64 doesnt exist */ +#define stat64 __hidestat64 + #include "syscalls.h" #include <unistd.h> -#define _SYS_STAT_H -#include <bits/stat.h> +#include <sys/stat.h> #include "xstatconv.h" +#undef stat64 + +libc_hidden_proto(stat) + #define __NR___syscall_stat __NR_stat -#undef __stat #undef stat static inline _syscall2(int, __syscall_stat, const char *, file_name, struct kernel_stat *, buf); -int attribute_hidden __stat(const char *file_name, struct stat *buf) +int stat(const char *file_name, struct stat *buf) { int result; struct kernel_stat kbuf; @@ -30,9 +36,11 @@ int attribute_hidden __stat(const char *file_name, struct stat *buf) } return result; } -strong_alias(__stat,stat) +libc_hidden_def(stat) #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__ -hidden_strong_alias(__stat,__stat64) -weak_alias(__stat,stat64) +extern __typeof(stat) stat64; +libc_hidden_proto(stat64) +strong_alias(stat,stat64) +libc_hidden_def(stat64) #endif |