This is the mail archive of the cygwin-patches@cygwin.com 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]

Re: w32api compiler warning fix.


On Thu, Nov 08, 2001 at 02:03:22AM +1100, Robert Collins wrote:
> On Thu, 2001-11-08 at 01:30, Corinna Vinschen wrote:
> > Did you actually check if Cygwin still compiles with that change?
> > 
> > /src/cygwin/src/winsup/cygwin/sec_helper.cc:45: initializer for scalar variable requires one element
> > make: *** [sec_helper.o] Error 1
> > 
> > These *_SID_AUTHORITY defines are defined using only one brace
> > even in the MS Platform SDK.
> 
> [...]
> Therefore, the double {} is correct if these initalisers are meant to be
> used as they are in cinstall - which is where I got the warning.
>  (in main.c, it's used as
> SID_IDENTIFIER_AUTHORITY sid_auth = SECURITY_WORLD_SID_AUTHORITY;
> )
>  
> > The usage of these symbolds is as in sec_helper.cc:
> > 
> > SID_IDENTIFIER_AUTHORITY sid_auth[] = {
> >         {SECURITY_NULL_SID_AUTHORITY},
> >         {SECURITY_WORLD_SID_AUTHORITY},
> >         {SECURITY_LOCAL_SID_AUTHORITY},
> >         {SECURITY_CREATOR_SID_AUTHORITY},
> >         {SECURITY_NON_UNIQUE_AUTHORITY},
> >         {SECURITY_NT_AUTHORITY}
> > };
> > 
> > Could you please revert that patch?
> 
> What about this instead?

The problem is that the definition doesn't match the MS definition.
I would prefer to have the headers as close to the MS definitions
as possible.

What about changing your

  SID_IDENTIFIER_AUTHORITY sid_auth = SECURITY_WORLD_SID_AUTHORITY;

to

  SID_IDENTIFIER_AUTHORITY sid_auth = {SECURITY_WORLD_SID_AUTHORITY};

?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


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