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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-09-12 21:46:37 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-09-12 21:46:37 +0400
commitba94682838272afc87b73833c02aaf6cea40815e (patch)
tree33443e904759c4bb192f674b2e8c30c59641f138 /winsup/cygwin/times.cc
parentc88bb51c3ca08f1cf79dd0215ff5f46817267ddb (diff)
* Makefile.in: Build wincap.o.
* wincap.cc: New file. * wincap.h: Ditto. * autoload.cc: Add dynamic load statement for `CreateHardLinkA'. * dcrt0.cc (os_being_run): Eliminated. (osname): Ditto. (iswinnt): Ditto. (set_os_type): Ditto. (dll_crt0_1): Call wincap.init() instead of set_os_type(). (_dll_crt0): Ditto. * environ.cc (set_chunksize): New function. (parse_thing): `forkchunk' setting now invokes function `set_chunksize'. * fork.cc (chunksize): Eliminated. Moved to be member of wincap. * host_dependent.h: Removed. * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available. * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc, environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc, fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h, security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc, times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap capability check throughout. * winsup.h: Include wincap.h. Eliminate extern declarations of `os_being_run' and `iswinnt'. Eliminate `os_type" definition. * include/cygwin/version.h: Bump version to 1.3.4.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index f75bc2a0e..ee5fe5f50 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -56,7 +56,7 @@ times (struct tms * buf)
/* Ticks is in milliseconds, convert to our ticks. Use long long to prevent
overflow. */
clock_t tc = (clock_t) ((long long) ticks * CLOCKS_PER_SEC / 1000);
- if (iswinnt)
+ if (wincap.has_get_process_times ())
{
GetProcessTimes (hMainProc, &creation_time, &exit_time,
&kernel_time, &user_time);
@@ -462,7 +462,8 @@ utimes (const char *path, struct timeval *tvp)
/* Note: It's not documented in MSDN that FILE_WRITE_ATTRIBUTES is
sufficient to change the timestamps... */
HANDLE h = CreateFileA (win32.get_win32 (),
- iswinnt ? FILE_WRITE_ATTRIBUTES : GENERIC_WRITE,
+ wincap.has_specific_access_rights () ?
+ FILE_WRITE_ATTRIBUTES : GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
&sec_none_nih,
OPEN_EXISTING,