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>2014-10-21 14:59:40 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-10-21 14:59:40 +0400
commita2085837506765480f73379f21702904a5ca613c (patch)
tree3cc9a54fe55f486fcd5e5bf5afdb6ca6716bb50d /winsup/utils
parentf2ee8ffeb1339166501834b7018c2e2ccc9e43ae (diff)
* cygcheck.cc (CYGLSA64_DLL): Remove unused macro.
(dump_sysinfo): If COMSPEC isn't set in the MSVCRT environment, set it. Explain why.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog6
-rw-r--r--winsup/utils/cygcheck.cc19
2 files changed, 21 insertions, 4 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 9e0e82342..c36bd0c46 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (CYGLSA64_DLL): Remove unused macro.
+ (dump_sysinfo): If COMSPEC isn't set in the MSVCRT environment, set it.
+ Explain why.
+
2014-09-03 Corinna Vinschen <corinna@vinschen.de>
* setfacl.c (addmissing): New function to add missing acl entries to
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 465bc7861..cc400519e 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1,7 +1,7 @@
/* cygcheck.cc
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
+ 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
This file is part of Cygwin.
@@ -587,9 +587,6 @@ cygwin_info (HANDLE h)
return;
}
-/* Special case. Don't complain about this one. */
-#define CYGLSA64_DLL "\\cyglsa64.dll"
-
static void
dll_info (const char *path, HANDLE fh, int lvl, int recurse)
{
@@ -1436,6 +1433,20 @@ dump_sysinfo ()
DWORD obcaseinsensitive = 1;
HKEY key;
+ /* MSVCRT popen (called by pretty_id and dump_sysinfo_services) SEGVs if
+ COMSPEC isn't set correctly. Simply enforce it here. Using
+ Get/SetEnvironmentVariable to set the dir does *not* help, btw.
+ Apparently MSVCRT keeps its own copy of the environment and changing
+ that requires to use _wputenv. */
+ if (!_wgetenv (L"COMSPEC"))
+ {
+ WCHAR comspec[MAX_PATH + 17];
+ wcscpy (comspec, L"COMSPEC=");
+ GetSystemDirectoryW (comspec + 8, MAX_PATH);
+ wcsncat (comspec, L"\\cmd.exe", sizeof comspec);
+ _wputenv (comspec);
+ }
+
printf ("\nCygwin Configuration Diagnostics\n");
time (&now);
printf ("Current System Time: %s\n", ctime (&now));