Acked-by: Eitan Eliahu <elia...@vmware.com> Thanks, Eitan
-----Original Message----- From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Nithin Raju Sent: Tuesday, October 21, 2014 4:11 PM To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 1/5] lib/util.c: add ovs_windows_only() cpp macro It is convenient to have a macro which we can use to wrap Windows specific code without using the #ifdef _WIN32/#endif combo each time. Signed-off-by: Nithin Raju <nit...@vmware.com> --- lib/util.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lib/util.h b/lib/util.h index f171dbf..32f50e5 100644 --- a/lib/util.h +++ b/lib/util.h @@ -76,6 +76,14 @@ } NO_RETURN void ovs_assert_failure(const char *, const char *, const char *); +/* A convenient macro to wrap Windows specific code without having to use + * _WIN32 CPP. */ +#ifdef _WIN32 +#define ovs_windows_only(CONDITION) CONDITION +#else +#define ovs_windows_only(CONDITION) +#endif + /* Casts 'pointer' to 'type' and issues a compiler warning if the cast changes * anything other than an outermost "const" or "volatile" qualifier. * -- 1.7.4.1 _______________________________________________ dev mailing list dev@openvswitch.org https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb6ViHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=GjPPHrt8v8NG4G%2F6sYxMmxNAEHYMVYLgU9%2BaxxCkgTg%3D%0A&s=000a480412ff8e39e78dd0467b53923c1bee7c91e86fe1e2fa0385cc8ddad744 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev