about summary refs log tree commit diff
path: root/src/libcore/libc.rs
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-03-06 18:49:08 -0800
committerGraydon Hoare <graydon@mozilla.com>2012-03-06 18:49:08 -0800
commit04e7bd675881bc091db2154e84caebb255b0ff8c (patch)
tree6420ef3a15db3d250bbb27bca6e4bd6070a7b9ca /src/libcore/libc.rs
parentcf8f5b7606b87c26901abc0f6e271f48828bcf5b (diff)
More UTF-16 wrapping on win32. Close #1927.
Diffstat (limited to 'src/libcore/libc.rs')
-rw-r--r--src/libcore/libc.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs
index 09af26336e0..4e8389d34fc 100644
--- a/src/libcore/libc.rs
+++ b/src/libcore/libc.rs
@@ -493,6 +493,9 @@ mod consts {
             const O_TEXT : int = 16384;
             const O_BINARY : int = 32768;
             const O_NOINHERIT: int = 128;
+
+            const ERROR_SUCCESS : int = 0;
+            const ERROR_INSUFFICIENT_BUFFER : int = 122;
         }
     }
 
@@ -1105,15 +1108,17 @@ mod funcs {
                                        nsize: DWORD) -> DWORD;
             fn SetEnvironmentVariableW(n: LPCWSTR, v: LPCWSTR) -> BOOL;
 
-            fn GetModuleFileNameA(hModule: HMODULE,
-                                  lpFilename: LPSTR,
+            fn GetModuleFileNameW(hModule: HMODULE,
+                                  lpFilename: LPWSTR,
                                   nSize: DWORD) -> DWORD;
-            fn CreateDirectoryA(lpPathName: LPCSTR,
+            fn CreateDirectoryW(lpPathName: LPCWSTR,
                                 lpSecurityAttributes:
                                 LPSECURITY_ATTRIBUTES) -> BOOL;
-            fn DeleteFileA(lpPathName: LPCSTR) -> BOOL;
-            fn RemoveDirectoryA(lpPathName: LPCSTR) -> BOOL;
-            fn SetCurrentDirectoryA(lpPathName: LPCSTR) -> BOOL;
+            fn DeleteFileW(lpPathName: LPCWSTR) -> BOOL;
+            fn RemoveDirectoryW(lpPathName: LPCWSTR) -> BOOL;
+            fn SetCurrentDirectoryW(lpPathName: LPCWSTR) -> BOOL;
+
+            fn GetLastError() -> DWORD;
         }
 
         #[abi = "cdecl"]