diff options
| author | Graydon Hoare <[email protected]> | 2011-03-25 00:09:20 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-25 00:16:04 -0700 |
| commit | 0f9d460e24ce9e1c09450f71502f1ab0700c0419 (patch) | |
| tree | 5c924660fbcebe87c0ed052f41d4ffa806ae2638 /src/rt | |
| parent | A first stab at the 'nbody' demo, with support for calling C sqrt(). (diff) | |
| download | rust-0f9d460e24ce9e1c09450f71502f1ab0700c0419.tar.xz rust-0f9d460e24ce9e1c09450f71502f1ab0700c0419.zip | |
Placate win32 build; no idea how it can be working currently on tinderbox.
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 11 | ||||
| -rw-r--r-- | src/rt/rust_run_program.cpp | 6 | ||||
| -rw-r--r-- | src/rt/rustrt.def.in | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 2de9d7f4..3f2ae511 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -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 * diff --git a/src/rt/rust_run_program.cpp b/src/rt/rust_run_program.cpp index 5919f68e..7b73586e 100644 --- a/src/rt/rust_run_program.cpp +++ b/src/rt/rust_run_program.cpp @@ -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 diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in index df9e26af..be51770a 100644 --- a/src/rt/rustrt.def.in +++ b/src/rt/rustrt.def.in @@ -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 |