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-01-13 19:55:32 +0300
committerChristopher Faylor <me@cgf.cx>2002-01-13 19:55:32 +0300
commit5daa0835e394b2ace6d6223a6c79e8157ec817fa (patch)
tree2b438ec022521fd4d056940bd784c267378a88a1 /winsup/cygwin/dcrt0.cc
parent0d9cc95e902c7385e87480cf65f056719e5e564e (diff)
* dcrt0.cc (multiple_cygwin_problem): Clarify logic and make CYGWIN_MISMATCH_OK
more powerful.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index e90deba3c..996d92d95 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -837,9 +837,11 @@ _dll_crt0 ()
case _PROC_FORK:
user_data->forkee = fork_info->cygpid;
should_be_cb = sizeof (child_info_fork);
+ /* fall through */;
case _PROC_SPAWN:
if (fork_info->pppid_handle)
CloseHandle (fork_info->pppid_handle);
+ /* fall through */;
case _PROC_EXEC:
if (!should_be_cb)
should_be_cb = sizeof (child_info);
@@ -1039,17 +1041,20 @@ multiple_cygwin_problem (const char *what, unsigned magic_version, unsigned vers
fork_info = NULL;
return;
}
- if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) != version)
+
+ char buf[1024];
+ if (GetEnvironmentVariable ("CYGWIN_MISMATCH_OK", buf, sizeof (buf)))
+ return;
+
+ if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) == version)
+ system_printf ("%s magic number mismatch detected - %p/%p", what, magic_version, version);
+ else
api_fatal ("%s version mismatch detected - %p/%p.\n\
You have multiple copies of cygwin1.dll on your system.\n\
Search for cygwin1.dll using the Windows Start->Find/Search facility\n\
and delete all but the most recent version. The most recent version *should*\n\
reside in x:\\cygwin\\bin, where 'x' is the drive on which you have\n\
installed the cygwin distribution.", what, magic_version, version);
-
- char buf[1024];
- if (!GetEnvironmentVariable ("CYGWIN_MISMATCH_OK", buf, sizeof (buf)))
- system_printf ("%s magic number mismatch detected - %p/%p", what, magic_version, version);
}
#ifdef DEBUGGING