mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
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:
parent
9e954e9c0f
commit
9bdd44d0f5
29 changed files with 218 additions and 86 deletions
|
@ -15,12 +15,12 @@ RSOBJ += tcppacket.o tcpstream.o tou.o $(BIOOBJ)
|
|||
EXECS = librs udpsock_test udpsort_test udp_server
|
||||
#test_tou pair_tou reset_tou internal_tou largefile_tou
|
||||
|
||||
TESTOBJ = udpsock_test.o udpsort_test.o udp_server.o test_tou.o
|
||||
TESTOBJ += pair_tou.o reset_tou.o largefile_tou.o
|
||||
#TESTOBJ = udpsock_test.o udpsort_test.o udp_server.o test_tou.o
|
||||
#TESTOBJ += pair_tou.o reset_tou.o largefile_tou.o
|
||||
#internal_tou.o
|
||||
|
||||
TESTS = udpsock_test udpsort_test udp_server test_tou
|
||||
TESTS += pair_tou reset_tou largefile_tou
|
||||
#TESTS = udpsock_test udpsort_test udp_server test_tou
|
||||
#TESTS += pair_tou reset_tou largefile_tou
|
||||
#internal_tou
|
||||
|
||||
all: librs tests
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue