From 082512aea1f22db6d4a7d5087d83de274c8d640c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 23 Oct 2002 02:20:38 +0000 Subject: * shared.cc (shared_info::initialize): Use correct value for version comparison. * include/cygwin/version.h (CYGWIN_VERSION_MAGIC): Use all of a DWORD for magic calculation. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/include/cygwin/version.h | 2 +- winsup/cygwin/shared.cc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 80623b3f1..8b11eeefb 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2002-10-22 Christopher Faylor + + * shared.cc (shared_info::initialize): Use correct value for version + comparison. + * include/cygwin/version.h (CYGWIN_VERSION_MAGIC): Use all of a DWORD + for magic calculation. + 2002-10-22 Christopher Faylor * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Oops. Only diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 373794430..f7284b606 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -230,5 +230,5 @@ details. */ cygwin_internal (CW_GETVERSIONINFO). */ -#define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) (((unsigned short) a) | (unsigned short) b)) +#define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b)) #define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff)) diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 8aaa3c655..78937da36 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -149,7 +149,7 @@ shared_info::initialize () if (version) { if (version != SHARED_VERSION_MAGIC) - multiple_cygwin_problem ("shared", version, SHARED_VERSION); + multiple_cygwin_problem ("shared", version, SHARED_VERSION_MAGIC); else if (cb != SHARED_INFO_CB) multiple_cygwin_problem ("shared size", cb, SHARED_INFO_CB); return; -- cgit v1.2.3