Avoid collisions between parallel installations of Cygwin
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Oct 20 14:00:00 GMT 2009
On Oct 18 17:47, Dave Korn wrote:
> Charles Wilson wrote:
> > Corinna wrote:
> >> You can avoid this problem by defining the resource section in a dynamic
> >> fashion from the start. Each entry consists of the name of the value,
> >> a descriptive text, and the value itself. So, each entry could be a
> >> statically sized structure of 256 bytes like this:
> >>
>
> >> For instance, if the name is "blurb", cygcheck could be advised to
> >> understand an option `--blurb' to set the value.
> >
> > That will help, but won't completely eliminate the problem. It's still
> > conceivable that you might need to change even the definition of struct
> > resource_value in version N+1. For instance:
>
>
> > And even if you start off with THAT, you might discover that you need so
> > other change to the struct definition in version N+2. I don't know if
> > this is a realistic concern. Your original approach is probably
> > sufficient -- my concerns are probably over-engineering.
>
> I don't think we should worry. Ok, so older cygchecks won't be able to
> parse newer DLLs. As long as it does a version number check and issues a nice
> error message and fails safe, no problem. And remember, we will control the
> horizontal *and* the vertical. Since the Cygwin DLL and the cygcheck utility
> are both part of the same CVS tree and are always built and distributed
> together in synchronised versions, how exactly will a problem arise, unless
> someone deliberately manually installs just the DLL from a new release
> package, or just the cygcheck exe from an old one?
Actually I think we can make it even more simple. Assume we start with
a single USHORT value, which is what we're planning, and two versions
later we add a ULONG value. After a successful call to FindResource(),Cygcheck can ask for SizeofResource (). The size of the resource is a simple
way to figure out which data is available in that version of the Cygwin
DLL.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
More information about the Cygwin-developers
mailing list