diff options
Diffstat (limited to 'libc/sysdeps/linux/common/getdirname.c')
-rw-r--r-- | libc/sysdeps/linux/common/getdirname.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c index a4285322b..3b470db05 100644 --- a/libc/sysdeps/linux/common/getdirname.c +++ b/libc/sysdeps/linux/common/getdirname.c @@ -17,14 +17,18 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define getcwd __getcwd - #include <features.h> #include <unistd.h> #include <sys/stat.h> #include <stdlib.h> #include <string.h> +libc_hidden_proto(strdup) +libc_hidden_proto(getcwd) +libc_hidden_proto(getenv) +libc_hidden_proto(stat) +libc_hidden_proto(stat64) + /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ @@ -39,19 +43,19 @@ get_current_dir_name (void) struct stat dotstat, pwdstat; #endif - pwd = __getenv ("PWD"); + pwd = getenv ("PWD"); if (pwd != NULL #if defined __UCLIBC_HAS_LFS__ - && __stat64 (".", &dotstat) == 0 - && __stat64 (pwd, &pwdstat) == 0 + && stat64 (".", &dotstat) == 0 + && stat64 (pwd, &pwdstat) == 0 #else - && __stat (".", &dotstat) == 0 - && __stat (pwd, &pwdstat) == 0 + && stat (".", &dotstat) == 0 + && stat (pwd, &pwdstat) == 0 #endif && pwdstat.st_dev == dotstat.st_dev && pwdstat.st_ino == dotstat.st_ino) /* The PWD value is correct. Use it. */ - return __strdup (pwd); + return strdup (pwd); return getcwd ((char *) NULL, 0); } |