* external.cc (CW_SETCWD): New option.

* include/cygwin/version.h: Bump api minor to 231.
* include/sys/cygwin.h (CW_SETCWD): Define.
This commit is contained in:
Christopher Faylor 2010-08-18 19:15:37 +00:00
parent 6a84234cd2
commit 590ad4793f
4 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-08-18 Christopher Faylor <me+cygwin@cgf.cx>
* external.cc (CW_SETCWD): New option.
* include/cygwin/version.h: Bump api minor to 231.
* include/sys/cygwin.h (CW_SETCWD): Define.
2010-08-18 Corinna Vinschen <corinna@vinschen.de> 2010-08-18 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (rename): Fix renaming file-based devices. * syscalls.cc (rename): Fix renaming file-based devices.

View File

@ -515,6 +515,12 @@ cygwin_internal (cygwin_getinfo_types t, ...)
} }
break; break;
case CW_SETCWD:
{
cygheap->cwd.cwd_lock.acquire ();
PWCHAR cwd = cygheap->cwd.win32.Buffer;
res = !SetCurrentDirectoryW (cwd);
}
default: default:
set_errno (ENOSYS); set_errno (ENOSYS);
} }

View File

@ -390,12 +390,13 @@ details. */
228: CW_STRERROR added. 228: CW_STRERROR added.
229: Add mkostemp, mkostemps. 229: Add mkostemp, mkostemps.
230: Add CLOCK_MONOTONIC. 230: Add CLOCK_MONOTONIC.
231: CW_SETCWD
*/ */
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0 #define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 230 #define CYGWIN_VERSION_API_MINOR 231
/* There is also a compatibity version number associated with the /* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible shared memory regions. It is incremented when incompatible

View File

@ -149,7 +149,8 @@ typedef enum
CW_INT_SETLOCALE, CW_INT_SETLOCALE,
CW_CVT_MNT_OPTS, CW_CVT_MNT_OPTS,
CW_LST_MNT_OPTS, CW_LST_MNT_OPTS,
CW_STRERROR CW_STRERROR,
CW_SETCWD
} cygwin_getinfo_types; } cygwin_getinfo_types;
/* Token type for CW_SET_EXTERNAL_TOKEN */ /* Token type for CW_SET_EXTERNAL_TOKEN */