* cygmagic: Add define name to warning.

* dcrt0.cc (_dll_crt0): Check for changes in child_info size.
(multiple_cygwin_problem): Avoid "proc" errors when testing.  Just assume new
cygwin proc.
* shared_info.h (mount_info): Add 'cb' element for sanity checks.
(shared_info): Ditto.
* child_info.h (child_info): Add fhandler_union_size element for sanity
checking.
* shared.cc (open_shared): Detect shared region size mismatch between parent
and child.
(shared_info::initialize): Detect shared region size mismatch with expectation.
(memory_Init): Ditto.
* sigproc.cc (init_child_info): Correctly set cb in passed structure.
* shared.cc (open_shared):
This commit is contained in:
Christopher Faylor
2001-12-26 21:35:16 +00:00
parent dcd8b9be82
commit aaf219f01e
7 changed files with 67 additions and 17 deletions

View File

@ -17,7 +17,6 @@ class mount_item
public:
/* FIXME: Nasty static allocation. Need to have a heap in the shared
area [with the user being able to configure at runtime the max size]. */
/* Win32-style mounted partition source ("C:\foo\bar").
native_path[0] == 0 for unused entries. */
char native_path[MAX_PATH];
@ -42,7 +41,8 @@ class mount_item
#define MOUNT_VERSION 27 // increment when mount table changes and
#define MOUNT_VERSION_MAGIC CYGWIN_VERSION_MAGIC (MOUNT_MAGIC, MOUNT_VERSION)
#define CURR_MOUNT_MAGIC 0xfe35
#define CURR_MOUNT_MAGIC 0x41e0
#define MOUNT_INFO_CB 16488
class reg_key;
@ -53,6 +53,7 @@ class mount_info
{
public:
DWORD version;
unsigned cb;
DWORD sys_mount_table_counter;
int nmounts;
mount_item mount[MAX_MOUNTS];
@ -138,14 +139,17 @@ public:
cygwin_version.api_minor)
#define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION)
#define CURR_SHARED_MAGIC 0x6f6e
#define SHARED_INFO_CB 47112
#define CURR_SHARED_MAGIC 0x88e
/* NOTE: Do not make gratuitous changes to the names or organization of the
below class. The layout is checksummed to determine compatibility between
different cygwin versions. */
class shared_info
{
DWORD inited;
DWORD version;
DWORD cb;
public:
int heap_chunk_in_mb;
DWORD sys_mount_table_counter;