This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid collisions between parallel installations of Cygwin


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:
> 
>   struct resource_value
>   {
>     char name[32];
>     char description[220];
>     unsigned long value;
>   };
> 
> 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:

struct resource_value
{
  char name[32];
  char description[200];
  unsigned long type; /* enum: ulong, etc */
  union
  {
    unsigned long ul_value;
    signed long   sl_value;
    double         d_value; /* does this need to be 8-aligned? */
    char[20]       s_value;
  } value;
};

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.

--
Chuck


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]