From: Pierre Joye Date: Thu, 4 Feb 2010 09:55:13 +0000 (+0000) Subject: - - set errno on failure so that the caller can still rely on strerror X-Git-Tag: php-5.3.2RC2~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef06baa1bfe6c7facab2397dbf463d1d50573dcf;p=php - - set errno on failure so that the caller can still rely on strerror --- diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index dd3d123a18..af53f25ac0 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -1001,6 +1001,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func TSRMLS_FETCH(); if (path_length == 0 || path_length >= MAXPATHLEN-1) { +#ifdef TSRM_WIN32 + _set_errno(EINVAL); +#else + errno = EINVAL; +#endif return 1; }