+Tue Dec 19 21:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (remove): New function, overriding the newlib
+ implementation.
+
Tue Dec 19 16:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (struct parse_thing): Add entry for new CYGWIN option
return res;
}
+extern "C" int
+remove (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;
+ }
+
+ DWORD atts = win32_name.file_attributes ();
+ if (atts != 0xffffffff && atts & FILE_ATTRIBUTE_DIRECTORY)
+ return rmdir (ourname);
+
+ return _unlink (ourname);
+}
+
extern "C" pid_t
_getpid ()
{