From 950509a411325066153614e5f51f6804be6be0b5 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 18 Sep 2019 18:52:32 -0500
Subject: [PATCH] Revert "uxtheme: Build with msvcrt."

This reverts commit 21a19fb4e35f4b8c61958ba25b0058c1e090f2b3.
---
 dlls/uxtheme/Makefile.in |  2 --
 dlls/uxtheme/buffer.c    |  2 ++
 dlls/uxtheme/draw.c      |  2 ++
 dlls/uxtheme/main.c      |  2 ++
 dlls/uxtheme/metric.c    |  2 ++
 dlls/uxtheme/msstyles.c  | 17 ++++++++++-------
 dlls/uxtheme/property.c  |  2 ++
 dlls/uxtheme/stylemap.c  |  2 ++
 dlls/uxtheme/system.c    |  2 ++
 dlls/uxtheme/uxini.c     |  2 ++
 10 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/dlls/uxtheme/Makefile.in b/dlls/uxtheme/Makefile.in
index 61817ee5468..c3fff30ba90 100644
--- a/dlls/uxtheme/Makefile.in
+++ b/dlls/uxtheme/Makefile.in
@@ -3,8 +3,6 @@ IMPORTLIB = uxtheme
 IMPORTS   = user32 gdi32 advapi32
 DELAYIMPORTS = msimg32
 
-EXTRADLLFLAGS = -mno-cygwin
-
 C_SRCS = \
 	buffer.c \
 	draw.c \
diff --git a/dlls/uxtheme/buffer.c b/dlls/uxtheme/buffer.c
index b07284f8e06..32d341cb7f9 100644
--- a/dlls/uxtheme/buffer.c
+++ b/dlls/uxtheme/buffer.c
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <stdarg.h>
 
diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c
index 3dcc58205b0..69c53b9ebc3 100644
--- a/dlls/uxtheme/draw.c
+++ b/dlls/uxtheme/draw.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <stdarg.h>
 
diff --git a/dlls/uxtheme/main.c b/dlls/uxtheme/main.c
index 5e5610a1f84..73894e820ab 100644
--- a/dlls/uxtheme/main.c
+++ b/dlls/uxtheme/main.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 
 #include "windef.h"
diff --git a/dlls/uxtheme/metric.c b/dlls/uxtheme/metric.c
index 2d5a09d0256..073422f1cda 100644
--- a/dlls/uxtheme/metric.c
+++ b/dlls/uxtheme/metric.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 
 #include "windef.h"
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c
index 5030e52a597..9bbfd5e5b53 100644
--- a/dlls/uxtheme/msstyles.c
+++ b/dlls/uxtheme/msstyles.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <stdlib.h>
 
@@ -33,6 +35,7 @@
 #include "msstyles.h"
 
 #include "wine/exception.h"
+#include "wine/unicode.h"
 #include "wine/debug.h"
 #include "wine/heap.h"
 
@@ -353,7 +356,7 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
     *iStateId = 0;
     comp = sec;
     /* Get the application name */
-    tmp = wcschr(comp, ':');
+    tmp = strchrW(comp, ':');
     if(tmp) {
         *tmp++ = 0;
         tmp++;
@@ -361,19 +364,19 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
         comp = tmp;
     }
 
-    tmp = wcschr(comp, '.');
+    tmp = strchrW(comp, '.');
     if(tmp) {
         *tmp++ = 0;
         lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
         comp = tmp;
         /* now get the part & state */
-        tmp = wcschr(comp, '(');
+        tmp = strchrW(comp, '(');
         if(tmp) {
             *tmp++ = 0;
             lstrcpynW(part, comp, ARRAY_SIZE(part));
             comp = tmp;
             /* now get the state */
-            tmp = wcschr(comp, ')');
+            tmp = strchrW(comp, ')');
             if (!tmp)
                 return FALSE;
             *tmp = 0;
@@ -384,13 +387,13 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
         }
     }
     else {
-        tmp = wcschr(comp, '(');
+        tmp = strchrW(comp, '(');
         if(tmp) {
             *tmp++ = 0;
             lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
             comp = tmp;
             /* now get the state */
-            tmp = wcschr(comp, ')');
+            tmp = strchrW(comp, ')');
             if (!tmp)
                 return FALSE;
             *tmp = 0;
@@ -1014,7 +1017,7 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
     }
 
     start = pszClassList;
-    while((end = wcschr(start, ';'))) {
+    while((end = strchrW(start, ';'))) {
         len = end-start;
         lstrcpynW(szClassName, start, min(len+1, ARRAY_SIZE(szClassName)));
         start = end+1;
diff --git a/dlls/uxtheme/property.c b/dlls/uxtheme/property.c
index 93a72ab9189..0e077aeec46 100644
--- a/dlls/uxtheme/property.c
+++ b/dlls/uxtheme/property.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 
 #include "windef.h"
diff --git a/dlls/uxtheme/stylemap.c b/dlls/uxtheme/stylemap.c
index 149ee0eb524..19e3c932240 100644
--- a/dlls/uxtheme/stylemap.c
+++ b/dlls/uxtheme/stylemap.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 
 #include "windef.h"
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c
index 6e9c0f22369..c898ad32e2f 100644
--- a/dlls/uxtheme/system.c
+++ b/dlls/uxtheme/system.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <stdio.h>
 
diff --git a/dlls/uxtheme/uxini.c b/dlls/uxtheme/uxini.c
index 361e7f13fa5..1581ff469a5 100644
--- a/dlls/uxtheme/uxini.c
+++ b/dlls/uxtheme/uxini.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 
 #include "windef.h"
-- 
2.17.1

