This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] setup: remove legacy code


The attached patch removes all is_legacy and !IsWindowsNT() codepaths,
as well as one part specific to Win2K.


Yaakov
2013-03-04  Yaakov Selkowitz  <yselkowitz@...>

	Throughout, drop support for Cygwin 1.5 and Windows pre-XP.

Index: AntiVirus.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/AntiVirus.cc,v
retrieving revision 2.8
diff -u -p -r2.8 AntiVirus.cc
--- AntiVirus.cc	30 Jun 2009 04:14:29 -0000	2.8
+++ AntiVirus.cc	4 Mar 2013 11:11:18 -0000
@@ -163,8 +163,6 @@ AntiVirusPage::OnUnattended ()
 void
 detect ()
 {
-    if (!IsWindowsNT())
-	return;
     // TODO: trim the access rights down
     SCM = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS);
 
Index: desktop.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/desktop.cc,v
retrieving revision 2.57
diff -u -p -r2.57 desktop.cc
--- desktop.cc	12 Aug 2011 15:43:16 -0000	2.57
+++ desktop.cc	4 Mar 2013 11:11:18 -0000
@@ -94,21 +94,8 @@ make_link (const std::string& linkpath,
   std::string exepath;
   std::string argbuf;
 
-  if (IsWindowsNT ())
-    {
-      exepath = target;
-      argbuf = arg;
-    }
-  else
-    {
-      char windir[MAX_PATH];
-
-      GetWindowsDirectory (windir, sizeof (windir));
-      exepath = std::string(windir) + "\\command.com";
-      argbuf = "/E:4096 /c " + target;
-      if (arg.size ())
-	argbuf += " " + arg;
-    }
+  exepath = target;
+  argbuf = arg;
 
   msg ("make_link_2 (%s, %s, %s, %s)",
        exepath.c_str(), argbuf.c_str(),
@@ -175,25 +162,16 @@ make_cygwin_bat ()
   batname = backslash (cygpath ("/Cygwin.bat"));
   FILE *bat;
 
-  if (!is_legacy)
-    {
-      size_t len = batname.size () + 7;
-      WCHAR wname[len];
-      mklongpath (wname, batname.c_str (), len);
+  size_t len = batname.size () + 7;
+  WCHAR wname[len];
+  mklongpath (wname, batname.c_str (), len);
 
-      /* if the batch file exists, don't overwrite it */
-      if (GetFileAttributesW (wname) != INVALID_FILE_ATTRIBUTES)
-	return;
+  /* if the batch file exists, don't overwrite it */
+  if (GetFileAttributesW (wname) != INVALID_FILE_ATTRIBUTES)
+    return;
 
-      bat = nt_wfopen (wname, "wt", 0755);
-    }
-  else
-    {
-      if (_access (batname.c_str (), 0) == 0)
-	return;
+  bat = nt_wfopen (wname, "wt", 0755);
 
-      bat = fopen (batname.c_str (), "wt");
-    }
   if (!bat)
     return;
 
@@ -223,21 +201,17 @@ save_icon (const char *path, const char 
   int len = SizeofResource (NULL, rsrc);
 
   FILE *f;
-  if (!is_legacy)
-    {
-      WIN32_FILE_ATTRIBUTE_DATA attr;
+  WIN32_FILE_ATTRIBUTE_DATA attr;
 
-      size_t ilen = iconname.size () + 7;
-      WCHAR wname[ilen];
-      mklongpath (wname, iconname.c_str (), ilen);
-      if (GetFileAttributesExW (wname, GetFileExInfoStandard, &attr)
-	  && attr.dwFileAttributes != INVALID_FILE_ATTRIBUTES
-	  && attr.nFileSizeLow > 7022)	/* Size of old icon */
-	return;
-      f = nt_wfopen (wname, "wb", 0644);
-    }
-  else
-    f = fopen (iconname.c_str (), "wb");
+  size_t ilen = iconname.size () + 7;
+  WCHAR wname[ilen];
+  mklongpath (wname, iconname.c_str (), ilen);
+  if (GetFileAttributesExW (wname, GetFileExInfoStandard, &attr)
+      && attr.dwFileAttributes != INVALID_FILE_ATTRIBUTES
+      && attr.nFileSizeLow > 7022)	/* Size of old icon */
+    return;
+
+  f = nt_wfopen (wname, "wb", 0644);
   if (f)
     {
       fwrite (data, 1, len, f);
@@ -255,15 +229,13 @@ do_desktop_setup ()
 
   std::string target;
 
-  target = is_legacy ? batname : backslash (cygpath ("/bin/mintty"));
+  target = backslash (cygpath ("/bin/mintty"));
 
   if (root_menu)
-    start_menu (is_legacy ? "Cygwin Bash Shell" : "Cygwin Terminal", target,
-    		is_legacy ? "" : "-i /Cygwin-Terminal.ico -");
+    start_menu ("Cygwin Terminal", target, "-i /Cygwin-Terminal.ico -");
 
   if (root_desktop)
-    desktop_icon (is_legacy ? "Cygwin" : "Cygwin Terminal", target,
-		  is_legacy ? "" : "-i /Cygwin-Terminal.ico -");
+    desktop_icon ("Cygwin Terminal", target, "-i /Cygwin-Terminal.ico -");
 }
 
 static int da[] = { IDC_ROOT_DESKTOP, 0 };
@@ -436,12 +408,8 @@ DesktopSetupPage::OnActivate ()
 	}
       else
 	{
-	  root_menu =
-	    is_legacy
-	    ? check_startmenu ("Cygwin Bash Shell",
-			       backslash (cygpath ("/cygwin.bat")))
-	    : check_startmenu ("Cygwin Terminal",
-			       backslash (cygpath ("/bin/mintty")));
+	  root_menu = check_startmenu ("Cygwin Terminal",
+				       backslash (cygpath ("/bin/mintty")));
 	}
 
       if (NoDesktopOption) 
@@ -450,11 +418,8 @@ DesktopSetupPage::OnActivate ()
 	}
       else
 	{
-	  root_desktop =
-	    is_legacy
-	    ? check_desktop ("Cygwin", backslash (cygpath ("/cygwin.bat")))
-	    : check_desktop ("Cygwin Terminal",
-			     backslash (cygpath ("/bin/mintty")));
+	  root_desktop = check_desktop ("Cygwin Terminal",
+					backslash (cygpath ("/bin/mintty")));
 	}
     }
 
Index: ini.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/ini.h,v
retrieving revision 2.41
diff -u -p -r2.41 ini.h
--- ini.h	22 Dec 2009 17:12:46 -0000	2.41
+++ ini.h	4 Mar 2013 11:11:18 -0000
@@ -38,9 +38,8 @@ typedef enum
   EXCLUDE_NOT_FOUND
 } excludes;
 
-extern bool is_legacy;
-#define SETUP_INI_FILENAME (is_legacy ? "setup-legacy.ini" : "setup.ini")
-#define SETUP_BZ2_FILENAME (is_legacy ? "setup-legacy.bz2" : "setup.bz2")
+#define SETUP_INI_FILENAME "setup.ini"
+#define SETUP_BZ2_FILENAME "setup.bz2"
 
 /* The following three vars are used to facilitate error handling between the
    parser/lexer and its callers, namely ini.cc:do_remote_ini() and
Index: install.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/install.cc,v
retrieving revision 2.103
diff -u -p -r2.103 install.cc
--- install.cc	8 Feb 2013 15:55:01 -0000	2.103
+++ install.cc	4 Mar 2013 11:11:18 -0000
@@ -287,50 +287,18 @@ Installer::extract_replace_on_reboot (ar
       std::string s = cygpath ("/" + fn + ".new"),
         d = cygpath ("/" + fn);
 
-      if (!IsWindowsNT())
-        {
-          /* Get the short file names */
-          char s2[MAX_PATH], d2[MAX_PATH];
-          unsigned int slen =
-            GetShortPathName (s.c_str (), s2, MAX_PATH),
-            dlen = GetShortPathName (d.c_str (), d2, MAX_PATH);
-
-          if (!slen || slen > MAX_PATH || !dlen || dlen > MAX_PATH)
-            replaceOnRebootFailed(fn);
-          else
-            if (!WritePrivateProfileString ("rename", d2, s2,
-                                            "WININIT.INI"))
-              replaceOnRebootFailed (fn);
-            else
-              replaceOnRebootSucceeded (fn, rebootneeded);
-        }
+      WCHAR sname[s.size () + 7];
+      WCHAR dname[d.size () + 7];
+      mklongpath (sname, s.c_str (), s.size () + 7);
+      mklongpath (dname, d.c_str (), d.size () + 7);
+      if (!MoveFileExW (sname, dname,
+                        MOVEFILE_DELAY_UNTIL_REBOOT |
+                        MOVEFILE_REPLACE_EXISTING))
+        replaceOnRebootFailed (fn);
       else
         {
-          WCHAR sname[s.size () + 7];
-          WCHAR dname[d.size () + 7];
-          /* Windows 2000 has a bug:  Prepending \\?\ does not
-           * work in conjunction with MOVEFILE_DELAY_UNTIL_REBOOT.
-           * So in case of Windows 2000 we just convert the path
-           * to wide char and hope for the best. */
-          if (OSMajorVersion () == 5 && OSMinorVersion () == 0)
-            {
-              mbstowcs (sname, s.c_str (), s.size () + 7);
-              mbstowcs (dname, d.c_str (), d.size () + 7);
-            }
-          else
-            {
-              mklongpath (sname, s.c_str (), s.size () + 7);
-              mklongpath (dname, d.c_str (), d.size () + 7);
-            }
-          if (!MoveFileExW (sname, dname,
-                            MOVEFILE_DELAY_UNTIL_REBOOT |
-                            MOVEFILE_REPLACE_EXISTING))
-            replaceOnRebootFailed (fn);
-          else
-            {
-              create_allow_protected_renames ();
-              replaceOnRebootSucceeded (fn, rebootneeded);
-            }
+          create_allow_protected_renames ();
+          replaceOnRebootSucceeded (fn, rebootneeded);
         }
     }
   return false;
@@ -669,18 +637,7 @@ do_install_thread (HINSTANCE h, HWND own
   Progress.SetBar3 (df);
 
   /* Writes Cygwin/setup/rootdir registry value */
-  if (!is_legacy)
-    create_install_root ();
-  else
-    {
-      int istext = (root_text == IDC_ROOT_TEXT) ? 1 : 0;
-      int issystem = (root_scope == IDC_ROOT_SYSTEM) ? 1 : 0;
-
-      create_mount ("/", get_root_dir (), istext, issystem);
-      create_mount ("/usr/bin", cygpath ("/bin"), istext, issystem);
-      create_mount ("/usr/lib", cygpath ("/lib"), istext, issystem);
-      set_cygdrive_flags (istext, issystem);
-    }
+  create_install_root ();
 
   /* Let's hope people won't uninstall packages before installing [b]ash */
   init_run_script ();
Index: io_stream_cygfile.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/io_stream_cygfile.cc,v
retrieving revision 2.33
diff -u -p -r2.33 io_stream_cygfile.cc
--- io_stream_cygfile.cc	8 Mar 2012 09:20:03 -0000	2.33
+++ io_stream_cygfile.cc	4 Mar 2013 11:11:18 -0000
@@ -151,15 +151,10 @@ io_stream_cygfile::io_stream_cygfile (co
   fname = cygpath (normalise(name));
   if (mode.size ())
     {
-      if (IsWindowsNT ())
-	{
-	  if (fname.rfind (".exe") != std::string::npos
-	      || fname.rfind (".dll") != std::string::npos)
-	    perms |= 0111;	/* Make .exe and .dll always executable. */
-	  fp = nt_wfopen (w_str(), mode.c_str (), perms);
-	}
-      else
-	fp = fopen (fname.c_str (), mode.c_str ());
+      if (fname.rfind (".exe") != std::string::npos
+	  || fname.rfind (".dll") != std::string::npos)
+        perms |= 0111;	/* Make .exe and .dll always executable. */
+      fp = nt_wfopen (w_str(), mode.c_str (), perms);
       if (!fp)
       {
 	lasterr = errno;
@@ -185,16 +180,11 @@ io_stream_cygfile::exists (const std::st
   if (!get_root_dir ().size())
     return 0;
 
-  if (IsWindowsNT ())
-    {
-      size_t len = cygpath (normalise(path)).size () + 7;
-      WCHAR wname[len];
-      mklongpath (wname, cygpath (normalise(path)).c_str (), len);
-      DWORD attr = GetFileAttributesW (wname);
-      if (attr != INVALID_FILE_ATTRIBUTES)
-	return 1;
-    }
-  else if (_access (cygpath (normalise(path)).c_str (), 0))
+  size_t len = cygpath (normalise(path)).size () + 7;
+  WCHAR wname[len];
+  mklongpath (wname, cygpath (normalise(path)).c_str (), len);
+  DWORD attr = GetFileAttributesW (wname);
+  if (attr != INVALID_FILE_ATTRIBUTES)
     return 1;
   return 0;
 }
@@ -209,49 +199,26 @@ io_stream_cygfile::remove (const std::st
     /* TODO: assign a errno for "no mount table :} " */
     return 1;
 
-  if (IsWindowsNT ())
-    {
-      size_t len = cygpath (normalise(path)).size () + 7;
-      WCHAR wpath[len];
-      mklongpath (wpath, cygpath (normalise(path)).c_str (), len);
-
-      unsigned long w = GetFileAttributesW (wpath);
-      if (w != INVALID_FILE_ATTRIBUTES && w & FILE_ATTRIBUTE_DIRECTORY)
-	{
-	  len = wcslen (wpath);
-	  WCHAR tmp[len + 10];
-	  wcscpy (tmp, wpath);
-	  int i = 0;
-	  do
-	    {
-	      ++i;
-	      swprintf (tmp + len, L"old-%d", i);
-	    }
-	  while (GetFileAttributesW (tmp) != INVALID_FILE_ATTRIBUTES);
-	  fprintf (stderr, "warning: moving directory \"%s\" out of the way.\n",
-		   normalise(path).c_str());
-	  MoveFileW (wpath, tmp);
-	}
-    }
-  else
+  size_t len = cygpath (normalise(path)).size () + 7;
+  WCHAR wpath[len];
+  mklongpath (wpath, cygpath (normalise(path)).c_str (), len);
+
+  unsigned long w = GetFileAttributesW (wpath);
+  if (w != INVALID_FILE_ATTRIBUTES && w & FILE_ATTRIBUTE_DIRECTORY)
     {
-      unsigned long w = GetFileAttributesA (cygpath (normalise(path)).c_str ());
-      if (w != INVALID_FILE_ATTRIBUTES && w & FILE_ATTRIBUTE_DIRECTORY)
-	{
-	  size_t len = cygpath (normalise(path)).size ();
-	  char tmp[len + 10];
-	  strcpy (tmp, cygpath (normalise(path)).c_str ());
-	  int i = 0;
-	  do
-	    {
-	      ++i;
-	      sprintf (tmp + len, "old-%d", i);
-	    }
-	  while (GetFileAttributesA (tmp) != INVALID_FILE_ATTRIBUTES);
-	  fprintf (stderr, "warning: moving directory \"%s\" out of the way.\n",
-		   normalise(path).c_str());
-	  MoveFileA (cygpath (normalise(path)).c_str (), tmp);
+      len = wcslen (wpath);
+      WCHAR tmp[len + 10];
+      wcscpy (tmp, wpath);
+      int i = 0;
+      do
+        {
+	  ++i;
+	  swprintf (tmp + len, L"old-%d", i);
 	}
+      while (GetFileAttributesW (tmp) != INVALID_FILE_ATTRIBUTES);
+      fprintf (stderr, "warning: moving directory \"%s\" out of the way.\n",
+	       normalise(path).c_str());
+      MoveFileW (wpath, tmp);
     }
   return io_stream::remove (std::string ("file://") + cygpath (normalise(path)).c_str());
 }
@@ -402,14 +369,9 @@ io_stream_cygfile::set_mtime (time_t mti
   ftime.dwHighDateTime = ftimev >> 32;
   ftime.dwLowDateTime = ftimev;
   HANDLE h;
-  if (IsWindowsNT ())
-    h = CreateFileW (w_str (), GENERIC_WRITE,
-		     FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
-		     FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
-  else
-    h = CreateFileA (fname.c_str (), GENERIC_WRITE,
-		     FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
-		     FILE_ATTRIBUTE_NORMAL, 0);
+  h = CreateFileW (w_str (), GENERIC_WRITE,
+		   FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
+		   FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
   if (h == INVALID_HANDLE_VALUE)
     return 1;
   SetFileTime (h, 0, 0, &ftime);
@@ -438,27 +400,13 @@ io_stream_cygfile::get_size ()
     return 0;
   HANDLE h;
   DWORD ret = 0;
-  if (IsWindowsNT ())
+  h = CreateFileW (w_str (), GENERIC_READ,
+		   FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
+		   FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
+  if (h != INVALID_HANDLE_VALUE)
     {
-      h = CreateFileW (w_str (), GENERIC_READ,
-		       FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
-		       FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
-      if (h != INVALID_HANDLE_VALUE)
-	{
-	  ret = GetFileSize (h, NULL);
-	  CloseHandle (h);
-	}
-    }
-  else
-    {
-      WIN32_FIND_DATAA buf;
-      h = FindFirstFileA (fname.c_str (), &buf);
-      if (h != INVALID_HANDLE_VALUE)
-	{
-	  if (buf.nFileSizeHigh == 0)
-	    ret = buf.nFileSizeLow;
-	  FindClose (h);
-	}
+      ret = GetFileSize (h, NULL);
+      CloseHandle (h);
     }
   return ret;
 }
Index: io_stream_file.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/io_stream_file.cc,v
retrieving revision 2.31
diff -u -p -r2.31 io_stream_file.cc
--- io_stream_file.cc	29 Apr 2012 06:26:54 -0000	2.31
+++ io_stream_file.cc	4 Mar 2013 11:11:18 -0000
@@ -90,10 +90,7 @@ io_stream_file::io_stream_file (const st
     return;
   if (mode.size ())
     {
-      if (IsWindowsNT ())
-	fp = nt_wfopen (w_str (), mode.c_str (), perms); 
-      else
-	fp = fopen (fname.c_str (), mode.c_str ());
+      fp = nt_wfopen (w_str (), mode.c_str (), perms);
       if (!fp)
 	lasterr = errno;
     }
@@ -111,15 +108,10 @@ int
 io_stream_file::exists (const std::string& path)
 {
   DWORD attr;
-  if (!IsWindowsNT ())
-    attr = GetFileAttributesA (path.c_str ());
-  else
-    {
-      size_t len = 2 * path.size () + 7;
-      WCHAR wname[len];
-      mklongpath (wname, path.c_str (), len);
-      attr = GetFileAttributesW (wname);
-    }
+  size_t len = 2 * path.size () + 7;
+  WCHAR wname[len];
+  mklongpath (wname, path.c_str (), len);
+  attr = GetFileAttributesW (wname);
   return attr != INVALID_FILE_ATTRIBUTES
 	 && !(attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE));
 }
@@ -129,58 +121,31 @@ io_stream_file::remove (const std::strin
 {
   if (!path.size())
     return 1;
-  if (IsWindowsNT ())
-    {
-      size_t len = path.size () + 7;
-      WCHAR wpath[len];
-      mklongpath (wpath, path.c_str (), len);
-
-      unsigned long w = GetFileAttributesW (wpath);
-      if (w == INVALID_FILE_ATTRIBUTES)
-	return 0;
-      if (w & FILE_ATTRIBUTE_DIRECTORY)
-	{
-	  len = wcslen (wpath);
-	  WCHAR tmp[len + 10];
-	  wcscpy (tmp, wpath);
-	  int i = 0;
-	  do
-	    {
-	      i++;
-	      swprintf (tmp + len, L"old-%d", i);
-	    }
-	  while (GetFileAttributesW (tmp) != INVALID_FILE_ATTRIBUTES);
-	  fprintf (stderr, "warning: moving directory \"%s\" out of the way.\n",
-		   path.c_str());
-	  MoveFileW (wpath, tmp);
-	}
-      SetFileAttributesW (wpath, w & ~FILE_ATTRIBUTE_READONLY);
-      return !DeleteFileW (wpath);
-    }
-  else
+  size_t len = path.size () + 7;
+  WCHAR wpath[len];
+  mklongpath (wpath, path.c_str (), len);
+
+  unsigned long w = GetFileAttributesW (wpath);
+  if (w == INVALID_FILE_ATTRIBUTES)
+    return 0;
+  if (w & FILE_ATTRIBUTE_DIRECTORY)
     {
-      unsigned long w = GetFileAttributesA (path.c_str ());
-      if (w == INVALID_FILE_ATTRIBUTES)
-      	return 0;
-      if (w & FILE_ATTRIBUTE_DIRECTORY)
+      len = wcslen (wpath);
+      WCHAR tmp[len + 10];
+      wcscpy (tmp, wpath);
+      int i = 0;
+      do
 	{
-	  size_t len = path.size ();
-	  char tmp[len + 10];
-	  strcpy (tmp, path.c_str ());
-	  int i = 0;
-	  do
-	    {
-	      i++;
-	      sprintf (tmp + len, "old-%d", i);
-	    }
-	  while (GetFileAttributesA (tmp) != INVALID_FILE_ATTRIBUTES);
-	  fprintf (stderr, "warning: moving directory \"%s\" out of the way.\n",
-		   path.c_str());
-	  MoveFileA (path.c_str (), tmp);
+	  i++;
+	  swprintf (tmp + len, L"old-%d", i);
 	}
-      SetFileAttributesA (path.c_str (), w & ~FILE_ATTRIBUTE_READONLY);
-      return !DeleteFileA (path.c_str ());
+      while (GetFileAttributesW (tmp) != INVALID_FILE_ATTRIBUTES);
+      fprintf (stderr, "warning: moving directory \"%s\" out of the way.\n",
+	       path.c_str());
+      MoveFileW (wpath, tmp);
     }
+  SetFileAttributesW (wpath, w & ~FILE_ATTRIBUTE_READONLY);
+  return !DeleteFileW (wpath);
 }
 
 int
@@ -272,14 +237,9 @@ io_stream_file::set_mtime (time_t mtime)
   ftime.dwHighDateTime = ftimev >> 32;
   ftime.dwLowDateTime = ftimev;
   HANDLE h;
-  if (IsWindowsNT ())
-    h = CreateFileW (w_str(), GENERIC_WRITE,
-		     FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
-		     FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
-  else
-    h = CreateFileA (fname.c_str (), GENERIC_WRITE,
-		     FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
-		     FILE_ATTRIBUTE_NORMAL, 0);
+  h = CreateFileW (w_str(), GENERIC_WRITE,
+		   FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
+		   FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
   if (h != INVALID_HANDLE_VALUE)
     {
       SetFileTime (h, 0, 0, &ftime);
@@ -306,27 +266,13 @@ io_stream_file::get_size ()
     return 0;
   HANDLE h;
   DWORD ret = 0;
-  if (IsWindowsNT ())
-    {
-      h = CreateFileW (w_str (), GENERIC_READ,
-		       FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
-		       FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
-      if (h != INVALID_HANDLE_VALUE)
-	{
-	  ret = GetFileSize (h, NULL);
-	  CloseHandle (h);
-	}
-    }
-  else
+  h = CreateFileW (w_str (), GENERIC_READ,
+		   FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING,
+		   FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
+  if (h != INVALID_HANDLE_VALUE)
     {
-      WIN32_FIND_DATAA buf;
-      h = FindFirstFileA (fname.c_str(), &buf);
-      if (h != INVALID_HANDLE_VALUE)
-	{
-	  if (buf.nFileSizeHigh == 0)
-	    ret = buf.nFileSizeLow;
-	  FindClose (h);
-	}
+      ret = GetFileSize (h, NULL);
+      CloseHandle (h);
     }
   return ret;
 }
Index: main.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/main.cc,v
retrieving revision 2.69
diff -u -p -r2.69 main.cc
--- main.cc	4 Sep 2012 13:55:17 -0000	2.69
+++ main.cc	4 Mar 2013 11:11:18 -0000
@@ -86,7 +86,6 @@ extern char **_argv;
 using namespace std;
 
 HINSTANCE hinstance;
-bool is_legacy;
 
 static BoolOption UnattendedOption (false, 'q', "quiet-mode", "Unattended setup mode");
 static BoolOption PackageManagerOption (false, 'M', "package-manager", "Semi-attended chooser-only mode");
@@ -216,20 +215,6 @@ main_display ()
   CoUninitialize ();
 }
 
-static void
-set_legacy (const char *command)
-{
-  char buf[MAX_PATH + 1];
-  if (strchr (command, '~') == NULL || !dyn_GetLongPathName
-      || !dyn_GetLongPathName (command, buf, MAX_PATH))
-    {
-      strncpy (buf, command, MAX_PATH);
-      buf[MAX_PATH] = '\0';
-    }
-  strlwr (buf);
-  is_legacy = strstr (buf, "setup-legacy");
-}
-
 int WINAPI
 WinMain (HINSTANCE h,
 	 HINSTANCE hPrevInstance, LPSTR command_line, int cmd_show)
@@ -249,32 +234,6 @@ WinMain (HINSTANCE h,
     ++argc;
   _argv = __argv;
 
-  set_legacy (_argv[0]);
-
-  if (is_legacy && IsWindowsNT ())
-    {
-      if (MessageBox (NULL,
-		      "You are attempting to install a legacy version of Cygwin\n"
-		      "on a modern version of Windows.  Press \"OK\" if this is\n"
-		      "really want you want to do.  Otherwise press \"Cancel\".\n"
-		      "See http://cygwin.com/ for more information.",
-		      "Attempt to install legacy version of Cygwin",
-		      MB_OKCANCEL | MB_ICONSTOP | MB_SETFOREGROUND | MB_TOPMOST)
-	  == IDCANCEL)
-	return 1;
-    }
-  else if (!is_legacy && !IsWindowsNT ())
-    {
-      MessageBox (NULL,
-		  "Cygwin 1.7 and later does not run on Windows 95,\n"
-		  "Windows 98, or Windows Me.  If you want to install Cygwin\n"
-		  "on one of these systems, please install an older version.\n"
-		  "See http://cygwin.com/ for more information.",
-		  "Unsupported version of Windows detected",
-		  MB_OK | MB_ICONSTOP | MB_SETFOREGROUND | MB_TOPMOST);
-      return 1;
-    }
-
   try {
     char cwd[MAX_PATH];
     GetCurrentDirectory (MAX_PATH, cwd);
@@ -299,8 +258,7 @@ WinMain (HINSTANCE h,
 
     /* Set the default DACL and Group only on NT/W2K. 9x/ME has 
        no idea of access control lists and security at all.  */
-    if (IsWindowsNT ())
-      nt_sec.setDefaultSecurity ();
+    nt_sec.setDefaultSecurity ();
 
     if (HelpOption)
       {
Index: mkdir.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/mkdir.cc,v
retrieving revision 2.16
diff -u -p -r2.16 mkdir.cc
--- mkdir.cc	22 Dec 2011 21:40:28 -0000	2.16
+++ mkdir.cc	4 Mar 2013 11:11:18 -0000
@@ -41,51 +41,45 @@ mkdir_p (int isadir, const char *in_path
   WCHAR wpath[len + 6];
 
   strcpy (path, in_path);
-  if (IsWindowsNT ())
-    mklongpath (wpath, path, len + 6);
+  mklongpath (wpath, path, len + 6);
 
-  d = IsWindowsNT () ? GetFileAttributesW (wpath) : GetFileAttributesA (path);
+  d = GetFileAttributesW (wpath);
   if (d != INVALID_FILE_ATTRIBUTES && d & FILE_ATTRIBUTE_DIRECTORY)
     return 0;
 
   if (isadir)
     {
-      if (IsWindowsNT ())
-      	{
-	  NTSTATUS status;
-	  HANDLE dir;
-	  UNICODE_STRING upath;
-	  OBJECT_ATTRIBUTES attr;
-	  IO_STATUS_BLOCK io;
-	  SECURITY_DESCRIPTOR sd;
-	  acl_t acl;
-
-	  wpath[1] = '?';
-	  upath.Length = wcslen (wpath) * sizeof (WCHAR);
-	  upath.MaximumLength = upath.Length + sizeof (WCHAR);
-	  upath.Buffer = wpath;
-	  InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL,
-				      mode == 0 ? NULL
-				      : nt_sec.GetPosixPerms (path, NULL, NULL,
-							      S_IFDIR | mode,
-							      sd, acl));
-	  status = NtCreateFile (&dir, SYNCHRONIZE | READ_CONTROL
-				 | FILE_LIST_DIRECTORY,
-				 &attr, &io, NULL, FILE_ATTRIBUTE_DIRECTORY,
-				 FILE_SHARE_VALID_FLAGS, FILE_CREATE,
-				 FILE_DIRECTORY_FILE
-				 | FILE_SYNCHRONOUS_IO_NONALERT
-				 | FILE_OPEN_FOR_BACKUP_INTENT, NULL, 0);
-	  if (NT_SUCCESS (status))
-	    {
-	      NtClose (dir);
-	      return 0;
-	    }
-	  else
-	    SetLastError (RtlNtStatusToDosError (status));
-      	}
-      else if (CreateDirectoryA (path, 0))
-	return 0;
+      NTSTATUS status;
+      HANDLE dir;
+      UNICODE_STRING upath;
+      OBJECT_ATTRIBUTES attr;
+      IO_STATUS_BLOCK io;
+      SECURITY_DESCRIPTOR sd;
+      acl_t acl;
+
+      wpath[1] = '?';
+      upath.Length = wcslen (wpath) * sizeof (WCHAR);
+      upath.MaximumLength = upath.Length + sizeof (WCHAR);
+      upath.Buffer = wpath;
+      InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL,
+				  mode == 0 ? NULL
+				  : nt_sec.GetPosixPerms (path, NULL, NULL,
+							  S_IFDIR | mode,
+							  sd, acl));
+      status = NtCreateFile (&dir, SYNCHRONIZE | READ_CONTROL
+			     | FILE_LIST_DIRECTORY,
+			     &attr, &io, NULL, FILE_ATTRIBUTE_DIRECTORY,
+			     FILE_SHARE_VALID_FLAGS, FILE_CREATE,
+			     FILE_DIRECTORY_FILE
+			     | FILE_SYNCHRONOUS_IO_NONALERT
+			     | FILE_OPEN_FOR_BACKUP_INTENT, NULL, 0);
+      if (NT_SUCCESS (status))
+	{
+	  NtClose (dir);
+	  return 0;
+	}
+      else
+	SetLastError (RtlNtStatusToDosError (status));
       gse = GetLastError ();
       if (gse != ERROR_PATH_NOT_FOUND && gse != ERROR_FILE_NOT_FOUND)
 	{
@@ -94,7 +88,7 @@ mkdir_p (int isadir, const char *in_path
 	      fprintf (stderr,
 		       "warning: deleting \"%s\" so I can make a directory there\n",
 		       path);
-	      if (IsWindowsNT () ? DeleteFileW (wpath) : DeleteFileA (path))
+	      if (DeleteFileW (wpath))
 		return mkdir_p (isadir, path, mode ? 0755 : 0);
 	    }
 	  return 1;
Index: mklink2.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/mklink2.cc,v
retrieving revision 2.13
diff -u -p -r2.13 mklink2.cc
--- mklink2.cc	30 Aug 2012 22:23:02 -0000	2.13
+++ mklink2.cc	4 Mar 2013 11:11:18 -0000
@@ -43,34 +43,9 @@ make_link_2 (char const *exepath, char c
 
 #define SYMLINK_COOKIE "!<symlink>"
 
-/* Predicate: file is not currently in existence.
- * A file race can occur otherwise.
- */
-static int
-mkcygsymlink_9x (const char *from, const char *to)
-{
-  char buf[512];
-  unsigned long w;
-
-  HANDLE h = CreateFileA (from, GENERIC_WRITE, 0, 0, CREATE_NEW,
-			  FILE_ATTRIBUTE_NORMAL, 0);
-  if (h == INVALID_HANDLE_VALUE)
-    return 1;
-  strcpy (buf, SYMLINK_COOKIE);
-  strcat (buf, to);
-  if (WriteFile (h, buf, strlen (buf) + 1, &w, NULL))
-    {
-      CloseHandle (h);
-      SetFileAttributesA (from, FILE_ATTRIBUTE_SYSTEM);
-      return 0;
-    }
-  CloseHandle (h);
-  DeleteFileA (from);
-  return 1;
-}
-
-static int
-mkcygsymlink_nt (const char *from, const char *to)
+extern "C"
+int
+mkcygsymlink (const char *from, const char *to)
 {
   char buf[strlen (SYMLINK_COOKIE) + 4096];
   unsigned long w;
@@ -102,14 +77,6 @@ mkcygsymlink_nt (const char *from, const
   return 1;
 }
 
-extern "C"
-int
-mkcygsymlink (const char *from, const char *to)
-{
-  return IsWindowsNT () ? mkcygsymlink_nt (from, to)
-			: mkcygsymlink_9x (from, to);
-}
-
 static struct {
   FILE_LINK_INFORMATION fli;
   WCHAR namebuf[32768];
@@ -119,9 +86,6 @@ extern "C"
 int
 mkcyghardlink (const char *from, const char *to)
 {
-  if (!IsWindowsNT ())
-    return 1;
-
   size_t flen = strlen (from) + 7;
   size_t tlen = strlen (to) + 7;
   wchar_t wfrom[flen];
Index: mount.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/mount.cc,v
retrieving revision 2.33
diff -u -p -r2.33 mount.cc
--- mount.cc	29 Jan 2010 22:46:28 -0000	2.33
+++ mount.cc	4 Mar 2013 11:11:18 -0000
@@ -304,10 +304,6 @@ in_table (struct mnt *m)
 static int
 is_admin ()
 {
-  // Windows 9X users are considered Administrators by definition
-  if (!IsWindowsNT ())
-    return 1;
-
   // Get the process token for the current process
   HANDLE token;
   if (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &token))
@@ -390,7 +386,6 @@ read_mounts_9x ()
   DWORD posix_path_size;
   int res;
   struct mnt *m = mount_table;
-  DWORD disposition;
   char buf[10000];
 
   root_here = NULL;
@@ -412,11 +407,7 @@ read_mounts_9x ()
 	       CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME);
 
       HKEY key = issystem ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
-      if ((IsWindowsNT () ? RegOpenKeyEx (key, buf, 0, KEY_ALL_ACCESS, &key)
-			  : RegCreateKeyEx (key, buf, 0, (char *)"Cygwin", 0,
-					    KEY_ALL_ACCESS, 0, &key,
-					    &disposition))
-	  != ERROR_SUCCESS)
+      if ((RegOpenKeyEx (key, buf, 0, KEY_ALL_ACCESS, &key)) != ERROR_SUCCESS)
 	break;
       for (int i = 0;; i++, m++)
 	{
@@ -465,19 +456,6 @@ read_mounts_9x ()
 	}
       RegCloseKey (key);
     }
-
-  if (is_legacy && !root_here)
-    {
-      root_here = m;
-      m->posix = "/";
-      char windir[MAX_PATH];
-      root_text = IDC_ROOT_BINARY;
-      root_scope = (is_admin ())? IDC_ROOT_SYSTEM : IDC_ROOT_USER;
-      GetWindowsDirectory (windir, sizeof (windir));
-      windir[2] = 0;
-      set_root_dir (std::string (windir) + "\\cygwin");
-      m++;
-    }
 }
 
 inline char *
@@ -634,8 +612,8 @@ add_usr_mnts (struct mnt *m)
     }
 }
 
-static void
-read_mounts_nt (const std::string val)
+void
+read_mounts (const std::string val)
 {
   DWORD posix_path_size;
   struct mnt *m = mount_table;
@@ -708,21 +686,9 @@ read_mounts_nt (const std::string val)
 }
 
 void
-read_mounts (const std::string val)
-{
-  if (!is_legacy)
-    read_mounts_nt (val);
-  else
-    read_mounts_9x ();
-}
-
-void
 set_root_dir (const std::string val)
 {
-  if (!is_legacy)
-    read_mounts (val);
-  else
-    root_here->native = val;
+  read_mounts (val);
 }
 
 const std::string
Index: package_meta.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/package_meta.cc,v
retrieving revision 2.61
diff -u -p -r2.61 package_meta.cc
--- package_meta.cc	23 Feb 2012 14:34:07 -0000	2.61
+++ package_meta.cc	4 Mar 2013 11:11:18 -0000
@@ -172,53 +172,25 @@ packagemeta::uninstall ()
 
 	  std::string d = cygpath ("/" + line);
 	  WCHAR wname[d.size () + 11]; /* Prefix + ".lnk". */
-	  if (IsWindowsNT ())
+	  mklongpath (wname, d.c_str (), d.size () + 11);
+	  DWORD dw = GetFileAttributesW (wname);
+	  if (dw != INVALID_FILE_ATTRIBUTES
+	      && !(dw & FILE_ATTRIBUTE_DIRECTORY))
 	    {
-	      mklongpath (wname, d.c_str (), d.size () + 11);
-	      DWORD dw = GetFileAttributesW (wname);
-	      if (dw != INVALID_FILE_ATTRIBUTES
-		  && !(dw & FILE_ATTRIBUTE_DIRECTORY))
-		{
-		  log (LOG_BABBLE) << "unlink " << d << endLog;
-		  SetFileAttributesW (wname, dw & ~FILE_ATTRIBUTE_READONLY);
-		  DeleteFileW (wname);
-		}
-	    }
-	  else
-	    {
-	      DWORD dw = GetFileAttributesA (d.c_str());
-	      if (dw != INVALID_FILE_ATTRIBUTES
-		  && !(dw & FILE_ATTRIBUTE_DIRECTORY))
-		{
-		  log (LOG_BABBLE) << "unlink " << d << endLog;
-		  SetFileAttributesA (d.c_str(), dw & ~FILE_ATTRIBUTE_READONLY);
-		  DeleteFileA (d.c_str());
-		}
+	      log (LOG_BABBLE) << "unlink " << d << endLog;
+	      SetFileAttributesW (wname, dw & ~FILE_ATTRIBUTE_READONLY);
+	      DeleteFileW (wname);
 	    }
 	  /* Check for Windows shortcut of same name. */
 	  d += ".lnk";
-	  if (IsWindowsNT ())
-	    {
-	      wcscat (wname, L".lnk");
-	      DWORD dw = GetFileAttributesW (wname);
-	      if (dw != INVALID_FILE_ATTRIBUTES
-		  && !(dw & FILE_ATTRIBUTE_DIRECTORY))
-		{
-		  log (LOG_BABBLE) << "unlink " << d << endLog;
-		  SetFileAttributesW (wname, dw & ~FILE_ATTRIBUTE_READONLY);
-		  DeleteFileW (wname);
-		}
-	    }
-	  else
+	  wcscat (wname, L".lnk");
+	  dw = GetFileAttributesW (wname);
+	  if (dw != INVALID_FILE_ATTRIBUTES
+	      && !(dw & FILE_ATTRIBUTE_DIRECTORY))
 	    {
-	      DWORD dw = GetFileAttributesA (d.c_str());
-	      if (dw != INVALID_FILE_ATTRIBUTES
-		  && !(dw & FILE_ATTRIBUTE_DIRECTORY))
-		{
-		  log (LOG_BABBLE) << "unlink " << d << endLog;
-		  SetFileAttributesA (d.c_str(), dw & ~FILE_ATTRIBUTE_READONLY);
-		  DeleteFileA (d.c_str());
-		}
+	      log (LOG_BABBLE) << "unlink " << d << endLog;
+	      SetFileAttributesW (wname, dw & ~FILE_ATTRIBUTE_READONLY);
+	      DeleteFileW (wname);
 	    }
 	  line = installed.getnextfile ();
 	}
@@ -232,14 +204,9 @@ packagemeta::uninstall ()
         it--;
         std::string d = cygpath("/" + *it);
 	WCHAR wname[d.size () + 11];
-	if (IsWindowsNT ())
-	  {
-	    mklongpath (wname, d.c_str (), d.size () + 11);
-	    if (RemoveDirectoryW (wname))
-	      log (LOG_BABBLE) << "rmdir " << d << endLog;
-	  }
-        else if (RemoveDirectoryA (d.c_str()))
-          log (LOG_BABBLE) << "rmdir " << d << endLog;
+	mklongpath (wname, d.c_str (), d.size () + 11);
+	if (RemoveDirectoryW (wname))
+	  log (LOG_BABBLE) << "rmdir " << d << endLog;
       }
     }
   installed = packageversion();
Index: res.rc
===================================================================
RCS file: /cvs/cygwin-apps/setup/res.rc,v
retrieving revision 2.96
diff -u -p -r2.96 res.rc
--- res.rc	8 Feb 2013 15:55:01 -0000	2.96
+++ res.rc	4 Mar 2013 11:11:18 -0000
@@ -68,7 +68,7 @@ BEGIN
                     SETUP_STANDARD_DIALOG_W,1
     LTEXT           "Choose whether to disable your virus scanner while installing.",IDC_STATIC_HEADER_TITLE,7,0,
                     258,8,NOT WS_GROUP
-    LTEXT           "Some Antivirus programs, notably McAfee, cause a blue screen on Windows NT/2000/XP computers during installation of Cygwin.", 
+    LTEXT           "Some Antivirus programs, notably McAfee, cause a blue screen on Windows XP computers during installation of Cygwin.", 
    		    IDC_STATIC,21,9,239,16,NOT WS_GROUP
     LTEXT	    "One that may be a problem has been detected. Cygwin setup can disable this during the installation process, and re-enable it when the install is complete.",
                     IDC_STATIC,21,32,239,24,NOT WS_GROUP
Index: root.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/root.cc,v
retrieving revision 2.26
diff -u -p -r2.26 root.cc
--- root.cc	17 Apr 2010 12:36:45 -0000	2.26
+++ root.cc	4 Mar 2013 11:11:18 -0000
@@ -99,52 +99,49 @@ load_dialog (HWND h)
   rbset (h, su, root_scope);
   eset (h, IDC_ROOT_DIR, get_root_dir ());
   check_if_enable_next (h);
-  if (!is_legacy)
-    {
-      /* Stretch IDC_ROOTDIR_GRP content to full dialog width.  Use
-         IDC_ROOTDIR_GRP rectangle as fix point. */
-      RECT rect_base, rect;
-      GetDlgItemRect (h, IDC_ROOTDIR_GRP, &rect_base);
-
-      GetDlgItemRect (h, IDC_INSTALLFOR_GRP, &rect);
-      rect.right = rect_base.right;
-      SetDlgItemRect (h, IDC_INSTALLFOR_GRP, &rect);
-
-      GetDlgItemRect (h, IDC_ALLUSERS_TEXT, &rect);
-      rect.right = rect_base.right - 25;
-      SetDlgItemRect (h, IDC_ALLUSERS_TEXT, &rect);
-
-      GetDlgItemRect (h, IDC_JUSTME_TEXT, &rect);
-      rect.right = rect_base.right - 25;
-      SetDlgItemRect (h, IDC_JUSTME_TEXT, &rect);
-
-      /* Change adjustment accordingly. */
-      RootControlsInfo[3].horizontalPos = CP_STRETCH;
-      RootControlsInfo[5].horizontalPos = CP_STRETCH;
-      RootControlsInfo[7].horizontalPos = CP_STRETCH;
-
-      SetWindowText (GetDlgItem (h, IDC_ALLUSERS_TEXT),
-		     "Cygwin will be available to all users of the system.");
-      SetWindowText (GetDlgItem (h, IDC_JUSTME_TEXT),
-		     "Cygwin will still be available to all users, but "
-		     "Desktop Icons, Cygwin Menu Entries, and important "
-		     "Installer information are only available to the current "
-		     "user.  Only select this if you lack Administrator "
-		     "privileges or if you have specific needs.");
-
-      ShowWindow (GetDlgItem (h, IDC_MODE_GRP), SW_HIDE);
-      ShowWindow (GetDlgItem (h, IDC_ROOT_BINARY), SW_HIDE);
-      ShowWindow (GetDlgItem (h, IDC_MODE_BIN), SW_HIDE);
-      ShowWindow (GetDlgItem (h, IDC_ROOT_TEXT), SW_HIDE);
-      ShowWindow (GetDlgItem (h, IDC_MODE_TEXT), SW_HIDE);
-      ShowWindow (GetDlgItem (h, IDC_FILEMODES_LINK), SW_HIDE);
-    }
+  /* Stretch IDC_ROOTDIR_GRP content to full dialog width.  Use
+     IDC_ROOTDIR_GRP rectangle as fix point. */
+  RECT rect_base, rect;
+  GetDlgItemRect (h, IDC_ROOTDIR_GRP, &rect_base);
+
+  GetDlgItemRect (h, IDC_INSTALLFOR_GRP, &rect);
+  rect.right = rect_base.right;
+  SetDlgItemRect (h, IDC_INSTALLFOR_GRP, &rect);
+
+  GetDlgItemRect (h, IDC_ALLUSERS_TEXT, &rect);
+  rect.right = rect_base.right - 25;
+  SetDlgItemRect (h, IDC_ALLUSERS_TEXT, &rect);
+
+  GetDlgItemRect (h, IDC_JUSTME_TEXT, &rect);
+  rect.right = rect_base.right - 25;
+  SetDlgItemRect (h, IDC_JUSTME_TEXT, &rect);
+
+  /* Change adjustment accordingly. */
+  RootControlsInfo[3].horizontalPos = CP_STRETCH;
+  RootControlsInfo[5].horizontalPos = CP_STRETCH;
+  RootControlsInfo[7].horizontalPos = CP_STRETCH;
+
+  SetWindowText (GetDlgItem (h, IDC_ALLUSERS_TEXT),
+		 "Cygwin will be available to all users of the system.");
+  SetWindowText (GetDlgItem (h, IDC_JUSTME_TEXT),
+		 "Cygwin will still be available to all users, but "
+		 "Desktop Icons, Cygwin Menu Entries, and important "
+		 "Installer information are only available to the current "
+		 "user.  Only select this if you lack Administrator "
+		 "privileges or if you have specific needs.");
+
+  ShowWindow (GetDlgItem (h, IDC_MODE_GRP), SW_HIDE);
+  ShowWindow (GetDlgItem (h, IDC_ROOT_BINARY), SW_HIDE);
+  ShowWindow (GetDlgItem (h, IDC_MODE_BIN), SW_HIDE);
+  ShowWindow (GetDlgItem (h, IDC_ROOT_TEXT), SW_HIDE);
+  ShowWindow (GetDlgItem (h, IDC_MODE_TEXT), SW_HIDE);
+  ShowWindow (GetDlgItem (h, IDC_FILEMODES_LINK), SW_HIDE);
 }
 
 static void
 save_dialog (HWND h)
 {
-  root_text = !is_legacy ? IDC_ROOT_BINARY : rbget (h, rb);
+  root_text = IDC_ROOT_BINARY;
   root_scope = rbget (h, su);
   set_root_dir (egetString (h, IDC_ROOT_DIR));
 }
Index: script.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/script.cc,v
retrieving revision 2.39
diff -u -p -r2.39 script.cc
--- script.cc	8 Feb 2013 15:38:50 -0000	2.39
+++ script.cc	4 Mar 2013 11:11:18 -0000
@@ -114,7 +114,7 @@ init_run_script ()
   SetEnvironmentVariable ("TMP", "/tmp");
 
   sh = backslash (cygpath ("/bin/bash.exe"));
-  cmd = IsWindowsNT () ? "cmd.exe" : "command.com";
+  cmd = "cmd.exe";
 }
 
 class OutputLog
Index: win32.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/win32.cc,v
retrieving revision 2.13
diff -u -p -r2.13 win32.cc
--- win32.cc	29 Feb 2012 09:00:39 -0000	2.13
+++ win32.cc	4 Mar 2013 11:11:18 -0000
@@ -36,15 +36,11 @@ NTSecurity::GetPosixPerms (const char *f
   DWORD u_attribute, g_attribute, o_attribute;
   DWORD offset = 0;
 
-  if (is_legacy)
-    return NULL;
-
   /* Initialize out SD */
   if (!InitializeSecurityDescriptor (&out_sd, SECURITY_DESCRIPTOR_REVISION))
     log (LOG_TIMESTAMP) << "InitializeSecurityDescriptor(" << fname
     			<< ") failed: " << GetLastError () << endLog;
-  if (OSMajorVersion () >= 5)
-    out_sd.Control |= SE_DACL_PROTECTED;
+  out_sd.Control |= SE_DACL_PROTECTED;
 
   /* Initialize ACL and fill with almost POSIX-like permissions.
      Note that the current user always requires write permissions, otherwise
Index: win32.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/win32.h,v
retrieving revision 2.28
diff -u -p -r2.28 win32.h
--- win32.h	4 Sep 2012 13:55:17 -0000	2.28
+++ win32.h	4 Mar 2013 11:11:18 -0000
@@ -164,7 +164,6 @@ class VersionInfo
 {
   public:
      VersionInfo ();
-     bool isNT () { return (v.dwPlatformId == VER_PLATFORM_WIN32_NT); }
      DWORD major () const { return v.dwMajorVersion; }
      DWORD minor () const { return v.dwMinorVersion; }
   private:
@@ -173,7 +172,6 @@ class VersionInfo
 
 VersionInfo& GetVer ();
 
-#define IsWindowsNT() (GetVer ().isNT ())
 #define OSMajorVersion() (GetVer ().major ())
 #define OSMinorVersion() (GetVer ().minor ())
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]