Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f8e395d

Browse files
authored
Merge pull request #91 from livecode/fix-vs2015
[[ VS2015 ]] Patches
2 parents dae35a0 + 2cd947d commit f8e395d

11 files changed

Lines changed: 72 additions & 65 deletions

File tree

libcairo/src/cairo-compiler-private.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,8 @@
201201
#define hypot _hypot
202202
#define pclose _pclose
203203
#define popen _popen
204-
#define snprintf _snprintf
205204
#define strdup _strdup
206205
#define unlink _unlink
207-
#define vsnprintf _vsnprintf
208206
#endif
209207

210208
#ifdef _MSC_VER

libmysql/libmysql.gyp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@
190190
[
191191
'OS == "win"',
192192
{
193+
'defines':
194+
[
195+
# libmysql doesn't expect Win32 to supply struct timespec
196+
'_CRT_NO_TIME_T',
197+
'time_t=__time32_t',
198+
],
199+
193200
'link_settings':
194201
{
195202
'libraries':

libopenssl/libopenssl.gyp

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,26 @@
5252
'openssl_api_compat%': '0x10100000L',
5353
},
5454

55-
'include_dirs':
55+
'conditions':
5656
[
57-
'../../prebuilt/include',
57+
[
58+
'OS == "win"',
59+
{
60+
'include_dirs':
61+
[
62+
'../../prebuilt/unpacked/openssl/<(target_arch)-win32-$(PlatformToolset)_static_$(ConfigurationName)/include',
63+
],
64+
},
65+
],
66+
[
67+
'OS != "win"',
68+
{
69+
'include_dirs':
70+
[
71+
'../../prebuilt/include',
72+
],
73+
},
74+
],
5875
],
5976

6077
'defines':
@@ -124,7 +141,7 @@
124141
'action_name': 'libopenssl_symbol_list',
125142
'inputs':
126143
[
127-
'../../util/list_stub_symbols.pl'
144+
'../../util/list_stub_symbols.pl',
128145
'ssl.stubs',
129146
],
130147
'outputs':
@@ -206,6 +223,8 @@
206223
'dependencies':
207224
[
208225
'../../prebuilt/libopenssl.gyp:libopenssl',
226+
'libopenssl_symbol_list_win',
227+
209228
],
210229

211230
'sources':
@@ -226,7 +245,7 @@
226245
{
227246
'VCLinkerTool':
228247
{
229-
'ModuleDefinitionFile': '$(ProjectDir)..\\..\\..\\..\\prebuilt\\lib\\win32\\x86\\revsecurity.def',
248+
'ModuleDefinitionFile': '<(SHARED_INTERMEDIATE_DIR)/src/revsecurity.def',
230249
'SubSystem': '1',
231250
},
232251

@@ -245,6 +264,36 @@
245264
},
246265
},
247266
},
267+
{
268+
'target_name': 'libopenssl_symbol_list_win',
269+
'type': 'none',
270+
271+
'actions':
272+
[
273+
{
274+
'action_name': 'libopenssl_symbol_list_win',
275+
'inputs':
276+
[
277+
'../../util/list_stub_symbols.pl',
278+
'ssl.stubs',
279+
],
280+
'outputs':
281+
[
282+
'<(SHARED_INTERMEDIATE_DIR)/src/revsecurity.def',
283+
],
284+
285+
'action':
286+
[
287+
'<@(perl)',
288+
'../../util/list_stub_symbols.pl',
289+
'',
290+
'ssl.stubs',
291+
'<@(_outputs)',
292+
'--exportdef=REVSECURITY',
293+
],
294+
},
295+
],
296+
},
248297
],
249298
}
250299
],

libpq/libpq.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
'src/system.c',
112112
'src/win32.c',
113113
'src/win32setlocale.c',
114+
'src/win32error.c',
114115
],
115116

116117
'link_settings':

libpq/src/chklocale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ win32_langinfo(const char *ctype)
203203
{
204204
char *r = NULL;
205205

206-
#if (_MSC_VER >= 1700)
206+
#if (_MSC_VER == 1700)
207207
_locale_t loct = NULL;
208208

209209
loct = _create_locale(LC_CTYPE, ctype);

libskia/include/config/sk_stdint.h

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1 @@
1-
#ifndef sk_stdint_DEFINED
2-
#define sk_stdint_DEFINED
3-
4-
#ifndef WIN32
51
#include <stdint.h>
6-
#else
7-
8-
typedef signed char int8_t;
9-
typedef unsigned char uint8_t;
10-
typedef short int16_t;
11-
typedef unsigned short uint16_t;
12-
typedef int int32_t;
13-
typedef unsigned uint32_t;
14-
// MDW-2014-04-05: [[ x64 ]] check 64-bitness before defining
15-
#ifdef __LP64__
16-
typedef long int64_t;
17-
typedef unsigned long uint64_t;
18-
#else
19-
typedef long long int64_t;
20-
typedef unsigned long long uint64_t;
21-
#endif
22-
23-
typedef int64_t intmax_t;
24-
typedef uint64_t uintmax_t;
25-
26-
#ifndef _UINTPTR_T
27-
#define _UINTPTR_T
28-
// MDW-2013-04-15: [[ x64 ]] make 64-bit safe
29-
#ifdef __LP64__
30-
typedef uint64_t uintptr_t;
31-
#else
32-
typedef uint32_t uintptr_t;
33-
#endif
34-
#endif
35-
36-
#ifndef _INTPTR_T
37-
#define _INTPTR_T
38-
// MDW-2013-04-15: [[ x64 ]] make 64-bit safe
39-
#ifdef __LP64__
40-
typedef int64_t intptr_t;
41-
#else
42-
typedef int32_t intptr_t;
43-
#endif
44-
#endif
45-
#endif
46-
47-
#endif

libskia/src/core/SkOnce.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
#ifdef SK_USE_POSIX_THREADS
3333
# define SK_ONCE_INIT { false, { PTHREAD_MUTEX_INITIALIZER } }
3434
#else
35-
# define SK_ONCE_INIT { false, SkBaseMutex() }
35+
# define SK_ONCE_INIT {}
3636
#endif
3737

38-
#define SK_DECLARE_STATIC_ONCE(name) static SkOnceFlag name = SK_ONCE_INIT
38+
#define SK_DECLARE_STATIC_ONCE(name) static SkOnceFlag name SK_ONCE_INIT
3939

4040
struct SkOnceFlag; // If manually created, initialize with SkOnceFlag once = SK_ONCE_INIT
4141

@@ -45,6 +45,7 @@ inline void SkOnce(SkOnceFlag* once, Func f, Arg arg);
4545
// ---------------------- Implementation details below here. -----------------------------
4646

4747
struct SkOnceFlag {
48+
SkOnceFlag() : done(false), mutex() {}
4849
bool done;
4950
SkBaseMutex mutex;
5051
};

libskia/src/core/SkString.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,8 @@
1717
// number of bytes (on the stack) to receive the printf result
1818
static const size_t kBufferSize = 1024;
1919

20-
#ifdef SK_BUILD_FOR_WIN
21-
#define VSNPRINTF(buffer, size, format, args) \
22-
_vsnprintf_s(buffer, size, _TRUNCATE, format, args)
23-
#define SNPRINTF _snprintf
24-
#else
25-
#define VSNPRINTF vsnprintf
26-
#define SNPRINTF snprintf
27-
#endif
20+
#define VSNPRINTF vsnprintf
21+
#define SNPRINTF snprintf
2822

2923
#define ARGS_TO_BUFFER(format, buffer, size) \
3024
do { \

libxslt/include/libxslt/win32config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ static int isnan (double d) {
7979
#include <direct.h>
8080
#if defined(_MSC_VER) || defined(__MINGW32__)
8181
#define mkdir(p,m) _mkdir(p)
82-
#define snprintf _snprintf
8382
#if _MSC_VER < 1500
8483
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
8584
#endif

libzip/src/zip_dirent.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242

4343
#ifndef _WINDOWS
4444
#include <unistd.h>
45+
#else
46+
// A bug in the MSVS2015 CRT means that when _CRT_DISABLE_PERFCRIT_LOCKS is
47+
// set, this function binds incorrectly.
48+
#undef putc
49+
#define putc fputc
4550
#endif
4651

4752
#include <sys/types.h>

0 commit comments

Comments
 (0)