wetube / bitcloud

Bitcloud Project
http://bitcloudproject.org
MIT License
613 stars 56 forks source link

Windows Sockets #34

Closed SbSpider closed 10 years ago

SbSpider commented 10 years ago

Hello I was looking through the code, and noticed that the code does not compile on Windows (I am using MingW). Upon further inquiry, it seems that sys/sockets.h will not compile on Windows unless it is a Cygwin build environment. This does seem a potential problem, as we have no assurity that the node runners will be running a BSD compatible environment.

Perhaps a configure.sh script or some other thing be created so that it can detect such a change and compile accordingly? As we could try and limit the socket code to a socket class, all we would need is to create a good wrapper around the class, so the rest of the code can safely ignore whether winsocks or sys/socket.h is being used, and let the socket class handle it based on the environment.

JaviLib commented 10 years ago

You are right, sys/sockect.h is something from the GNU libc library, not available on Windows unless something like Cygwin is installed.

BTW, I'm concentrating on the design of the nodepool in this moment. Look at the new additions to the paper and nodepool.sql. Meanwhile you can try to find solutions for cross-plattform compability, and probably add a script to configure. I removed the socket.h dependence.

SbSpider commented 10 years ago

Hello I also noticed that openssl/ssh.h and sqlite.h aren't included by default. Perhaps we should start bundling dependencies?

As for the cross platform - configure scripts are a bit of a stop point for me. I'll see if I can make do with #defines for now, and look at configure scripts a little later

arpunk commented 10 years ago

The current C code is a proof of concept and it's evolving, but dependencies with OpenSSL and SQLite are unavoidable. I think we should avoid bundling dependencies unless we have to patch them.

What issues are you having with the configure scripts?