diff options
author | Christopher Faylor <me@cgf.cx> | 2002-01-13 16:55:32 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-01-13 16:55:32 +0000 |
commit | 5daa0835e394b2ace6d6223a6c79e8157ec817fa (patch) | |
tree | 2b438ec022521fd4d056940bd784c267378a88a1 | |
parent | 0d9cc95e902c7385e87480cf65f056719e5e564e (diff) | |
download | newlib-5daa0835e394b2ace6d6223a6c79e8157ec817fa.zip newlib-5daa0835e394b2ace6d6223a6c79e8157ec817fa.tar.gz newlib-5daa0835e394b2ace6d6223a6c79e8157ec817fa.tar.bz2 |
* dcrt0.cc (multiple_cygwin_problem): Clarify logic and make CYGWIN_MISMATCH_OK
more powerful.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7545499..9db8955 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2002-01-13 Christopher Faylor <cgf@redhat.com> + + * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make + CYGWIN_MISMATCH_OK more powerful. + 2002-01-10 Christopher Faylor <cgf@redhat.com> * exceptions.cc (sig_handle): Accept a second argument indicating diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index e90deba..996d92d 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 |