WPRFLAG is defined when _UNICODE is defined. So replace all usage of
WPRFLAG by _UNICODE and remove unused WPRFLAG macro.
---
mingw-w64-crt/crt/crtexe.c | 6 +++---
mingw-w64-crt/crt/dll_argv.c | 3 +--
mingw-w64-crt/crt/dllargv.c | 3 +--
mingw-w64-crt/crt/ucrtexe.c | 1 -
mingw-w64-crt/crt/ucrtexewin.c | 1 -
mingw-w64-crt/crt/udll_argv.c | 1 -
mingw-w64-crt/crt/udllargc.c | 1 -
7 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index 883f8e7d64c8..99e310017eec 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -119,7 +119,7 @@ pre_c_init (void)
* __p__fmode() = _fmode;
* __p__commode() = _commode;
-#ifdef WPRFLAG
+#ifdef _UNICODE
_wsetargv();
#else
_setargv();
@@ -140,7 +140,7 @@ pre_cpp_init (void)
{
startinfo.newmode = _newmode;
-#ifdef WPRFLAG
+#ifdef _UNICODE
argret = __wgetmainargs(&argc,&argv,&envp,_dowildcard,&startinfo);
#else
argret = __getmainargs(&argc,&argv,&envp,_dowildcard,&startinfo);
@@ -262,7 +262,7 @@ __tmainCRTStartup (void)
duplicate_ppstrings (argc, &argv);
__main (); /* C++ initialization. */
-#ifdef WPRFLAG
+#ifdef _UNICODE
__winitenv = envp;
#else
__initenv = envp;
diff --git a/mingw-w64-crt/crt/dll_argv.c b/mingw-w64-crt/crt/dll_argv.c
index 22397af50c1a..19eeda7cd6d9 100644
--- a/mingw-w64-crt/crt/dll_argv.c
+++ b/mingw-w64-crt/crt/dll_argv.c
@@ -12,11 +12,10 @@
extern int _dowildcard;
-#ifdef WPRFLAG
int __CRTDECL
+#ifdef _UNICODE
__wsetargv (void)
#else
-int __CRTDECL
__setargv (void)
#endif
{
diff --git a/mingw-w64-crt/crt/dllargv.c b/mingw-w64-crt/crt/dllargv.c
index 7cd98dad82fe..df0453430d0e 100644
--- a/mingw-w64-crt/crt/dllargv.c
+++ b/mingw-w64-crt/crt/dllargv.c
@@ -10,11 +10,10 @@
#include <internal.h>
-#ifdef WPRFLAG
int __CRTDECL
+#ifdef _UNICODE
_wsetargv (void)
#else
-int __CRTDECL
_setargv (void)
#endif
{
diff --git a/mingw-w64-crt/crt/ucrtexe.c b/mingw-w64-crt/crt/ucrtexe.c
index 41f652e47586..fd9f75e23991 100644
--- a/mingw-w64-crt/crt/ucrtexe.c
+++ b/mingw-w64-crt/crt/ucrtexe.c
@@ -10,7 +10,6 @@
#ifndef _UNICODE
#define _UNICODE
#endif
-#define WPRFLAG 1
#include "crtexe.c"
diff --git a/mingw-w64-crt/crt/ucrtexewin.c b/mingw-w64-crt/crt/ucrtexewin.c
index 51897d91ca5c..e3b7d4ddc25b 100644
--- a/mingw-w64-crt/crt/ucrtexewin.c
+++ b/mingw-w64-crt/crt/ucrtexewin.c
@@ -10,6 +10,5 @@
#ifndef _UNICODE
#define _UNICODE
#endif
-#define WPRFLAG 1
#include "crtexewin.c"
diff --git a/mingw-w64-crt/crt/udll_argv.c b/mingw-w64-crt/crt/udll_argv.c
index a60927cffed2..b834304d6c22 100644
--- a/mingw-w64-crt/crt/udll_argv.c
+++ b/mingw-w64-crt/crt/udll_argv.c
@@ -10,7 +10,6 @@
#ifndef _UNICODE
#define _UNICODE
#endif
-#define WPRFLAG 1
#include "dll_argv.c"
diff --git a/mingw-w64-crt/crt/udllargc.c b/mingw-w64-crt/crt/udllargc.c
index f6ab6b1a77b9..46977a9f657d 100644
--- a/mingw-w64-crt/crt/udllargc.c
+++ b/mingw-w64-crt/crt/udllargc.c
@@ -10,7 +10,6 @@
#ifndef _UNICODE
#define _UNICODE
#endif
-#define WPRFLAG 1
#include "dllargv.c"
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public