GitHub user andschwa opened a pull request:
https://github.com/apache/zookeeper/pull/306
ZOOKEEPER-2841: ZooKeeper public include files leak porting changes
This PR includes the patches
[ZOOKEEPER-2756](https://issues.apache.org/jira/browse/ZOOKEEPER-2756) and
[ZOOKEEPER-2841](https://issues.apache.org/jira/browse/ZOOKEEPER-2841), and can
supplant PR #255.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/andschwa/zookeeper ZOOKEEPER-2841
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/306.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #306
----
commit 187ce8acc1707a0dd20752b624a3fa5648706f97
Author: Andrew Schwartzmeyer <[email protected]>
Date: 2017-04-10T23:12:40Z
ZOOKEEPER-2756: Add CMake build system for better cross-platform support
This notably lacks Solaris and libtool support.
Almost everything else from Autotools has been ported,
including header/function/library checks, and all targets
(zookeeper, hashtable, cli, load_gen, and tests).
Both Linux and Windows are supported.
The primary work involved (other than the writing of `CMakeLists.txt`)
was transitioning the hand-written `winconfig.h` to an
auto-generated `config.h` file, and guarding code with `#ifdef
HAVE_FEATURE`. The `cmake_config.h.in` template was modeled after
the Autotools config file so that the feature guards share the same
names.
While `load_gen.c` looks at first glance as if it were ported to Windows,
it never actually was, so the erroneous `#include "win32port.h"` was
removed, and the target is not built on Windows.
There are existent warnings which this patch did not attempt to fix.
A guard was placed around `#define snprintf` in order to enable
compiling with modern versions of MSVC.
Fixed DLL_EXPORT and USE_STATIC_LIB redefinition.
As this commit deprecates (and breaks) the previously existing Visual
Studio solutions and projects, they've been removed.
Building tests on Windows is still not supported.
commit 22a378ae2a7c30657326b6a602b62116ab7c050a
Author: Andrew Schwartzmeyer <[email protected]>
Date: 2017-07-07T22:35:37Z
ZOOKEEPER-2841: ZooKeeper public include files leak porting changes
This patch refactors the Windows port of the C client. Notably, it moves
as much porting code as possible out of the publicly included
`winconfig.h` header and into the relevant source files. This also
removes `winstdint.h` as it has been replaced by `<stdint.h>`. It fixes
problems for upstream libraries by removing `#undef AF_INET6` and
`#include <windows.h>`.
Future work should resolve the `ACL` / `ZKACL` conflict, and potentially
remove `include/winconfig.h` altogether.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---