Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3292

ZooKeeper C Client for Windows: should include winports.h

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.4.13
    • Fix Version/s: None
    • Component/s: c client
    • Labels:
      None
    • Environment:

      Windows 10

      CMake

      ZooKeeper 3.4.13 

      Description

      When building the C client on Windows with CMake:

      cmake -DWANT_SYNCAPI=OFF -DCMAKE_GENERATOR_PLATFORM=x64

       

      With this input, the header file winports.h will not be added in these files:

      zk_log.c

      zk_adaptor.h

      Also, I think winports.h should be added to zookeeper.c

       

      Without winports.h compiling will fail on Windows. Errors are about strtok_r and localtime_r - the Windows mappings in winports.h are missing. 

      I am guessing that other important includes are missing too (like Windows Sockets).

       

      One solution could be to extract the winports.h include out from the THREADED preprocessor, to a separate one:

      #ifdef WIN32

      #include "winport.h"

      #endif

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Vujic David Vujic
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: