public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: unlink_nt: declare in winsup.h
@ 2023-09-08 20:41 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-09-08 20:41 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=53472e1803808d5fb91029f4c26c86989c62c82c

commit 53472e1803808d5fb91029f4c26c86989c62c82c
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Fri Sep 8 22:34:52 2023 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Fri Sep 8 22:34:52 2023 +0200

    Cygwin: unlink_nt: declare in winsup.h
    
    unlink_nt is used more than once so declare it in a header.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler/disk_file.cc   | 2 --
 winsup/cygwin/forkable.cc             | 4 ----
 winsup/cygwin/local_includes/winsup.h | 2 ++
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc
index 94f7ef566756..d59cde78b5bd 100644
--- a/winsup/cygwin/fhandler/disk_file.cc
+++ b/winsup/cygwin/fhandler/disk_file.cc
@@ -1842,8 +1842,6 @@ fhandler_disk_file::mkdir (mode_t mode)
 int
 fhandler_disk_file::rmdir ()
 {
-  extern NTSTATUS unlink_nt (path_conv &pc, bool sharable);
-
   if (!pc.isdir ())
     {
       set_errno (ENOTDIR);
diff --git a/winsup/cygwin/forkable.cc b/winsup/cygwin/forkable.cc
index c69c8bea9e98..cd317a1ae09e 100644
--- a/winsup/cygwin/forkable.cc
+++ b/winsup/cygwin/forkable.cc
@@ -27,10 +27,6 @@ details. */
 #include <assert.h>
 #include <tls_pbuf.h>
 
-/* Allow concurrent processes to use the same dll or exe
- * via their hardlink while we delete our hardlink. */
-extern NTSTATUS unlink_nt (path_conv &pc, bool sharable);
-
 #define MUTEXSEP L"@"
 #define PATHSEP L"\\"
 
diff --git a/winsup/cygwin/local_includes/winsup.h b/winsup/cygwin/local_includes/winsup.h
index c9788de8f012..bf0a0bcc3fc0 100644
--- a/winsup/cygwin/local_includes/winsup.h
+++ b/winsup/cygwin/local_includes/winsup.h
@@ -225,6 +225,8 @@ class path_conv;
 
 int stat_worker (path_conv &pc, struct stat *buf);
 
+NTSTATUS unlink_nt (path_conv &pc, bool sharable);
+
 ino_t readdir_get_ino (const char *path, bool dot_dot);
 
 /* mmap functions. */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-08 20:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 20:41 [newlib-cygwin/main] Cygwin: unlink_nt: declare in winsup.h Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).