Skip to content

Commit 0f56eb7

Browse files
committed
---
yaml --- r: 208715 b: refs/heads/snap-stage3 c: cb513c7 h: refs/heads/master i: 208713: e1d775f 208711: 9325e21 v: v3
1 parent 3554b1b commit 0f56eb7

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 40570eb49eb1cb688637cb58d14cdb9664ea1039
4+
refs/heads/snap-stage3: cb513c7b46c21c786c30901e70b62de2835a5687
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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/snap-stage3/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)