You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
openssl: Reapply necessary UWP changes from patch
This commit is contained in:
1
thirdparty/README.md
vendored
1
thirdparty/README.md
vendored
@@ -266,6 +266,7 @@ Files extracted from the upstream source:
|
|||||||
```
|
```
|
||||||
For the rest check the `git status` and decide.
|
For the rest check the `git status` and decide.
|
||||||
- e_os.h
|
- e_os.h
|
||||||
|
- Apply the Godot-specific patches in the `patches/` folder.
|
||||||
|
|
||||||
## opus
|
## opus
|
||||||
|
|
||||||
|
|||||||
9
thirdparty/openssl/crypto/rand/rand_win.c
vendored
9
thirdparty/openssl/crypto/rand/rand_win.c
vendored
@@ -118,8 +118,10 @@
|
|||||||
# ifndef _WIN32_WINNT
|
# ifndef _WIN32_WINNT
|
||||||
# define _WIN32_WINNT 0x0400
|
# define _WIN32_WINNT 0x0400
|
||||||
# endif
|
# endif
|
||||||
|
#ifndef UWP_ENABLED // -- GODOT --
|
||||||
# include <wincrypt.h>
|
# include <wincrypt.h>
|
||||||
# include <tlhelp32.h>
|
# include <tlhelp32.h>
|
||||||
|
#endif // -- GODOT --
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Limit the time spent walking through the heap, processes, threads and
|
* Limit the time spent walking through the heap, processes, threads and
|
||||||
@@ -161,7 +163,7 @@ typedef struct tagCURSORINFO {
|
|||||||
# define CURSOR_SHOWING 0x00000001
|
# define CURSOR_SHOWING 0x00000001
|
||||||
# endif /* CURSOR_SHOWING */
|
# endif /* CURSOR_SHOWING */
|
||||||
|
|
||||||
# if !defined(OPENSSL_SYS_WINCE)
|
# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED) // -- GODOT --
|
||||||
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
|
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
|
||||||
DWORD, DWORD);
|
DWORD, DWORD);
|
||||||
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
|
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
|
||||||
@@ -196,6 +198,7 @@ typedef NET_API_STATUS(NET_API_FUNCTION *NETFREE) (LPBYTE);
|
|||||||
# endif /* 1 */
|
# endif /* 1 */
|
||||||
# endif /* !OPENSSL_SYS_WINCE */
|
# endif /* !OPENSSL_SYS_WINCE */
|
||||||
|
|
||||||
|
#if !defined(UWP_ENABLED) // -- GODOT --
|
||||||
int RAND_poll(void)
|
int RAND_poll(void)
|
||||||
{
|
{
|
||||||
MEMORYSTATUS m;
|
MEMORYSTATUS m;
|
||||||
@@ -580,6 +583,8 @@ int RAND_poll(void)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // UWP_ENABLED // -- GODOT --
|
||||||
|
|
||||||
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
|
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
double add_entropy = 0;
|
double add_entropy = 0;
|
||||||
@@ -682,7 +687,7 @@ static void readtimer(void)
|
|||||||
|
|
||||||
static void readscreen(void)
|
static void readscreen(void)
|
||||||
{
|
{
|
||||||
# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
|
# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED) // -- GODOT --
|
||||||
HDC hScrDC; /* screen DC */
|
HDC hScrDC; /* screen DC */
|
||||||
HBITMAP hBitmap; /* handle for our bitmap */
|
HBITMAP hBitmap; /* handle for our bitmap */
|
||||||
BITMAP bm; /* bitmap properties */
|
BITMAP bm; /* bitmap properties */
|
||||||
|
|||||||
3
thirdparty/openssl/openssl/dtls1.h
vendored
3
thirdparty/openssl/openssl/dtls1.h
vendored
@@ -78,6 +78,9 @@
|
|||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
#ifdef UWP_ENABLED // -- GODOT start --
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif // -- GODOT end --
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
diff --git a/drivers/builtin_openssl2/crypto/rand/rand_win.c b/drivers/builtin_openssl2/crypto/rand/rand_win.c
|
diff --git a/thirdparty/openssl/crypto/rand/rand_win.c b/thirdparty/openssl/crypto/rand/rand_win.c
|
||||||
index 06670ae..70fd52a 100644
|
index 06670ae01..cb4093128 100644
|
||||||
--- a/drivers/builtin_openssl2/crypto/rand/rand_win.c
|
--- a/thirdparty/openssl/crypto/rand/rand_win.c
|
||||||
+++ b/drivers/builtin_openssl2/crypto/rand/rand_win.c
|
+++ b/thirdparty/openssl/crypto/rand/rand_win.c
|
||||||
@@ -118,8 +118,10 @@
|
@@ -118,8 +118,10 @@
|
||||||
# ifndef _WIN32_WINNT
|
# ifndef _WIN32_WINNT
|
||||||
# define _WIN32_WINNT 0x0400
|
# define _WIN32_WINNT 0x0400
|
||||||
# endif
|
# endif
|
||||||
+#ifndef UWP_ENABLED
|
+#ifndef UWP_ENABLED // -- GODOT --
|
||||||
# include <wincrypt.h>
|
# include <wincrypt.h>
|
||||||
# include <tlhelp32.h>
|
# include <tlhelp32.h>
|
||||||
+#endif
|
+#endif // -- GODOT --
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Limit the time spent walking through the heap, processes, threads and
|
* Limit the time spent walking through the heap, processes, threads and
|
||||||
@@ -18,7 +18,7 @@ index 06670ae..70fd52a 100644
|
|||||||
# endif /* CURSOR_SHOWING */
|
# endif /* CURSOR_SHOWING */
|
||||||
|
|
||||||
-# if !defined(OPENSSL_SYS_WINCE)
|
-# if !defined(OPENSSL_SYS_WINCE)
|
||||||
+# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED)
|
+# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED) // -- GODOT --
|
||||||
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
|
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
|
||||||
DWORD, DWORD);
|
DWORD, DWORD);
|
||||||
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
|
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
|
||||||
@@ -26,7 +26,7 @@ index 06670ae..70fd52a 100644
|
|||||||
# endif /* 1 */
|
# endif /* 1 */
|
||||||
# endif /* !OPENSSL_SYS_WINCE */
|
# endif /* !OPENSSL_SYS_WINCE */
|
||||||
|
|
||||||
+#if !defined(UWP_ENABLED)
|
+#if !defined(UWP_ENABLED) // -- GODOT --
|
||||||
int RAND_poll(void)
|
int RAND_poll(void)
|
||||||
{
|
{
|
||||||
MEMORYSTATUS m;
|
MEMORYSTATUS m;
|
||||||
@@ -34,7 +34,7 @@ index 06670ae..70fd52a 100644
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
+#endif // UWP_ENABLED
|
+#endif // UWP_ENABLED // -- GODOT --
|
||||||
+
|
+
|
||||||
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
|
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
@@ -44,21 +44,21 @@ index 06670ae..70fd52a 100644
|
|||||||
static void readscreen(void)
|
static void readscreen(void)
|
||||||
{
|
{
|
||||||
-# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
|
-# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
|
||||||
+# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED)
|
+# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED) // -- GODOT --
|
||||||
HDC hScrDC; /* screen DC */
|
HDC hScrDC; /* screen DC */
|
||||||
HBITMAP hBitmap; /* handle for our bitmap */
|
HBITMAP hBitmap; /* handle for our bitmap */
|
||||||
BITMAP bm; /* bitmap properties */
|
BITMAP bm; /* bitmap properties */
|
||||||
diff --git a/drivers/builtin_openssl2/openssl/dtls1.h b/drivers/builtin_openssl2/openssl/dtls1.h
|
diff --git a/thirdparty/openssl/openssl/dtls1.h b/thirdparty/openssl/openssl/dtls1.h
|
||||||
index 64ad3c8..a58aca2 100644
|
index 30bbcf278..81d28c29c 100644
|
||||||
--- a/drivers/builtin_openssl2/openssl/dtls1.h
|
--- a/thirdparty/openssl/openssl/dtls1.h
|
||||||
+++ b/drivers/builtin_openssl2/openssl/dtls1.h
|
+++ b/thirdparty/openssl/openssl/dtls1.h
|
||||||
@@ -81,6 +81,9 @@
|
@@ -78,6 +78,9 @@
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
+#ifdef UWP_ENABLED
|
+#ifdef UWP_ENABLED // -- GODOT start --
|
||||||
+#include <winsock2.h>
|
+#include <winsock2.h>
|
||||||
+#endif
|
+#endif // -- GODOT end --
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
Reference in New Issue
Block a user