Summary
PR #200 added Windows build support but stubbed out the networking code:
- doltlite_http_remote.c:
doltliteRegisterHttpRemote() is a no-op on Windows
- doltlite_remotesrv.c:
doltliteServerCreate() returns NULL with error on Windows
This means dolt_remote_add / push / fetch / clone and the standalone doltlite-remotesrv binary don't work on Windows.
What needs to happen
- Replace BSD socket calls with Winsock2 (
WSAStartup, socket, connect, send, recv, closesocket)
- Replace
pthread_create/pthread_join with CreateThread/WaitForSingleObject
- Replace
poll() with WSAPoll() (Vista+) or select()
- Add
#ifdef _WIN32 / #else branches or use a thin abstraction layer
- Link with
-lws2_32 on Windows
Files
src/doltlite_http_remote.c — HTTP client (sockets only, no threads)
src/doltlite_remotesrv.c — HTTP server (sockets + threads + poll)
Summary
PR #200 added Windows build support but stubbed out the networking code:
doltliteRegisterHttpRemote()is a no-op on WindowsdoltliteServerCreate()returns NULL with error on WindowsThis means
dolt_remote_add/ push / fetch / clone and the standalonedoltlite-remotesrvbinary don't work on Windows.What needs to happen
WSAStartup,socket,connect,send,recv,closesocket)pthread_create/pthread_joinwithCreateThread/WaitForSingleObjectpoll()withWSAPoll()(Vista+) orselect()#ifdef _WIN32/#elsebranches or use a thin abstraction layer-lws2_32on WindowsFiles
src/doltlite_http_remote.c— HTTP client (sockets only, no threads)src/doltlite_remotesrv.c— HTTP server (sockets + threads + poll)