The Compaq compiler (on VMS) includes 'String.c' in source files that use the stl string while looking for template definitions. This was the true cause of double-inclusion of the 'kwsysPrivate.h' header. We work around the problem by conditionally compiling the entire source file on a condition only true when really building the source.
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.