2 * This file is part of DisOrder.
3 * Copyright (C) 2013 Richard Kettlewell
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 /** @file lib/disorder-win32.h
19 * @brief Windows support
21 #ifndef DISORDER_WIN32_H
22 # define DISORDER_WIN32_H
24 #define HAVE_WS2TCPIP_H 1
25 #define HAVE_SHLOBJ_H 1
26 #define HAVE_BCRYPT_H 1
27 #define HAVE_CLOSESOCKET 1
32 #define access _access /* quieten compiler */
36 #define attribute(x) /* nothing */
37 #define declspec(x) __declspec(x)
38 #define inline __inline
39 #define DEFAULT_SOX_GENERATION 1
51 #define S_ISREG(mode) ((mode) & _S_IFREG)
52 #define S_ISDIR(mode) ((mode) & _S_IFDIR)
53 #define strcasecmp _stricmp
56 typedef long long ssize_t
;
60 typedef int socklen_t
;
61 typedef long long int64_t;
62 typedef unsigned long long uint64_t;
67 int gettimeofday(struct timeval
*tv
, struct timezone
*tz
);
68 char *win_wtomb(const wchar_t *ws
);
69 void network_init(void);
71 #define socket_error() (WSAGetLastError())
72 #define system_error() (GetLastError())
74 #pragma comment(lib, "Ws2_32.lib")