This project is used by the [Envoy proxy](https://www.envoyproxy.io/) and several others.
The existing code is using the extension value [919191](54b08a686f/validate/validate.proto (L29)) but since maintaining binary compatibility is not important, it shouldn't be a problem to change once this allocation is approved.
Even though I just proofread this file, I noticed one more thing that needed correcting, which I fixed. The word "genereated" had to be corrected to "generated". My apologies for missing this on the initial check.
In general, I think it will help us to debug issues if we have less C
code and more Ruby code. This method can be implemented in pure Ruby,
so this commit converts it to pure Ruby.
This file contains a lot of code that doesn't compile for Xbox One and doesn't appear to be necessary for usage on that platform. _WIN32 is defined for the Xbox One platform.
It appears this file was including winsock2.h just to get the timeval struct definition. There are platforms, such as Xbox One, that don't use winsock but do compile with _MSC_VER set, so just drop in the struct definition we needed instead of including all of winsock. This fixes compilation of this file for Xbox One. Without this change, there were numerous `timeval` complaints such as
```
1>c:\dev\protobuf\src\google\protobuf\util\time_util.h(153): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (compiling source file C:\dev\protobuf\src\google\protobuf\util\time_util.cc)
1>c:\dev\protobuf\src\google\protobuf\util\time_util.h(153): error C2143: syntax error: missing ',' before '&' (compiling source file C:\dev\protobuf\src\google\protobuf\util\time_util.cc)
```
etc.