blob: 93b9802da4525390aa159abb563ef8614fbb2bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifndef SYNC_DEVICE_H
#define SYNC_DEVICE_H
#include "base.h"
#include "sync.h"
#ifndef SYNC_PLAYER
/* configure socket-stack */
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define USE_GETADDRINFO
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <limits.h>
#elif defined(USE_AMITCP)
#include <sys/socket.h>
#include <proto/exec.h>
#include <proto/socket.h>
#include <netdb.h>
#define SOCKET int
#define INVALID_SOCKET -1
#define select(n,r,w,e,t) WaitSelect(n,r,w,e,t,0)
#define closesocket(x) CloseSocket(x)
#else
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#define SOCKET int
#define INVALID_SOCKET -1
#define closesocket(x) close(x)
#endif
#endif /* !defined(SYNC_PLAYER) */
struct sync_device {
char *base;
struct sync_track **tracks;
size_t num_tracks;
#ifndef SYNC_PLAYER
int row;
SOCKET sock;
#endif
struct sync_io_cb io_cb;
};
#endif /* SYNC_DEVICE_H */
|