Placate win32 build; no idea how it can be working currently on tinderbox.

This commit is contained in:
Graydon Hoare 2011-03-25 00:09:20 -07:00
parent bcc104ce79
commit 0f9d460e24
4 changed files with 21 additions and 4 deletions

View File

@ -1081,7 +1081,7 @@ CRATE_DEPFILES := $(subst $(S)src/,,$(ALL_TEST_CRATES:%.rc=%.d)) \
boot/$(CFG_STDLIB).d: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
$(MKFILES) boot/rustboot$(X)
@$(call E, dep: $@)
$(BOOT) -o $(patsubst %.d,%,$@) -shared -rdeps $< >$@.tmp
$(BOOT) -o $(patsubst %.d,%$(X),$@) -shared -rdeps $< >$@.tmp
$(Q)$(CFG_PATH_MUNGE) $@.tmp
$(Q)rm -f $@.tmp.bak
$(Q)mv $@.tmp $@
@ -1089,14 +1089,14 @@ boot/$(CFG_STDLIB).d: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage0/rustc$(X).d: $(COMPILER_CRATE) $(COMPILER_INPUTS) \
$(STDLIB_CRATE) $(MKFILES) boot/rustboot$(X)
@$(call E, dep: $@)
$(BOOT) -o $(patsubst %.d,%,$@) -shared -rdeps $< >$@.tmp
$(BOOT) -o $(patsubst %.d,%$(X),$@) -shared -rdeps $< >$@.tmp
$(Q)$(CFG_PATH_MUNGE) $@.tmp
$(Q)rm -f $@.tmp.bak
$(Q)mv $@.tmp $@
%.d: %.rc $(MKFILES) boot/rustboot$(X)
@$(call E, dep: $@)
$(BOOT) -o $(patsubst %.d,%,$@) -rdeps $< >$@.tmp
$(BOOT) -o $(patsubst %.d,%$(X),$@) -rdeps $< >$@.tmp
$(Q)$(CFG_PATH_MUNGE) $@.tmp
$(Q)rm -f $@.tmp.bak
$(Q)mv $@.tmp $@

View File

@ -417,9 +417,9 @@ rust_str* c_str_to_rust(rust_task *task, char const *str) {
return vec_alloc_with_data(task, len, len, 1, (void*)str);
}
#if defined(__WIN32__)
extern "C" CDECL rust_vec*
rust_list_files(rust_task *task, rust_str *path) {
#if defined(__WIN32__)
array_list<rust_str*> strings;
WIN32_FIND_DATA FindFileData;
HANDLE hFind = FindFirstFile((char*)path->data, &FindFileData);
@ -431,6 +431,15 @@ rust_list_files(rust_task *task, rust_str *path) {
}
return vec_alloc_with_data(task, strings.size(), strings.size(),
sizeof(rust_str*), strings.data());
#else
return NULL;
#endif
}
#if defined(__WIN32__)
extern "C" CDECL rust_str *
rust_dirent_filename(rust_task *task, void* ent) {
return NULL;
}
#else
extern "C" CDECL rust_str *

View File

@ -76,6 +76,12 @@ rust_run_program(rust_task* task, char* argv[],
exit(1);
}
extern "C" CDECL int
rust_process_wait(void* task, int proc) {
// FIXME: stub; exists to placate linker.
return 0;
}
#else
#error "Platform not supported."
#endif

View File

@ -17,6 +17,8 @@ rust_dirent_filename
rust_file_is_dir
rust_get_stdin
rust_get_stdout
rust_list_files
rust_process_wait
rust_run_program
rust_start
size_of