Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-08-23 22:03:16 +0400
committerChristopher Faylor <me@cgf.cx>2003-08-23 22:03:16 +0400
commitbe1ea8cde73ce3455e75f203f74e4c08ac83199e (patch)
tree68af8f67b19afb550dc6be9250838a59a293da21 /winsup/cygwin
parent9d4aef1930b3db3c2850ccfad9fba95e542857d2 (diff)
* syscalls.cc (_remove_r): Define.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/syscalls.cc15
2 files changed, 19 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 436f853a2..f26544b17 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-23 Christopher Faylor <cgf@redhat.com>
+
+ * syscalls.cc (_remove_r): Define.
+
2003-08-22 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h (enum cygheap_types): Add HEAP_MMAP.
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index dedab012e..8dd659ab4 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -232,6 +232,21 @@ unlink (const char *ourname)
}
extern "C" int
+_remove_r (struct _reent *, const char *ourname)
+{
+ path_conv win32_name (ourname, PC_SYM_NOFOLLOW | PC_FULL);
+
+ if (win32_name.error)
+ {
+ set_errno (win32_name.error);
+ syscall_printf ("-1 = remove (%s)", ourname);
+ return -1;
+ }
+
+ return win32_name.isdir () ? rmdir (ourname) : unlink (ourname);
+}
+
+extern "C" int
remove (const char *ourname)
{
path_conv win32_name (ourname, PC_SYM_NOFOLLOW | PC_FULL);