ovsdb: Open database in binary mode.

Some ovsdb-tool related unit tests fail with bad checksum errors
while reading transactions from database. It is most likely because
of the CR at the end of line. Using binary mode solves the problem.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
timeval: Workaround strftime bug in VS 2013.

Visual Studio 2013's behavior is to crash when 0 is passed as second
argument to strftime.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
ovs-pki: Pass correct argument to 'sign' command.

The first argument passed to 'sign' command is used as prefix
for both req.pem and cert.pem.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/library.at: Disable unix socket tests on Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
util: Disable popups while asserting in windows.

The default behavior for programs is to display a popup
after an assert/abort etc. This is not an ideal behavior because
this needs user intervention.

set_program_name, though not an ideal place to disable this, is
a useful place because it is called by all programs including
unit test binaries.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
util: set_program_name() can be called twice with different names.

Ex: ovstest.c

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
test-ovsdb: Fix setvbuf incompatibility on Windows.

setvbuf() in Windows treats _IOLBF to be the same as _IOFBF. So
we cannot have size as zero (otherwise, there is a crash).

Workaround is to set _IONBF. I don't see unit test failures
because of the change.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>