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 http://openvswitch.org/mailman/listinfo/dev