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 Fri, Nov 09, 2001 at 07:50:20AM +1100, Danny Smith wrote:
> --- Earnie Boyd <earnie_boyd@yahoo.com> wrote: > Robert Collins wrote:
>> 
>> > > -----Original Message-----
>> > > From: Corinna Vinschen [mailto:cygwin-patches@cygwin.com]
>> > > > 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.
>> >
>> > I'm cool either way - Earnie?
>> 
>> I'm going to defer to Danny.  I myself only agree with Corinna's argument
>> in that if it can be found to be documented that way then that's how it
>> should be coded.
>
>I think its "just" a preprocessor issue. This is how I would do it (Like
>the _TEXT macros):
>
>#define SECURITY_NULL_SID_AUTHORITY_VALUE	{0,0,0,0,0,0}
>#define SECURITY_WORLD_SID_AUTHORITY_VALUE	{0,0,0,0,0,1}
>#define SECURITY_LOCAL_SID_AUTHORITY_VALUE	{0,0,0,0,0,2}
>#define SECURITY_CREATOR_SID_AUTHORITY_VALUE	{0,0,0,0,0,3}
>#define SECURITY_NON_UNIQUE_AUTHORITY_VALUE	{0,0,0,0,0,4}
>
>#define SECURITY_NULL_SID_AUTHORITY {SECURITY_NULL_SID_AUTHORITY_VALUE}
>#define SECURITY_WORLD_SID_AUTHORITY	{SECURITY_WORLD_SID_AUTHORITY_VALUE}
>#define SECURITY_LOCAL_SID_AUTHORITY	{SECURITY_LOCAL_SID_AUTHORITY_VALUE}
>#define SECURITY_CREATOR_SID_AUTHORITY
>{SECURITY_CREATOR_SID_AUTHORITY_VALUE}
>#define SECURITY_NON_UNIQUE_AUTHORITY	{SECURITY_NON_UNIQUE_AUTHORITY_VALUE}

I believe that still varies from the "one true way" of doing things,
though.

Is this a gcc vs. msvc issue?  I don't understand why the above is necessary
for gcc but not for msvc.

cgf


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