Skip to content

Commit 71085e6

Browse files
committed
---
yaml --- r: 147438 b: refs/heads/try2 c: f82246f h: refs/heads/master v: v3
1 parent 59b48ec commit 71085e6

File tree

6 files changed

+38
-144
lines changed

6 files changed

+38
-144
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 32e730f122f06202eb48aefcc2cef6ee3e279a2f
8+
refs/heads/try2: f82246f56db34b52fac8466659ad454f1610280c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/rt/rust_builtin.c

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,35 @@
1010

1111
/* Foreign builtins. */
1212

13-
#include "rust_globals.h"
1413
#include "vg/valgrind.h"
1514

15+
#include <stdint.h>
1616
#include <time.h>
17-
18-
#ifdef __APPLE__
19-
#include <TargetConditionals.h>
20-
#include <mach/mach_time.h>
21-
22-
#if (TARGET_OS_IPHONE)
23-
extern char **environ;
24-
#else
25-
#include <crt_externs.h>
26-
#endif
27-
#endif
17+
#include <string.h>
18+
#include <assert.h>
19+
#include <stdlib.h>
2820

2921
#if !defined(__WIN32__)
3022
#include <sys/time.h>
23+
#include <sys/types.h>
24+
#include <dirent.h>
25+
#include <signal.h>
26+
#include <unistd.h>
27+
#include <pthread.h>
28+
#else
29+
#include <windows.h>
30+
#include <wincrypt.h>
31+
#include <stdio.h>
32+
#include <tchar.h>
3133
#endif
3234

33-
#ifdef __FreeBSD__
34-
extern char **environ;
35+
#ifdef __APPLE__
36+
#include <TargetConditionals.h>
37+
#include <mach/mach_time.h>
38+
39+
#if !(TARGET_OS_IPHONE)
40+
#include <crt_externs.h>
41+
#endif
3542
#endif
3643

3744
#ifdef __ANDROID__
@@ -57,6 +64,16 @@ timegm(struct tm *tm)
5764
}
5865
#endif
5966

67+
#ifdef __APPLE__
68+
#if (TARGET_OS_IPHONE)
69+
extern char **environ;
70+
#endif
71+
#endif
72+
73+
#if defined(__FreeBSD__) || defined(__linux__) || defined(__ANDROID__)
74+
extern char **environ;
75+
#endif
76+
6077
#if defined(__WIN32__)
6178
char**
6279
rust_env_pairs() {
@@ -323,8 +340,6 @@ rust_mktime(rust_tm* timeptr) {
323340
}
324341

325342
#ifndef _WIN32
326-
#include <sys/types.h>
327-
#include <dirent.h>
328343

329344
DIR*
330345
rust_opendir(char *dirname) {
@@ -419,9 +434,6 @@ rust_unset_sigprocmask() {
419434

420435
#else
421436

422-
#include <signal.h>
423-
#include <unistd.h>
424-
425437
void
426438
rust_unset_sigprocmask() {
427439
// this can't be safely converted to rust code because the

branches/try2/src/rt/rust_globals.h

Lines changed: 0 additions & 120 deletions
This file was deleted.

branches/try2/src/rt/rust_test_helpers.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
// Helper functions used only in tests
1212

13-
#include "rust_globals.h"
13+
#include <stdint.h>
14+
#include <assert.h>
1415

1516
// These functions are used in the unit tests for C ABI calls.
1617

branches/try2/src/rt/rust_upcall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
switch to the C stack.
2020
*/
2121

22-
#include "rust_globals.h"
22+
#include <stdint.h>
2323

2424
//Unwinding ABI declarations.
2525
typedef int _Unwind_Reason_Code;

branches/try2/src/rt/rust_uv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#include <stdlib.h>
12+
#include <assert.h>
13+
1114
#ifdef __WIN32__
1215
// For alloca
1316
#include <malloc.h>
@@ -20,8 +23,6 @@
2023

2124
#include "uv.h"
2225

23-
#include "rust_globals.h"
24-
2526
void*
2627
rust_uv_loop_new() {
2728
// XXX libuv doesn't always ignore SIGPIPE even though we don't need it.

0 commit comments

Comments
 (0)