diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-02-26 15:22:41 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-02-26 15:22:41 +0300 |
commit | 457c7938f020cabd6029ab976ccfc35ba86d5369 (patch) | |
tree | d5a05ad641701a4f70e01a9addbe707e14bba237 /winsup | |
parent | d9edc05f47edef645e8b80abdd937820a41d51d4 (diff) |
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop comment.
* mmap.cc (gen_access): Remove.
(mmap_record::gen_access): Remove.
(mmap64): Don't mention 9x any longer.
* syscalls.cc (statvfs): Drop status code consideration for 9x.
* libc/minires-os-if.c (get_registry_dns_items): Don't mention 9x any
longer.
(get_registry_dns): Drop getting registry key on 9x. Drop is9x
variable.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 12 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/libc/minires-os-if.c | 13 | ||||
-rw-r--r-- | winsup/cygwin/mmap.cc | 20 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 10 |
5 files changed, 19 insertions, 37 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 8ff1eeafa..6bed79fb2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,15 @@ +2007-02-26 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop comment. + * mmap.cc (gen_access): Remove. + (mmap_record::gen_access): Remove. + (mmap64): Don't mention 9x any longer. + * syscalls.cc (statvfs): Drop status code consideration for 9x. + * libc/minires-os-if.c (get_registry_dns_items): Don't mention 9x any + longer. + (get_registry_dns): Drop getting registry key on 9x. Drop is9x + variable. + 2007-02-23 Corinna Vinschen <corinna@vinschen.de> Throughout remove all usage of wincap.has_security. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 5b70ad281..f5dfe33aa 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -540,7 +540,6 @@ fhandler_disk_file::fchmod (mode_t mode) if (pc.is_fs_special ()) return chmod_device (pc, mode); - /* Also open on 9x, otherwise we can't touch ctime. */ if (!get_io_handle ()) { query_open (query_write_control); diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index a5ab4a4f6..540d78634 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++ b/winsup/cygwin/libc/minires-os-if.c @@ -347,8 +347,7 @@ static void get_registry_dns_items(HKEY hKey, LPCTSTR KeyValue, get_registry_dns: Read the registry to get dns server addresses in Network Byte Order, - and set statp->nscount - (for Win9x and NT <= 4.0, but not Win95 with DHCP) + and set statp->nscount (for NT <= 4.0) Read the registry SearchList ***********************************************************************/ @@ -357,12 +356,10 @@ static void get_registry_dns(res_state statp) { HKEY hKey; DWORD res; - const char *keyName[] = {"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", - "System\\CurrentControlSet\\Services\\VxD\\MSTCP"}; - int is9x = !!(GetVersion() & 0x80000000); + const char *keyName = "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"; - DPRINTF(statp->options & RES_DEBUG, "key %s\n", keyName[is9x]); - if ((res = RegOpenKeyEx( HKEY_LOCAL_MACHINE, keyName[is9x], 0, + DPRINTF(statp->options & RES_DEBUG, "key %s\n", keyName); + if ((res = RegOpenKeyEx( HKEY_LOCAL_MACHINE, keyName, 0, KEY_QUERY_VALUE | KEY_READ, &hKey)) != ERROR_SUCCESS) { DPRINTF(statp->options & RES_DEBUG, "RegOpenKeyEx: error %lu (Windows)\n", res); return; @@ -370,7 +367,7 @@ static void get_registry_dns(res_state statp) if (statp->nscount == 0) get_registry_dns_items(hKey, "NameServer", statp, 0); - if (statp->nscount == 0 && !is9x) + if (statp->nscount == 0) get_registry_dns_items(hKey, "DhcpNameServer", statp, 0); if (statp->dnsrch[0] == NULL) get_registry_dns_items(hKey, "SearchList", statp, 1); diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 7e4431771..18c8ec846 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -134,20 +134,6 @@ gen_protect (int prot, int flags) return ret; } -/* Generate Windows access flags from mmap prot and flag values. - Only used on 9x. PROT_EXEC not supported here since it's not - necessary. */ -static inline DWORD -gen_access (DWORD openflags, int flags) -{ - DWORD ret = FILE_MAP_READ; - if (priv (flags)) - ret = FILE_MAP_COPY; - else if (openflags & GENERIC_WRITE) - ret = priv (flags) ? FILE_MAP_COPY : FILE_MAP_WRITE; - return ret; -} - static HANDLE CreateMapping (HANDLE fhdl, size_t len, _off64_t off, DWORD openflags, int prot, int flags, const char *) @@ -322,8 +308,6 @@ class mmap_record { return ::gen_create_protect (get_openflags (), get_flags ()); } DWORD gen_protect () const { return ::gen_protect (get_prot (), get_flags ()); } - DWORD gen_access () const - { return ::gen_access (get_openflags (), get_flags ()); } bool compatible_flags (int fl) const; }; @@ -1034,8 +1018,8 @@ go_ahead: to accomodate the requested length, but as reserved pages which raise a SIGBUS when trying to access them. AT_ROUND_TO_PAGE and page protection on shared pages is only supported by 32 bit NT, - so don't even try on 9x and in WOW64. This is accomplished by not - setting orig_len on 9x and in WOW64 above. */ + so don't even try on WOW64. This is accomplished by not setting + orig_len on WOW64 above. */ #if 0 orig_len = roundup2 (orig_len, pagesize); #endif diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index eb7066c01..8e151ff55 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1878,16 +1878,6 @@ statvfs (const char *fname, struct statvfs *sfs) WinME, to avoid the MS KB 314417 bug */ statusex = GetDiskFreeSpaceEx (root, &availb, &totalb, &freeb); status = GetDiskFreeSpace (root, &spc, &bps, &freec, &totalc); - if (!status && statusex) - { - /* Grrr, this can happen on 9x when a share isn't attached to - a drive letter. Fake, fake, hoorah. */ - status = TRUE; - bps = 512; - spc = 8; - while ((totalb.QuadPart % (spc*bps)) && spc > 1) - spc >>= 1; - } if (status) { if (statusex) |