summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-02 17:59:27 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-02 17:59:27 +0000
commitbbe0c227a0808ce8e9d11c9a10077c3658dd1705 (patch)
tree3e569d0d2ea66a02591a14255aba5d92350b8eaf
parent63bda0c13abdc73893855c2b57e55eaea5835fc3 (diff)
downloadglibc-bbe0c227a0808ce8e9d11c9a10077c3658dd1705.tar.gz
glibc-bbe0c227a0808ce8e9d11c9a10077c3658dd1705.tar.xz
glibc-bbe0c227a0808ce8e9d11c9a10077c3658dd1705.zip
Update.
	* sysdeps/unix/sysv/linux/syscalls.list: Add s_getcwd entry.
-rw-r--r--ChangeLog2
-rw-r--r--sysdeps/unix/sysv/linux/getcwd.c5
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
3 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9eec8e852f..f98779b68d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 1998-04-02  Ulrich Drepper  <drepper@cygnus.com>
 
+	* sysdeps/unix/sysv/linux/syscalls.list: Add s_getcwd entry.
+
 	* stdlib/isomac.c: Use -isystem instead of -I for system include
 	dir.
 
diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c
index 0bf9a9fb0e..fb483ac076 100644
--- a/sysdeps/unix/sysv/linux/getcwd.c
+++ b/sysdeps/unix/sysv/linux/getcwd.c
@@ -37,7 +37,7 @@ static char *generic_getcwd (char *buf, size_t size) internal_function;
    directory: a syscall.  We've got to be careful that even when
    compiling under 2.1.92+ the libc still runs under older kernels. */
 extern int __syscall_getcwd (char *buf, unsigned long size);
-static no_syscall_getcwd;
+static int no_syscall_getcwd;
 static int no_new_dcache = 1;
 #else
 static int no_new_dcache;
@@ -52,7 +52,7 @@ __getcwd (char *buf, size_t size)
   char *result;
   size_t alloc_size = size;
 
-  if (no_new_dcache)
+  if (no_syscall_getcwd && no_new_dcache)
     return generic_getcwd (buf, size);
 
   if (size == 0)
@@ -82,7 +82,6 @@ __getcwd (char *buf, size_t size)
     {
       int retval;
 
-      do
       retval = __syscall_getcwd (path, alloc_size);
       if (retval >= 0)
 	{
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index f55c3f6fff..3fcb9a6aef 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -40,6 +40,7 @@ rt_sigprocmask	-	rt_sigprocmask	4	__syscall_rt_sigprocmask
 rt_sigqueueinfo	-	rt_sigqueueinfo	3	__syscall_rt_sigqueueinfo
 rt_sigsuspend	-	rt_sigsuspend	2	__syscall_rt_sigsuspend
 rt_sigtimedwait	-	rt_sigtimedwait	4	__syscall_rt_sigtimedwait
+s_getcwd	EXTRA	getcwd		2	__syscall_getcwd
 s_getdents	EXTRA	getdents	3	__getdents
 s_getpriority	getpriority getpriority	2	__syscall_getpriority
 s_getresgid	getresgid getresgid	3	__syscall_getresgid