ZOOKEEPER-4556: Add zoo_version_str to return ZOO_VERSION for runtime library
This implements https://issues.apache.org/jira/browse/ZOOKEEPER-4556
The strongest use case for a function zoo_version_str is when an application is making use of https://sourceware.org/libffi/ or similar solution for their application language and wants to be sure that the preprocessed/cached C declarations it might use are consistent with the version of libzookeeper_mt.so that is available at runtime for dynamic loading with dlopen. The zookeeper_version.h may not be available at runtime depending on the deployment scenario for the application, and would require additional parsing toil if it were.
The unit test is coded to work with any version of zookeeper, but the implementation would need to be adjusted to use the code shown in the referenced issue if this patch were to be back-ported to a 3.5 or earlier branch.
nks
.