mirror of
https://github.com/janet-lang/janet
synced 2025-02-03 18:59:09 +00:00
Make sure winsock2.h is included before windows.h
This should be true in the normal build, and especially in the amalgamated build.
This commit is contained in:
parent
657fae490c
commit
1bb9a9368b
@ -2852,6 +2852,14 @@
|
|||||||
(each h local-headers
|
(each h local-headers
|
||||||
(do-one-file h))
|
(do-one-file h))
|
||||||
|
|
||||||
|
# windows.h should not be included in any of the external or internal headers - only in .c files.
|
||||||
|
(print)
|
||||||
|
(print "/* Windows work around - winsock2 must be included before windows.h, especially in amalgamated build */")
|
||||||
|
(print "#if defined(JANET_WINDOWS) && defined(JANET_NET)")
|
||||||
|
(print "#include <winsock2.h>")
|
||||||
|
(print "#endif")
|
||||||
|
(print)
|
||||||
|
|
||||||
(each s core-sources
|
(each s core-sources
|
||||||
(do-one-file s))
|
(do-one-file s))
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <windows.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#pragma comment (lib, "Ws2_32.lib")
|
#pragma comment (lib, "Ws2_32.lib")
|
||||||
#pragma comment (lib, "Mswsock.lib")
|
#pragma comment (lib, "Mswsock.lib")
|
||||||
|
Loading…
Reference in New Issue
Block a user