[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] heartbeat/mcast.c in Solaris
From:       Alan Robertson <alanr () unix ! sh>
Date:       2001-05-18 14:22:40
[Download RAW message or body]

"Soffen, Matthew" wrote:
> 
> Couldn't/Wouldn't it be ok to do
> blah && ((unsigned) IOC_IN) ?
> 
> Matt
> 
> > -----Original Message-----
> > From: Alan Robertson [SMTP:alanr@unix.sh]
> > Sent: Thursday, May 17, 2001 6:45 PM
> > To:   linux-ha-dev@lists.community.tummy.com
> > Subject:      Re: [Linux-ha-dev] heartbeat/mcast.c in Solaris
> >
>         [snip]
> 
> > What I did before was something like this:
> > #if IOC_IN == 0x80000000
> > #     undef IOC_IN
> > #     define IOC_IN 0x80000000U
> > #endif
> >
> > Which is functional, completely safe but quite ugly...
> > There were good explanations surrounding it, but still...


The problem was that with the compiler options I chose, the use of the
constant 0X80000000 in any context caused this warning.  Because the meaning
of the constant was different in ANSI C versus K&R C.

So, this is actually rather difficult to get around, if you're going to be
so pedantic as to include the -Wtraditional flag on GCC.

	-- Alan Robertson
	   alanr@unix.sh
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic