Skip to content

Commit 0f9d460

Browse files
committed
Placate win32 build; no idea how it can be working currently on tinderbox.
1 parent bcc104c commit 0f9d460

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

Makefile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,22 +1081,22 @@ CRATE_DEPFILES := $(subst $(S)src/,,$(ALL_TEST_CRATES:%.rc=%.d)) \
10811081
boot/$(CFG_STDLIB).d: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
10821082
$(MKFILES) boot/rustboot$(X)
10831083
@$(call E, dep: $@)
1084-
$(BOOT) -o $(patsubst %.d,%,$@) -shared -rdeps $< >[email protected]
1084+
$(BOOT) -o $(patsubst %.d,%$(X),$@) -shared -rdeps $< >[email protected]
10851085
$(Q)$(CFG_PATH_MUNGE) [email protected]
10861086
10871087
10881088

10891089
stage0/rustc$(X).d: $(COMPILER_CRATE) $(COMPILER_INPUTS) \
10901090
$(STDLIB_CRATE) $(MKFILES) boot/rustboot$(X)
10911091
@$(call E, dep: $@)
1092-
$(BOOT) -o $(patsubst %.d,%,$@) -shared -rdeps $< >[email protected]
1092+
$(BOOT) -o $(patsubst %.d,%$(X),$@) -shared -rdeps $< >[email protected]
10931093
$(Q)$(CFG_PATH_MUNGE) [email protected]
10941094
10951095
10961096

10971097
%.d: %.rc $(MKFILES) boot/rustboot$(X)
10981098
@$(call E, dep: $@)
1099-
$(BOOT) -o $(patsubst %.d,%,$@) -rdeps $< >$@.tmp
1099+
$(BOOT) -o $(patsubst %.d,%$(X),$@) -rdeps $< >$@.tmp
11001100
$(Q)$(CFG_PATH_MUNGE) $@.tmp
11011101
$(Q)rm -f $@.tmp.bak
11021102
$(Q)mv $@.tmp $@

src/rt/rust_builtin.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ rust_str* c_str_to_rust(rust_task *task, char const *str) {
417417
return vec_alloc_with_data(task, len, len, 1, (void*)str);
418418
}
419419

420-
#if defined(__WIN32__)
421420
extern "C" CDECL rust_vec*
422421
rust_list_files(rust_task *task, rust_str *path) {
422+
#if defined(__WIN32__)
423423
array_list<rust_str*> strings;
424424
WIN32_FIND_DATA FindFileData;
425425
HANDLE hFind = FindFirstFile((char*)path->data, &FindFileData);
@@ -431,6 +431,15 @@ rust_list_files(rust_task *task, rust_str *path) {
431431
}
432432
return vec_alloc_with_data(task, strings.size(), strings.size(),
433433
sizeof(rust_str*), strings.data());
434+
#else
435+
return NULL;
436+
#endif
437+
}
438+
439+
#if defined(__WIN32__)
440+
extern "C" CDECL rust_str *
441+
rust_dirent_filename(rust_task *task, void* ent) {
442+
return NULL;
434443
}
435444
#else
436445
extern "C" CDECL rust_str *

src/rt/rust_run_program.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ rust_run_program(rust_task* task, char* argv[],
7676
exit(1);
7777
}
7878

79+
extern "C" CDECL int
80+
rust_process_wait(void* task, int proc) {
81+
// FIXME: stub; exists to placate linker.
82+
return 0;
83+
}
84+
7985
#else
8086
#error "Platform not supported."
8187
#endif

src/rt/rustrt.def.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ rust_dirent_filename
1717
rust_file_is_dir
1818
rust_get_stdin
1919
rust_get_stdout
20+
rust_list_files
21+
rust_process_wait
2022
rust_run_program
2123
rust_start
2224
size_of

0 commit comments

Comments
 (0)