Changes required to get Retroshare V0.4 working under windows.

Most of these changes relate to:
 (1) rand() is different 
 (2) sleep() don't exist on Windows.
 (3) networking headers are different - these need to be cleaned up in general.
 (4) disabled tests that won't compile on Windows.

Will probably have to rollback some of these changes for Unix later.





git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@372 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-03 14:41:15 +00:00
parent 9e954e9c0f
commit 9bdd44d0f5
29 changed files with 218 additions and 86 deletions

View file

@ -28,6 +28,7 @@
#ifndef MRK_PQI_NETWORKING_HEADER
#define MRK_PQI_NETWORKING_HEADER
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
#ifndef WINDOWS_SYS
@ -47,20 +48,21 @@
/* This defines the platform to be WinXP or later...
* and is needed for getaddrinfo.... (not used anymore)
*
#define _WIN32_WINNT 0x0501
*/
#define _WIN32_WINNT 0x0501
#include "util/rsnet.h" /* more generic networking header */
#include <winsock2.h>
#include <ws2tcpip.h>
typedef int socklen_t;
typedef unsigned long in_addr_t;
//typedef unsigned long in_addr_t;
// Some Network functions that are missing from windows.
in_addr_t inet_netof(struct in_addr addr);
in_addr_t inet_network(char *inet_name);
in_addr_t inet_network(const char *inet_name);
int inet_aton(const char *name, struct in_addr *addr);
extern int errno; /* Define extern errno, to duplicate unix behaviour */