summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-19 09:58:44 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-19 09:58:44 +0100
commit85edb1c711f7816ed1a30edd07b37d314fac216a (patch)
tree814487cc06993dd6e133ab4b23e5bc16b6cb5e2d
parentbc9ad467f0886f8799c2c4781b1a0b654b362ecf (diff)
downloadUXP-85edb1c711f7816ed1a30edd07b37d314fac216a.tar
UXP-85edb1c711f7816ed1a30edd07b37d314fac216a.tar.gz
UXP-85edb1c711f7816ed1a30edd07b37d314fac216a.tar.lz
UXP-85edb1c711f7816ed1a30edd07b37d314fac216a.tar.xz
UXP-85edb1c711f7816ed1a30edd07b37d314fac216a.zip
Make the proper Windows APIs natively available to our tree.
Tag #22. This bypasses custom definitions of some functions for things natively available in Windows 7.
-rw-r--r--js/src/old-configure.in3
-rw-r--r--js/src/vm/Stopwatch.h6
-rw-r--r--media/mtransport/third_party/nrappkit/src/util/util.c15
-rw-r--r--media/mtransport/third_party/nrappkit/src/util/util.h3
-rw-r--r--old-configure.in2
-rw-r--r--widget/windows/TaskbarPreview.cpp2
-rw-r--r--widget/windows/WinUtils.cpp2
-rw-r--r--widget/windows/nsLookAndFeel.h2
-rw-r--r--widget/windows/nsWinGesture.h2
9 files changed, 13 insertions, 24 deletions
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
index bfb14f809..5da81ce3e 100644
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -143,8 +143,7 @@ MOZ_TOOL_VARIABLES
dnl Special win32 checks
dnl ========================================================
-# Target the Windows 8.1 SDK by default
-WINVER=502
+WINVER=601
case "$target" in
*-mingw*)
diff --git a/js/src/vm/Stopwatch.h b/js/src/vm/Stopwatch.h
index a1b8bbbcb..38a3eb801 100644
--- a/js/src/vm/Stopwatch.h
+++ b/js/src/vm/Stopwatch.h
@@ -301,9 +301,9 @@ struct PerformanceMonitoring {
#if WINVER >= 0x0600
struct cpuid_t {
- WORD group_;
- BYTE number_;
- cpuid_t(WORD group, BYTE number)
+ uint16_t group_;
+ uint8_t number_;
+ cpuid_t(uint16_t group, uint8_t number)
: group_(group),
number_(number)
{ }
diff --git a/media/mtransport/third_party/nrappkit/src/util/util.c b/media/mtransport/third_party/nrappkit/src/util/util.c
index 31a245f45..1e2801259 100644
--- a/media/mtransport/third_party/nrappkit/src/util/util.c
+++ b/media/mtransport/third_party/nrappkit/src/util/util.c
@@ -506,7 +506,7 @@ strlcat(dst, src, siz)
#endif /* LINUX or WIN32 */
-#if defined(USE_OWN_INET_NTOP) || defined(WIN32)
+#if defined(USE_OWN_INET_NTOP) || (defined(WIN32) && WINVER < 0x0600)
#include <errno.h>
#ifdef WIN32
#include <Ws2ipdef.h>
@@ -775,18 +775,5 @@ int gettimeofday(struct timeval *tv, void *tz)
return 0;
}
-#if _MSC_VER < 1900
-int snprintf(char *buffer, size_t n, const char *format, ...)
-{
- va_list argp;
- int ret;
- va_start(argp, format);
- ret = _vscprintf(format, argp);
- vsnprintf_s(buffer, n, _TRUNCATE, format, argp);
- va_end(argp);
- return ret;
-}
-#endif
-
#endif
diff --git a/media/mtransport/third_party/nrappkit/src/util/util.h b/media/mtransport/third_party/nrappkit/src/util/util.h
index 869b72863..975baa4aa 100644
--- a/media/mtransport/third_party/nrappkit/src/util/util.h
+++ b/media/mtransport/third_party/nrappkit/src/util/util.h
@@ -64,8 +64,7 @@ int nr_write_pid_file(char *pid_filename);
int nr_reg_uint4_fetch_and_check(NR_registry key, UINT4 min, UINT4 max, int log_fac, int die, UINT4 *val);
int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_fac, int die, UINT8 *val);
-#ifdef WIN32
-int snprintf(char *buffer, size_t n, const char *format, ...);
+#if defined(WIN32) && WINVER < 0x0600
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
int inet_pton(int af, const char *src, void *dst);
#endif
diff --git a/old-configure.in b/old-configure.in
index f0d397393..92a5f729e 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -212,7 +212,7 @@ dnl ========================================================
dnl Special win32 checks
dnl ========================================================
-WINVER=502
+WINVER=601
case "$target" in
*-mingw*)
diff --git a/widget/windows/TaskbarPreview.cpp b/widget/windows/TaskbarPreview.cpp
index c897af021..6c15df2e0 100644
--- a/widget/windows/TaskbarPreview.cpp
+++ b/widget/windows/TaskbarPreview.cpp
@@ -28,7 +28,9 @@
#include "mozilla/Telemetry.h"
// Defined in dwmapi in a header that needs a higher numbered _WINNT #define
+#ifndef DWM_SIT_DISPLAYFRAME
#define DWM_SIT_DISPLAYFRAME 0x1
+#endif
namespace mozilla {
namespace widget {
diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp
index 418a77182..0a57ad439 100644
--- a/widget/windows/WinUtils.cpp
+++ b/widget/windows/WinUtils.cpp
@@ -601,7 +601,7 @@ WinUtils::SystemScaleFactor()
return systemScale;
}
-#ifndef WM_DPICHANGED
+#if WINVER < 0x603
typedef enum {
MDT_EFFECTIVE_DPI = 0,
MDT_ANGULAR_DPI = 1,
diff --git a/widget/windows/nsLookAndFeel.h b/widget/windows/nsLookAndFeel.h
index 6200541f5..e3a2d5a7b 100644
--- a/widget/windows/nsLookAndFeel.h
+++ b/widget/windows/nsLookAndFeel.h
@@ -28,6 +28,8 @@
#ifndef SM_SYSTEMDOCKED
#define SM_CONVERTIBLESLATEMODE 0x00002003
#define SM_SYSTEMDOCKED 0x00002004
+#endif
+#if WINVER < 0x0601
typedef enum _AR_STATE
{
AR_ENABLED = 0x0,
diff --git a/widget/windows/nsWinGesture.h b/widget/windows/nsWinGesture.h
index 24c1f6b2d..f5561166a 100644
--- a/widget/windows/nsWinGesture.h
+++ b/widget/windows/nsWinGesture.h
@@ -18,7 +18,7 @@
#include "mozilla/TouchEvents.h"
// Desktop builds target apis for 502. Win8 Metro builds target 602.
-#if WINVER < 0x0602
+#if WINVER < 0x0601
DECLARE_HANDLE(HGESTUREINFO);