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,11 @@
#ifndef TOU_UNIVERSAL_NETWORK_HEADER
#define TOU_UNIVERSAL_NETWORK_HEADER
/* Some Types need to be defined before the interface can be declared
*/
#include "util/rsnet.h"
/* C Interface */
#ifdef __cplusplus
extern "C" {
@ -58,32 +63,6 @@ extern "C" {
* int tounet_checkTTL(); a check if we can modify the ttl
*/
/* Some Types need to be defined before the interface can be declared
*/
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
#ifndef WINDOWS_SYS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <errno.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h> /* for ssize_t */
typedef int socklen_t;
typedef unsigned long in_addr_t;
#endif
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
/* the universal interface */
int tounet_errno(); /* for internal networking errors */