File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#pragma once
22
33#ifdef _WIN32
4+ // Prevent old winsock.h from being included anywhere
5+ #ifndef _WINSOCKAPI_
6+ #define _WINSOCKAPI_
7+ #endif
8+
9+ // Configure Windows headers
10+ #ifndef WIN32_LEAN_AND_MEAN
411#define WIN32_LEAN_AND_MEAN
12+ #endif
13+ #ifndef NOMINMAX
14+ #define NOMINMAX
15+ #endif
16+
17+ // Include networking headers in correct order
518#include < winsock2.h>
619#include < ws2tcpip.h>
20+
21+ // Now windows.h won't include winsock.h
22+ #include < windows.h>
23+
724#pragma comment(lib, "ws2_32.lib")
825typedef int socklen_t ;
926#define CLOSE_SOCKET closesocket
@@ -14,11 +31,3 @@ typedef int socklen_t;
1431#include < unistd.h>
1532#define CLOSE_SOCKET close
1633#endif
17-
18- // PSMoveAPI compatibility - only define what's not in the main headers
19- #ifndef PSMOVE_BTADDR_SIZE
20- #define PSMOVE_BTADDR_SIZE 6
21- typedef struct {
22- unsigned char data[PSMOVE_BTADDR_SIZE];
23- } PSMove_Data_BTAddr;
24- #endif
You can’t perform that action at this time.
0 commit comments