mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 00:43:07 +09:00
Finally finish with MinGW building (linking still has some issues shush)
This commit is contained in:
parent
ad07988f5b
commit
854f39b4ab
32 changed files with 104 additions and 19 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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 "nsIEHistoryEnumerator.h"
|
||||
|
||||
#include <urlhist.h>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifndef iehistoryenumerator___h___
|
||||
#define iehistoryenumerator___h___
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <urlhist.h>
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ if CONFIG['MOZ_DEBUG']:
|
|||
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
|
||||
DEFINES['HAVE_MALLOC_USABLE_SIZE'] = True
|
||||
DEFINES['SQLITE_WITHOUT_MSIZE'] = True
|
||||
CFLAGS += ['-wd4013']
|
||||
if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
|
||||
CFLAGS += ['-wd4013']
|
||||
|
||||
# Omit unused functions to save some library footprint.
|
||||
DEFINES['SQLITE_OMIT_DEPRECATED'] = True
|
||||
|
|
|
|||
|
|
@ -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 "mozilla/PluginPRLibrary.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ TranslateVersionStr(const WCHAR* szVersion, verBlock *vbVersion)
|
|||
// wcstok that is generally not thread-safe. For our purposes here, it works
|
||||
// fine, though.
|
||||
auto wcstok = [](wchar_t* strToken, const wchar_t* strDelimit,
|
||||
wchar_t** /*ctx*/) {
|
||||
return ::std::wcstok(strToken, strDelimit);
|
||||
wchar_t** ctx) {
|
||||
return ::wcstok(strToken, strDelimit, ctx);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#endif // defined(XP_MACOSX)
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <accctrl.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef MOZILLA_GFX_EXTENDINPUTEFFECTD2D1_H_
|
||||
#define MOZILLA_GFX_EXTENDINPUTEFFECTD2D1_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <d2d1_1.h>
|
||||
#include <d2d1effectauthor.h>
|
||||
#include <d2d1effecthelpers.h>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef mozilla_gfx_NativeFontResourceDWrite_h
|
||||
#define mozilla_gfx_NativeFontResourceDWrite_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <dwrite.h>
|
||||
|
||||
#include "2D.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef mozilla_gfx_NativeFontResourceGDI_h
|
||||
#define mozilla_gfx_NativeFontResourceGDI_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "2D.h"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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 "PathD2D.h"
|
||||
#include "HelpersD2D.h"
|
||||
#include <math.h>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef MOZILLA_GFX_PATHD2D_H_
|
||||
#define MOZILLA_GFX_PATHD2D_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <d2d1.h>
|
||||
|
||||
#include "2D.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef MOZILLA_GFX_RADIALGRADIENTEFFECTD2D1_H_
|
||||
#define MOZILLA_GFX_RADIALGRADIENTEFFECTD2D1_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <d2d1_1.h>
|
||||
#include <d2d1effectauthor.h>
|
||||
#include <d2d1effecthelpers.h>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef MOZILLA_GFX_SOURCESURFACED2D1_H_
|
||||
#define MOZILLA_GFX_SOURCESURFACED2D1_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "2D.h"
|
||||
#include "HelpersD2D.h"
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef MOZILLA_GFX_SOURCESURFACESKIA_H_
|
||||
#define MOZILLA_GFX_SOURCESURFACESKIA_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "2D.h"
|
||||
#include <vector>
|
||||
#include "skia/include/core/SkCanvas.h"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
# WARNING WARNING WARNING
|
||||
#
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'src/common/angleutils.cpp',
|
||||
'src/common/debug.cpp',
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
# WARNING WARNING WARNING
|
||||
#
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'../common/angleutils.cpp',
|
||||
'../common/debug.cpp',
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
# WARNING WARNING WARNING
|
||||
#
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'entry_points_egl.cpp',
|
||||
'entry_points_egl_ext.cpp',
|
||||
|
|
|
|||
|
|
@ -13,7 +13,15 @@
|
|||
#include <intrin.h>
|
||||
static void cpuid (uint32_t abcd[4]) { __cpuid ((int*)abcd, 1); }
|
||||
static void cpuid7(uint32_t abcd[4]) { __cpuidex((int*)abcd, 7, 0); }
|
||||
static uint64_t xgetbv(uint32_t xcr) { return _xgetbv(xcr); }
|
||||
static uint64_t xgetbv(uint32_t xcr) {
|
||||
#if defined(__MINGW32__)
|
||||
uint32_t eax, edx;
|
||||
__asm__ __volatile__ ("xgetbv" : "=a"(eax), "=d"(edx) : "c"(xcr));
|
||||
return (uint64_t)(edx) << 32 | eax;
|
||||
#else
|
||||
return _xgetbv(xcr);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#include <cpuid.h>
|
||||
#if !defined(__cpuid_count) // Old Mac Clang doesn't have this defined.
|
||||
|
|
|
|||
|
|
@ -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 <windows.h>
|
||||
|
||||
#include "nsMathUtils.h"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
* XXX to get CAIRO_HAS_D2D_SURFACE, CAIRO_HAS_DWRITE_FONT
|
||||
* and cairo_win32_scaled_font_select_font
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "cairo-win32.h"
|
||||
|
||||
#include "gfxFontUtils.h"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ av_fft_calc
|
|||
av_fft_end
|
||||
av_fft_init
|
||||
av_fft_permute
|
||||
av_fopen_utf8
|
||||
av_free_packet
|
||||
av_get_audio_frame_duration
|
||||
av_get_audio_frame_duration2
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* accompanying file LICENSE for details.
|
||||
*/
|
||||
#define NOMINMAX
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <initguid.h>
|
||||
#include <windows.h>
|
||||
#include <mmdeviceapi.h>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
#include "cubeb/cubeb.h"
|
||||
#include "cubeb-internal.h"
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#define _snprintf_s(dest, size, count, ...) snprintf(dest, size, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/* This is missing from the MinGW headers. Use a safe fallback. */
|
||||
#if !defined(MEMORY_ALLOCATION_ALIGNMENT)
|
||||
#define MEMORY_ALLOCATION_ALIGNMENT 16
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <mozilla/Assertions.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Provide an abort function for use in jemalloc code */
|
||||
extern "C" void moz_abort() {
|
||||
MOZ_CRASH();
|
||||
abort();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,10 @@
|
|||
#include <windows.h>
|
||||
#include <intrin.h>
|
||||
|
||||
#ifndef min
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#pragma warning( disable: 4267 4996 4146 )
|
||||
|
||||
#define bool BOOL
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef nsDownloadScanner_h_
|
||||
#define nsDownloadScanner_h_
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef WIN32_LEAN_AND_MEAN
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef ProfileUnlockerWin_h
|
||||
#define ProfileUnlockerWin_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <restartmanager.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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 "nspr.h"
|
||||
#include "mozilla/BasicEvents.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifndef nsDocLoader_h__
|
||||
#define nsDocLoader_h__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
|
|
|
|||
|
|
@ -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 "nsURILoader.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIURIContentListener.h"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef nsURILoader_h__
|
||||
#define nsURILoader_h__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsISupportsUtils.h"
|
||||
#include "nsCOMArray.h"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,34 @@ template<typename T>
|
|||
class AbstractCanonical
|
||||
{
|
||||
public:
|
||||
#if defined(__MINGW32__)
|
||||
MOZ_NEVER_INLINE MozExternalRefCountType AddRef(void)
|
||||
{
|
||||
MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(AbstractCanonical)
|
||||
MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");
|
||||
nsrefcnt count = ++mRefCnt;
|
||||
NS_LOG_ADDREF(this, count, "AbstractCanonical", sizeof(*this));
|
||||
return (nsrefcnt) count;
|
||||
}
|
||||
|
||||
MOZ_NEVER_INLINE MozExternalRefCountType Release(void)
|
||||
{
|
||||
MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");
|
||||
nsrefcnt count = --mRefCnt;
|
||||
NS_LOG_RELEASE(this, count, "AbstractCanonical");
|
||||
if (count == 0) {
|
||||
delete (this);
|
||||
return 0;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
typedef mozilla::TrueType HasThreadSafeRefCnt;
|
||||
protected:
|
||||
::mozilla::ThreadSafeAutoRefCnt mRefCnt;
|
||||
public:
|
||||
#else
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AbstractCanonical)
|
||||
#endif
|
||||
AbstractCanonical(AbstractThread* aThread) : mOwnerThread(aThread) {}
|
||||
virtual void AddMirror(AbstractMirror<T>* aMirror) = 0;
|
||||
virtual void RemoveMirror(AbstractMirror<T>* aMirror) = 0;
|
||||
|
|
@ -82,7 +109,34 @@ template<typename T>
|
|||
class AbstractMirror
|
||||
{
|
||||
public:
|
||||
#if defined(__MINGW32__)
|
||||
MOZ_NEVER_INLINE MozExternalRefCountType AddRef(void)
|
||||
{
|
||||
MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(AbstractMirror)
|
||||
MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");
|
||||
nsrefcnt count = ++mRefCnt;
|
||||
NS_LOG_ADDREF(this, count, "AbstractMirror", sizeof(*this));
|
||||
return (nsrefcnt) count;
|
||||
}
|
||||
|
||||
MOZ_NEVER_INLINE MozExternalRefCountType Release(void)
|
||||
{
|
||||
MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");
|
||||
nsrefcnt count = --mRefCnt;
|
||||
NS_LOG_RELEASE(this, count, "AbstractMirror");
|
||||
if (count == 0) {
|
||||
delete (this);
|
||||
return 0;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
typedef mozilla::TrueType HasThreadSafeRefCnt;
|
||||
protected:
|
||||
::mozilla::ThreadSafeAutoRefCnt mRefCnt;
|
||||
public:
|
||||
#else
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AbstractMirror)
|
||||
#endif
|
||||
AbstractMirror(AbstractThread* aThread) : mOwnerThread(aThread) {}
|
||||
virtual void UpdateValue(const T& aNewValue) = 0;
|
||||
virtual void NotifyDisconnected() = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue