[ovs-dev] [PATCH v2] getopt_long: Copy over the implementation from netbsd.

Ben Pfaff blp at nicira.com
Mon Jan 27 18:07:23 UTC 2014


On Mon, Jan 27, 2014 at 09:35:44AM -0800, Gurucharan Shetty wrote:
> Windows does not have a getopt_long function. This commit
> copies over the getopt_long implementation from netbsd with
> some minor modifications and is used only on Windows platform.
> 
> Modifications on top of the version in NetBSD repo.
> * Remove header files not available in Visual Studio.
> * Remove some unwanted #defines.
> * Add Open vSwitch specific header files like config.h, vlog.h, util.h
> * Add the following #define's
> define __UNCONST(a)    ((void *)(unsigned long)(const void *)(a))
> define _DIAGASSERT(q) ovs_assert(q)
> define warnx VLOG_WARN
> * Add extern declaration in getopt.h for optarg, optind.
> 
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list