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:
authorChristopher Faylor <me@cgf.cx>2003-01-17 08:18:30 +0300
committerChristopher Faylor <me@cgf.cx>2003-01-17 08:18:30 +0300
commit14ea50290a1f9f3954cc562ab877c1950ab8a2bb (patch)
tree2d4965c5bb977b8e1b41f5125aa4b24ba7c7ba38 /winsup/cygwin/cygheap.cc
parentd4d80d8c65042953c8bd5514c44c8bb2d31dd227 (diff)
* grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
"unknown" to "mkgroup". (internal_getgrgid): Do not return default in nontsec case. (internal_getgroups): Add argument srchsid and look for it in groups if not NULL. * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use same default uid for Win95 and NT. Call cygheap_user::ontherange to initialize HOME. * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc. * cygheap.h (init_cygheap::etc_changed_h): Remove. (init_cygheap::etc_changed): Ditto. * grp.cc (group_state): Remove. Use gr instead throughout. (gr): Define as class pwdgrp. (read_etc_group): Remove gr definition. Remove calls to set_last_modified and close. Pass add_grp to gr.load to load file. * passwd.cc (passwd_state): Remove. Use pr instead, throughout. (pr): Define as class pwdgrp. (read_etc_passwd): Remove pr definition. Remove calls to set_last_modified and close. Pass add_pwd_line to pr.load to load file. * pwdgrp.h (etc): New helper class for pwdgrp. (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove file_w32 and last_modified fields. (pwdgrp::set_last_modified): Remove. (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to etc::file_changed. (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc scanning. Close file handle after reading buffer into memory. Parse buffer by calling second argument. (pwdgrp::gets): Reorganize slightly to rely on eptr starting at beginning of buffer. Free buffer when memory exhausted. (pwdgrp::close): Remove. * uinfo.cc (etc::dir_changed): New function. (etc::init): Ditto. (etc::file_changed): Ditto. (etc::set_last_modified): Ditto.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc33
1 files changed, 0 insertions, 33 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index d0843e7ac..cdef3e490 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -380,39 +380,6 @@ cstrdup1 (const char *s)
return p;
}
-bool
-init_cygheap::etc_changed ()
-{
- bool res = 0;
-
- if (!etc_changed_h)
- {
- path_conv pwd ("/etc");
- etc_changed_h = FindFirstChangeNotification (pwd, FALSE,
- FILE_NOTIFY_CHANGE_LAST_WRITE);
- if (etc_changed_h == INVALID_HANDLE_VALUE)
- system_printf ("Can't open /etc for checking, %E", (char *) pwd,
- etc_changed_h);
- else if (!DuplicateHandle (hMainProc, etc_changed_h, hMainProc,
- &etc_changed_h, 0, TRUE,
- DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
- {
- system_printf ("Can't inherit /etc handle, %E", (char *) pwd,
- etc_changed_h);
- etc_changed_h = INVALID_HANDLE_VALUE;
- }
- }
-
- if (etc_changed_h != INVALID_HANDLE_VALUE
- && WaitForSingleObject (etc_changed_h, 0) == WAIT_OBJECT_0)
- {
- (void) FindNextChangeNotification (etc_changed_h);
- res = 1;
- }
-
- return res;
-}
-
void
cygheap_root::set (const char *posix, const char *native)
{