]> granicus.if.org Git - php/commitdiff
- set errno on failure so that the caller can still rely on strerror, missing patch
authorPierre Joye <pajoye@php.net>
Thu, 4 Feb 2010 09:57:30 +0000 (09:57 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 4 Feb 2010 09:57:30 +0000 (09:57 +0000)
TSRM/tsrm_virtual_cwd.c

index af53f25ac092fe35513e04a8e8b634a4c6397a1c..743aa286433c1a66e49a564e85b59f13f019c14d 100644 (file)
@@ -1002,7 +1002,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
 
        if (path_length == 0 || path_length >= MAXPATHLEN-1) {
 #ifdef TSRM_WIN32
+# if _MSC_VER < 1300
+               errno = EINVAL;
+# else
                _set_errno(EINVAL);
+# endif
 #else
                errno = EINVAL;
 #endif