Implement Locking in Windows log code
Implement Locking in Windows log code

Under windows, we can't use flock.  However we can
get locking using msvcrt using different, but related
semantics.  Imitate whole file locking by just locking
first byte.  We have to make sure we seek() to the same
place when locking and unlocking, as Windows requires
the offset to be same for both operations.

chenglch/confluent,jjohnson42/confluent,jjohnson42/confluent,jufm/confluent,jjohnson42/confluent,jufm/confluent,jjohnson42/confluent,jufm/confluent,whowutwut/confluent,xcat2/confluent,xcat2/confluent,whowutwut/confluent,xcat2/confluent,whowutwut/confluent,chenglch/confluent,jufm/confluent,jjohnson42/confluent,jufm/confluent,xcat2/confluent,chenglch/confluent,whowutwut/confluent,chenglch/confluent,chenglch/confluent,xcat2/confluent