Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-08-18 23:15:37 +0400
committerChristopher Faylor <me@cgf.cx>2010-08-18 23:15:37 +0400
commit590ad4793f9da405614e83710db7f426a8a3bc5e (patch)
tree09264826b55b37505196c6fcfce8d6dac6480acb /winsup
parent6a84234cd220eeef9fa5a24721079d45d9375a81 (diff)
* external.cc (CW_SETCWD): New option.
* include/cygwin/version.h: Bump api minor to 231. * include/sys/cygwin.h (CW_SETCWD): Define.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/external.cc6
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
-rw-r--r--winsup/cygwin/include/sys/cygwin.h3
4 files changed, 16 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5bca572b7..547f0b139 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* syscalls.cc (rename): Fix renaming file-based devices.
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index e01c9fea6..53ce5b1b8 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -515,6 +515,12 @@ cygwin_internal (cygwin_getinfo_types t, ...)
}
break;
+ case CW_SETCWD:
+ {
+ cygheap->cwd.cwd_lock.acquire ();
+ PWCHAR cwd = cygheap->cwd.win32.Buffer;
+ res = !SetCurrentDirectoryW (cwd);
+ }
default:
set_errno (ENOSYS);
}
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 6a28b7bf6..9b885d580 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -390,12 +390,13 @@ details. */
228: CW_STRERROR added.
229: Add mkostemp, mkostemps.
230: Add CLOCK_MONOTONIC.
+ 231: CW_SETCWD
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#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
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index d6df27df9..158fa0db1 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -149,7 +149,8 @@ typedef enum
CW_INT_SETLOCALE,
CW_CVT_MNT_OPTS,
CW_LST_MNT_OPTS,
- CW_STRERROR
+ CW_STRERROR,
+ CW_SETCWD
} cygwin_getinfo_types;
/* Token type for CW_SET_EXTERNAL_TOKEN */