* Makefile.in: Autogenerate some header files which provide magic numbers.

Force dependencies for files which depend on autogenerated headers to ensure
that they are always built.
* child_info.h (child_info): Add new fields to accommodate new magic number
header stuff.
* dcrt0.cc: Rely on "child_info_magic.h" to ensure that correct child_info
magic numbers are used.
(dll_crt0_1): Temporarily remove _cygwin_testing_magic test.
(_dll_crt0): Do more testing on magic numbers from fork_info structure.  Call
"multiple_cygwin_problem" where appropriate.
(multiple_cygwin_problem): Rename from multiple_cygwin_die.  Issue a warning or
die, as appropriate based on cygwin version/magic number mismatch.
* pinfo.cc (pinfo::exit): Don't attempt to dereference `this' if it doesn't
exist.  This can happen when a fatal error occurs early in process
initialization.
* shared.cc: Rely on "shared_info_magic.h" to accommodate that new magic number
header stuff.
(shared_info::initialize): Use new magic number stuff, for shared region.
(memory_init): Ditto, for mount table.
* shared_info.h: Accomodate new magic number stuff for shared region and mount
table.
* sigproc.cc: Rely on "child_info_magic.h" to accommodate new magic number
header stuff.
(init_child_info): Initialize new fields in child_info) to accomodate magic
numbers.
* winsup.h: Rename multiple_cygwin_die to multiple_cygwin_problem.
* include/cygwin/version.h: Define macros for manipulating version magic.
* cygmagic: New shell script for generating magic numbers.
This commit is contained in:
Christopher Faylor
2001-12-26 04:53:34 +00:00
parent f6eff1c046
commit 77f4a25028
11 changed files with 135 additions and 47 deletions

View File

@@ -26,7 +26,7 @@ details. */
#include "path.h"
#include "dtable.h"
#include "cygheap.h"
#include "child_info.h"
#include "child_info_magic.h"
#define NEED_VFORK
#include "perthread.h"
#include <assert.h>
@@ -858,6 +858,8 @@ init_child_info (DWORD chtype, child_info *ch, pid_t pid, HANDLE subproc_ready)
{
memset (ch, 0, sizeof *ch);
ch->cb = sizeof *ch;
ch->intro = PROC_MAGIC_GENERIC;
ch->magic = CHILD_INFO_MAGIC;
ch->type = chtype;
ch->cygpid = pid;
ch->subproc_ready = subproc_ready;