[ovs-dev] [PATCH] rconn: Prevent redefinition of 'MAX_MONITORS' in Windows.

Eitan Eliahu eliahue at vmware.com
Tue Sep 9 22:47:20 UTC 2014


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:shettyg at nicira.com] 
Sent: Tuesday, September 09, 2014 3:23 PM
To: Eitan Eliahu
Cc: dev at 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 <eliahue at 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-bounces at openvswitch.org] On Behalf Of Gurucharan 
> Shetty
> Sent: Tuesday, September 09, 2014 1:23 PM
> To: dev at 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 <gshetty at 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 at 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=1NdNrps2yzasqYblH2%2BMMi6VHM6U0Q7
> RW9bmdtIhN%2FQ%3D%0A&s=f700eaccce310ee9ae557b374a391b428789b716173995c
> dab14a9b51d54f3bb


More information about the dev mailing list