Skip to content

Commit a443ccb

Browse files
committed
---
yaml --- r: 225066 b: refs/heads/stable c: cb513c7 h: refs/heads/master v: v3
1 parent 6c548d8 commit a443ccb

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 40570eb49eb1cb688637cb58d14cdb9664ea1039
32+
refs/heads/stable: cb513c7b46c21c786c30901e70b62de2835a5687
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/src/rt/rust_builtin.c

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
#include <assert.h>
1515
#include <stdlib.h>
1616

17-
#if !defined(__WIN32__)
17+
18+
#if !defined(_WIN32)
1819
#include <dirent.h>
1920
#include <pthread.h>
2021
#include <signal.h>
@@ -40,7 +41,9 @@
4041

4142
/* Foreign builtins. */
4243
//include valgrind.h after stdint.h so that uintptr_t is defined for msys2 w64
44+
#ifndef _WIN32
4345
#include "valgrind/valgrind.h"
46+
#endif
4447

4548
#ifndef _WIN32
4649
char*
@@ -84,12 +87,7 @@ rust_dirent_t_size() {
8487
}
8588
#endif
8689

87-
uintptr_t
88-
rust_running_on_valgrind() {
89-
return RUNNING_ON_VALGRIND;
90-
}
91-
92-
#if defined(__WIN32__)
90+
#if defined(_WIN32)
9391
int
9492
get_num_cpus() {
9593
SYSTEM_INFO sysinfo;
@@ -136,14 +134,13 @@ rust_get_num_cpus() {
136134
return get_num_cpus();
137135
}
138136

139-
unsigned int
140-
rust_valgrind_stack_register(void *start, void *end) {
141-
return VALGRIND_STACK_REGISTER(start, end);
142-
}
143-
144-
void
145-
rust_valgrind_stack_deregister(unsigned int id) {
146-
VALGRIND_STACK_DEREGISTER(id);
137+
uintptr_t
138+
rust_running_on_valgrind() {
139+
#ifdef _WIN32
140+
return 0;
141+
#else
142+
return RUNNING_ON_VALGRIND;
143+
#endif
147144
}
148145

149146
#if defined(__DragonFly__)

branches/stable/src/rt/rust_test_helpers.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ struct ManyInts {
135135
struct TwoU8s arg6;
136136
};
137137

138+
// MSVC doesn't allow empty structs or unions
139+
#ifndef _MSC_VER
138140
struct Empty {
139141
};
140142

@@ -148,6 +150,7 @@ rust_dbg_extern_empty_struct(struct ManyInts v1, struct Empty e, struct ManyInts
148150
assert(v1.arg6.one == v2.arg6.one + 1);
149151
assert(v1.arg6.two == v2.arg6.two + 1);
150152
}
153+
#endif
151154

152155
intptr_t
153156
rust_get_test_int() {

0 commit comments

Comments
 (0)