Skip to content

Commit c8579d1

Browse files
committed
---
yaml --- r: 214530 b: refs/heads/beta c: cb513c7 h: refs/heads/master v: v3
1 parent b82536a commit c8579d1

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 40570eb49eb1cb688637cb58d14cdb9664ea1039
26+
refs/heads/beta: cb513c7b46c21c786c30901e70b62de2835a5687
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 8c0aa6d64ebab528f7eb182812007155d6044972
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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/beta/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)