Yes, I see, my bad. MAXIMUM_MONITORS instead of MAX_MONTIORS. Looks good. Thanks, Eitan
-----Original Message----- From: Ben Pfaff [mailto:b...@nicira.com] Sent: Tuesday, September 09, 2014 3:51 PM To: Eitan Eliahu Cc: Gurucharan Shetty; dev@openvswitch.org; Gurucharan Shetty Subject: Re: [ovs-dev] [PATCH] rconn: Prevent redefinition of 'MAX_MONITORS' in Windows. OVS has had a MAX_MONITORS macro definition there forever. On Windows, the name conflicts with something defined in a system header. Therefore, Guru's patch renames the OVS macro to avoid a conflict. On Tue, Sep 09, 2014 at 10:47:20PM +0000, Eitan Eliahu wrote: > I realize that that we get a compilation error but this definition in the > ddeml.h has different semantics (and it is set to 4 rather to 8). > Perhaps you want to undefined it and have your own definition instead. > Thanks, > Eitan > > -----Original Message----- > From: Gurucharan Shetty [mailto:shet...@nicira.com] > Sent: Tuesday, September 09, 2014 3:23 PM > To: Eitan Eliahu > Cc: dev@openvswitch.org; Gurucharan Shetty > Subject: Re: [ovs-dev] [PATCH] rconn: Prevent redefinition of 'MAX_MONITORS' > in Windows. > > On Tue, Sep 9, 2014 at 3:20 PM, Eitan Eliahu <elia...@vmware.com> wrote: > > > > Hi Guru, > > The Windows definition refers to "DDE" monitors. I'm not sure you want to > > use this semantics here. > ddeml.h gets included indirectly in our builds (likely through windows.h?). > ddeml.h already has a MAX_MONITORS defined. This results in OVS builds > getting a macro redefinition warnings. This patch tries to get rid of the > warning. Does that make sense? > > > Thanks, > > Eitan > > > > -----Original Message----- > > From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of > > Gurucharan Shetty > > Sent: Tuesday, September 09, 2014 1:23 PM > > To: dev@openvswitch.org > > Cc: Gurucharan Shetty > > Subject: [ovs-dev] [PATCH] rconn: Prevent redefinition of 'MAX_MONITORS' in > > Windows. > > > > Windows already has a MAX_MONITORS defined in ddeml.h. > > > > Signed-off-by: Gurucharan Shetty <gshe...@nicira.com> > > --- > > lib/rconn.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/lib/rconn.c b/lib/rconn.c index c9b68bb..5c28806 100644 > > --- a/lib/rconn.c > > +++ b/lib/rconn.c > > @@ -137,8 +137,8 @@ struct rconn { > > uint8_t dscp; > > > > /* Messages sent or received are copied to the monitor connections. */ > > -#define MAX_MONITORS 8 > > - struct vconn *monitors[8]; > > +#define MAXIMUM_MONITORS 8 > > + struct vconn *monitors[MAXIMUM_MONITORS]; > > size_t n_monitors; > > > > uint32_t allowed_versions; > > -- > > 1.7.9.5 > > > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/ma > > il > > man/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb > > 6V > > iHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=1NdNrps2yzasqYblH2%2BMMi6VHM6U0 > > Q7 > > RW9bmdtIhN%2FQ%3D%0A&s=f700eaccce310ee9ae557b374a391b428789b71617399 > > 5c > > dab14a9b51d54f3bb > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mail > man/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb6V > iHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=wxiiLErgQB9gzysCygL3RS5WGj6Sq2bMR > IQxTV9VExc%3D%0A&s=20d0b1b5ee8de30e14b72ebbf4ad41a35fe258dc12b8a534b4c > 1998e1c46db11 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev