summaryrefslogtreecommitdiff
path: root/win32/vdir.h
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-02-26 22:26:45 +0000
committerSteve Hay <steve.m.hay@googlemail.com>2014-02-26 22:26:45 +0000
commit0e7b7035500dfac5a04098aabc2be70be928dcd2 (patch)
tree0328fc279fef8e1bdceff0c350bf10e46c52320c /win32/vdir.h
parent935d2dd37e0196379b1bbd2b423bd65f506f9cbf (diff)
downloadperl-0e7b7035500dfac5a04098aabc2be70be928dcd2.tar.gz
Remove leftover Windows 95 / Windows NT4 support code
We only support building or running on Windows 2000 or higher, as of the Windows 95 Chainsaw Massacre commit (8cbe99e5b6). These three chunks of code escaped the massacre, but the chainsaw has finally caught up with them now.
Diffstat (limited to 'win32/vdir.h')
-rw-r--r--win32/vdir.h42
1 files changed, 10 insertions, 32 deletions
diff --git a/win32/vdir.h b/win32/vdir.h
index db7ec8417f..a4186a1ad9 100644
--- a/win32/vdir.h
+++ b/win32/vdir.h
@@ -146,43 +146,21 @@ void VDir::Init(VDir* pDir, VMem *p)
else {
int bSave = bManageDirectory;
DWORD driveBits = GetLogicalDrives();
- OSVERSIONINFO osver;
-
- memset(&osver, 0, sizeof(osver));
- osver.dwOSVersionInfoSize = sizeof(osver);
- GetVersionEx(&osver);
bManageDirectory = 0;
- if (osver.dwMajorVersion < 5) {
- char szBuffer[MAX_PATH*driveCount];
- if (GetLogicalDriveStringsA(sizeof(szBuffer), szBuffer)) {
- char* pEnv = (char*)GetEnvironmentStringsA();
- char* ptr = szBuffer;
- for (index = 0; index < driveCount; ++index) {
- if (driveBits & (1<<index)) {
- ptr += SetDirA(ptr, index) + 1;
- FromEnvA(pEnv, index);
- }
- }
- FreeEnvironmentStringsA(pEnv);
- }
- SetDefaultA(".");
- }
- else { /* Windows 2000 or later */
- WCHAR szBuffer[MAX_PATH*driveCount];
- if (GetLogicalDriveStringsW(sizeof(szBuffer), szBuffer)) {
- WCHAR* pEnv = GetEnvironmentStringsW();
- WCHAR* ptr = szBuffer;
- for (index = 0; index < driveCount; ++index) {
- if (driveBits & (1<<index)) {
- ptr += SetDirW(ptr, index) + 1;
- FromEnvW(pEnv, index);
- }
+ WCHAR szBuffer[MAX_PATH*driveCount];
+ if (GetLogicalDriveStringsW(sizeof(szBuffer), szBuffer)) {
+ WCHAR* pEnv = GetEnvironmentStringsW();
+ WCHAR* ptr = szBuffer;
+ for (index = 0; index < driveCount; ++index) {
+ if (driveBits & (1<<index)) {
+ ptr += SetDirW(ptr, index) + 1;
+ FromEnvW(pEnv, index);
}
- FreeEnvironmentStringsW(pEnv);
}
- SetDefaultW(L".");
+ FreeEnvironmentStringsW(pEnv);
}
+ SetDefaultW(L".");
bManageDirectory = bSave;
}
}