diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-17 17:11:40 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-17 18:50:01 -0700 |
| commit | 6fb168b3dbd733f6fccebd01c2e5416f800a5566 (patch) | |
| tree | 7978e37e3d2869481379f6a129281d495cd29c0a /src/rt/rust_builtin.cpp | |
| parent | c18127b913e25cb019087c885ad61e145f3a3df0 (diff) | |
| download | rust-6fb168b3dbd733f6fccebd01c2e5416f800a5566.tar.gz rust-6fb168b3dbd733f6fccebd01c2e5416f800a5566.zip | |
Add setenv to standard library
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index df7b1cfc6d3..7e72b2e7ab6 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -651,6 +651,20 @@ rust_ptr_eq(rust_task *task, type_desc *t, rust_box *a, rust_box *b) { } #if defined(__WIN32__) +extern "C" CDECL int32_t +rust_SetEnvironmentVariable(rust_task *task, + const char *name, const char *val) { + return SetEnvironmentVariable(name, val); +} + +extern "C" CDECL uint32_t +rust_GetEnvironmentVariable(rust_task *task, + const char *name, char *buf, uint32_t size) { + return GetEnvironmentVariable(name, buf, size); +} +#endif + +#if defined(__WIN32__) extern "C" CDECL void get_time(rust_task *task, uint32_t *sec, uint32_t *usec) { SYSTEMTIME systemTime; |
