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>2002-06-10 21:08:09 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-10 21:08:09 +0400
commitfe4283af7ad3e47321d9a7b725c343629dc7d90f (patch)
treec3a72003d0f6575c487c99b0af56048e51683656
parent3d78e129b748bf686e606a64c0f44ece110f4c48 (diff)
* dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before running
global ctors. * wincap.h (wincap): Eliminate constructor. Default is to zero memory, anyway. * wincap.cc (wincap): Copy this on fork to avoid initialization in forked processes.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/dcrt0.cc4
-rw-r--r--winsup/cygwin/wincap.cc2
-rw-r--r--winsup/cygwin/wincap.h1
4 files changed, 12 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a4f227d89..b6cc5485d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+2002-06-10 Christopher Faylor <cgf@redhat.com>
+
+ * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
+ running global ctors.
+ * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
+ anyway.
+ * wincap.cc (wincap): Copy this on fork to avoid initialization in
+ forked processes.
+
2002-06-10 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index bd164e03e..6a358992d 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -555,12 +555,12 @@ dll_crt0_1 ()
/* Initialize SIGSEGV handling, etc. */
init_exceptions (&cygwin_except_entry);
- do_global_ctors (&__CTOR_LIST__, 1);
-
/* Set the os_being_run global. */
wincap.init ();
check_sanity_and_sync (user_data);
+ do_global_ctors (&__CTOR_LIST__, 1);
+
/* Nasty static stuff needed by newlib -- point to a local copy of
the reent stuff.
Note: this MUST be done here (before the forkee code) as the
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index 2aede9e4b..29e33b626 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -418,7 +418,7 @@ static NO_COPY wincaps wincap_xp = {
has_process_io_counters:true,
};
-wincapc NO_COPY wincap;
+wincapc wincap;
void
wincapc::init ()
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index 9c6086dec..fbf36a5b9 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -56,7 +56,6 @@ class wincapc
void *caps;
public:
- wincapc (): caps (NULL) {}
void init ();
void set_chunksize (DWORD nchunksize);