Add support for compiling under MinGW + fix Windows compiling in general

This commit is contained in:
wuggy 2026-04-17 15:05:11 -07:00
commit a5cf494890
56 changed files with 243 additions and 76 deletions

View file

@ -10,9 +10,9 @@
#error This file only makes sense on Windows.
#endif
#include <stdlib.h>
#include <windows.h>
#include <nscore.h>
#include <stdlib.h>
namespace mozilla {

View file

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(XP_WIN)
#include <stdlib.h>
#include <windows.h>
#include <objbase.h>
#elif defined(XP_MACOSX)

View file

@ -6,6 +6,7 @@
/*****************************
Windows implementation of probes, using xperf
*****************************/
#include <stdlib.h>
#include <windows.h>
#include <wmistr.h>
#include <evntrace.h>

View file

@ -3,9 +3,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <stdlib.h>
#include <windows.h>
#include <shlwapi.h>
#include <stdlib.h>
#include "nsWindowsRegKey.h"
#include "nsString.h"
#include "nsCOMPtr.h"

View file

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "FileUtilsWin.h"
#include <stdlib.h>
#include <windows.h>
#include <psapi.h>

View file

@ -6,6 +6,7 @@
#ifndef mozilla_FileUtilsWin_h
#define mozilla_FileUtilsWin_h
#include <stdlib.h>
#include <windows.h>
#include "mozilla/Scoped.h"

View file

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <stdlib.h>
#include "SpecialSystemDirectory.h"
#include "nsString.h"
#include "nsDependentString.h"
@ -10,9 +11,9 @@
#if defined(XP_WIN)
#include <stdlib.h>
#include <windows.h>
#include <shlobj.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <direct.h>

View file

@ -19,11 +19,11 @@
#include <Carbon/Carbon.h>
#include "nsILocalFileMac.h"
#elif defined(XP_WIN)
#include <stdlib.h>
#include <windows.h>
#include <shlobj.h>
#elif defined(XP_UNIX)
#include <unistd.h>
#include <stdlib.h>
#include <sys/param.h>
#endif

View file

@ -19,9 +19,9 @@
#include "nsIStringEnumerator.h"
#if defined(XP_WIN)
#include <stdlib.h>
#include <windows.h>
#include <shlobj.h>
#include <stdlib.h>
#include <stdio.h>
#elif defined(XP_UNIX)
#include <unistd.h>

View file

@ -29,16 +29,16 @@
#include "nsReadableUtils.h"
#include <direct.h>
#include <windows.h>
#include <stdlib.h>
#include <shlwapi.h>
#include <aclapi.h>
#include <windows.h>
#include "shellapi.h"
#include "shlguid.h"
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <mbstring.h>
#include "nsXPIDLString.h"

View file

@ -9,7 +9,7 @@
// Windows
//-----------------------------------------------------------------------------
#if defined(XP_WIN)
#include <stdlib.h>
#include <windows.h>
#include "nsString.h"
#include "nsAString.h"

View file

@ -519,14 +519,16 @@ nsTimerImpl::Fire(int32_t aGeneration)
this, (TimeStamp::Now() - now).ToMilliseconds()));
}
#if defined(HAVE_DLADDR) && defined(HAVE___CXA_DEMANGLE)
#if defined(HAVE_DLADDR) && defined(HAVE___CXA_DEMANGLE) && !defined(XP_WIN)
#define USE_DLADDR 1
#endif
#ifdef USE_DLADDR
#if !defined(XP_WIN)
#include <cxxabi.h>
#include <dlfcn.h>
#endif
#endif
// See the big comment above GetTimerFiringsLog() to understand this code.
void

View file

@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Windows only app to show a modal debug dialog - launched by nsDebug.cpp */
#include <windows.h>
#include <stdlib.h>
#include <windows.h>
#ifdef _MSC_VER
#include <strsafe.h>
#endif