Visual Studio 14 (2015) complains if a static character array is declared with more than 65535 elements. This limit should be large enough for SharedForward clients, so just hard-code that instead of trying to compute a limit.
KWSys provides a platform-independent API to many common system features that are implemented differently on every platform. This library is intended to be shared among many projects, so it has a configurable namespace. Each project should configure KWSys to use a namespace unique to itself. See comments in CMakeLists.txt for details. You are probably reading this file in the source tree of a surrounding project. In that case, see "../README.kwsys" for details of using KWSys in your project.