aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/shared.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-24 21:56:54 +0000
committerChristopher Faylor <me@cgf.cx>2001-10-24 21:56:54 +0000
commita9f20457f32877bf13e7a52366aa0996f9d8b2a9 (patch)
tree28154ea227295ef03dfcfed4a983a0632cb0cc67 /winsup/cygwin/shared.cc
parent1dd695651f77dafbe2e71f008fc43924a50ad534 (diff)
downloadnewlib-a9f20457f32877bf13e7a52366aa0996f9d8b2a9.zip
newlib-a9f20457f32877bf13e7a52366aa0996f9d8b2a9.tar.gz
newlib-a9f20457f32877bf13e7a52366aa0996f9d8b2a9.tar.bz2
* Makefile.in: Only build testsuite directory on first 'make check'.
* configure.in: Remove testsuite from SUBDIRS. * configure: Regenerate.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 7e155eb..0158487 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -55,7 +55,7 @@ shared_name (const char *str, int num)
}
void * __stdcall
-open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
+open_shared (const char *name, int n, HANDLE &shared_h, DWORD size, void *addr)
{
void *shared;
@@ -66,7 +66,7 @@ open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
mapname = NULL;
else
{
- mapname = shared_name (name, 0);
+ mapname = shared_name (name, n);
shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE,
TRUE, mapname);
}
@@ -127,6 +127,7 @@ memory_init ()
/* Initialize general shared memory */
HANDLE shared_h = cygheap ? cygheap->shared_h : NULL;
cygwin_shared = (shared_info *) open_shared ("shared",
+ CYGWIN_VERSION_SHARED_DATA,
shared_h,
sizeof (*cygwin_shared),
cygwin_shared_address);
@@ -151,7 +152,8 @@ memory_init ()
ProtectHandle (cygheap->shared_h);
heap_init ();
- mount_table = (mount_info *) open_shared (user_name, cygwin_mount_h,
+ mount_table = (mount_info *) open_shared (user_name, MOUNT_VERSION,
+ cygwin_mount_h,
sizeof (mount_info), 0);
debug_printf ("opening mount table for '%s' at %p", cygheap->user.name (),
mount_table_address);
@@ -165,6 +167,9 @@ memory_init ()
debug_printf ("initializing mount table");
mount_table->init (); /* Initialize the mount table. */
}
+ else if (mount_table->version != MOUNT_VERSION)
+ multiple_cygwin_die ();
+
}
void __stdcall