Value of __mingw_module_is_dll must not be changed during runtime.
---
mingw-w64-crt/crt/crtdll.c | 2 +-
mingw-w64-crt/crt/crtexe.c | 2 +-
mingw-w64-crt/crt/tls_atexit.c | 2 +-
mingw-w64-crt/misc/ucrt_at_quick_exit.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 0aef8eea810e..c2982b39e274 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -210,4 +210,4 @@ i__leave:
return retcode ;
}
-char __mingw_module_is_dll = 1;
+const char __mingw_module_is_dll = 1;
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index 5ffbe601beff..e7dbcff82131 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -338,4 +338,4 @@ int __cdecl atexit (_PVFV func)
return _crt_atexit(func);
}
-char __mingw_module_is_dll = 0;
+const char __mingw_module_is_dll = 0;
diff --git a/mingw-w64-crt/crt/tls_atexit.c b/mingw-w64-crt/crt/tls_atexit.c
index 36ec633a562b..337a1a8d3ba8 100644
--- a/mingw-w64-crt/crt/tls_atexit.c
+++ b/mingw-w64-crt/crt/tls_atexit.c
@@ -30,7 +30,7 @@ struct dtor_obj {
};
HANDLE __dso_handle;
-extern char __mingw_module_is_dll;
+extern const char __mingw_module_is_dll;
static CRITICAL_SECTION lock;
static int inited = 0;
diff --git a/mingw-w64-crt/misc/ucrt_at_quick_exit.c
b/mingw-w64-crt/misc/ucrt_at_quick_exit.c
index 5999552a0f2c..ac536147216b 100644
--- a/mingw-w64-crt/misc/ucrt_at_quick_exit.c
+++ b/mingw-w64-crt/misc/ucrt_at_quick_exit.c
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include <corecrt_startup.h>
-extern char __mingw_module_is_dll;
+extern const char __mingw_module_is_dll;
int __cdecl at_quick_exit(void (__cdecl *func)(void))
{
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public