equal
deleted
inserted
replaced
177 // ----------------------------------------------------------------------------- |
177 // ----------------------------------------------------------------------------- |
178 // |
178 // |
179 |
179 |
180 EXPORT_C int lstat(const char *file_name, struct stat *buf) |
180 EXPORT_C int lstat(const char *file_name, struct stat *buf) |
181 { |
181 { |
182 return stat(file_name, buf); |
182 if(!buf) |
183 } |
183 { |
184 |
184 errno = EFAULT ; |
|
185 return -1 ; |
|
186 } |
|
187 |
|
188 wchar_t tmpbuf[MAXPATHLEN+1]; |
|
189 if ((size_t)-1 != mbstowcs(tmpbuf, file_name, MAXPATHLEN)) |
|
190 { |
|
191 return _lstat_r(&errno, tmpbuf, buf); |
|
192 } |
|
193 errno = EILSEQ; |
|
194 return -1; |
|
195 } |
185 EXPORT_C int __xstat(int /*vers*/, const char *file, struct stat *buf) |
196 EXPORT_C int __xstat(int /*vers*/, const char *file, struct stat *buf) |
186 { |
197 { |
187 return stat(file, buf); |
198 return stat(file, buf); |
188 } |
199 } |
189 |
200 |
190 EXPORT_C int __lxstat (int /*version*/, const char *file, struct stat *buf) |
201 EXPORT_C int __lxstat (int /*version*/, const char *file, struct stat *buf) |
191 { |
202 { |
192 return stat(file, buf); |
203 return lstat(file, buf); |
193 } |
204 } |
194 |
205 |
195 |
206 |
196 } // extern "C" |
207 } // extern "C" |
197 |
208 |