[ovs-dev] [PATCH 1/3] util: Move definition of HANDLE here.

Gurucharan Shetty shettyg at nicira.com
Fri Jun 13 22:34:25 UTC 2014


On Fri, Jun 13, 2014 at 3:28 PM, Ben Pfaff <blp at nicira.com> wrote:
> A few Open vSwitch source files use a type named HANDLE on Windows systems,
> in a way that makes it easier to avoid #ifdefs if we have a dummy
> definition on other platforms.  <linux/types.h> was a really weird place
> for this dummy definition.  This commit moves it to util.h.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Gurucharan Shetty <gshetty at nicira.com>
> ---
>  include/linux/types.h |    6 +-----
>  lib/util.h            |    4 ++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/types.h b/include/linux/types.h
> index d8b993b..5438a43 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2011 Nicira, Inc.
> + * Copyright (c) 2011, 2014 Nicira, Inc.
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
> @@ -55,8 +55,4 @@ typedef uint32_t __bitwise__ __be32;
>  typedef uint64_t __bitwise__ __be64;
>  #endif /* no <linux/types.h> */
>
> -#ifndef _WIN32
> -typedef __u32 HANDLE;
> -#endif
> -
>  #endif /* <linux/types.h> */
> diff --git a/lib/util.h b/lib/util.h
> index 4d0ba76..04b0328 100644
> --- a/lib/util.h
> +++ b/lib/util.h
> @@ -249,6 +249,10 @@ ovs_prefetch_range(const void *start, size_t size)
>  #define PRIXSIZE "zX"
>  #endif
>
> +#ifndef _WIN32
> +typedef uint32_t HANDLE;
> +#endif
> +
>  #ifdef  __cplusplus
>  extern "C" {
>  #endif
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list