[newlib-cygwin] Cygwin: fork: move extern declarations to appropriate headers

Corinna Vinschen corinna@sourceware.org
Wed Jan 16 14:34:00 GMT 2019


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

commit f5808867cf4ccedc1d91949ee75fe102f0d11c1b
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Jan 16 12:59:27 2019 +0100

    Cygwin: fork: move extern declarations to appropriate headers
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fork.cc  | 3 +--
 winsup/cygwin/timer.h  | 2 ++
 winsup/cygwin/winsup.h | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index c6fef67..5cfdd95 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -22,6 +22,7 @@ details. */
 #include "tls_pbuf.h"
 #include "dll_init.h"
 #include "cygmalloc.h"
+#include "timer.h"
 #include "ntdll.h"
 
 #define NPIDS_HELD 4
@@ -129,8 +130,6 @@ int __stdcall
 frok::child (volatile char * volatile here)
 {
   HANDLE& hParent = ch.parent;
-  extern void fixup_hooks_after_fork ();
-  extern void fixup_timers_after_fork ();
 
   /* NOTE: Logically this belongs in dll_list::load_after_fork, but by
      doing it here, before the first sync_with_parent, we can exploit
diff --git a/winsup/cygwin/timer.h b/winsup/cygwin/timer.h
index 2a31e3e..595d9fe 100644
--- a/winsup/cygwin/timer.h
+++ b/winsup/cygwin/timer.h
@@ -56,4 +56,6 @@ class timer_tracker
   static int close (timer_tracker *tt);
 };
 
+extern void fixup_timers_after_fork ();
+
 #endif /* __TIMER_H__ */
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index d5babd6..3a5f5d5 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -185,6 +185,7 @@ extern "C" void error_start_init (const char*);
 extern "C" int try_to_debug (bool waitloop = 1);
 
 void ld_preload ();
+void fixup_hooks_after_fork ();
 const char *find_first_notloaded_dll (class path_conv &);
 
 /**************************** Miscellaneous ******************************/



More information about the Cygwin-cvs mailing list