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>2013-07-07 20:57:11 +0400
committerChristopher Faylor <me@cgf.cx>2013-07-07 20:57:11 +0400
commit40f11fc13318958f4a3f3af1fdd8c0c3b284de01 (patch)
treec975b4d0962e2a8de71adfbf1f0c7040cb43b2c0 /winsup/utils/cygcheck.cc
parentb1b497cb2ebca568c41cd885d323c7c0719d4ce4 (diff)
* cygcheck.cc (dll_info): Detect and report on symlinks. Output wrong
architecture message inline with stdout for clarity. * path.cc (is_symlink): Always reset file pointer to beginning on exit. (readlink): Assume that file pointer is set to the beginning.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc23
1 files changed, 17 insertions, 6 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 8c7af0e1c..0447e585a 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -590,11 +590,26 @@ 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)
{
DWORD junk;
int i;
+ if (is_symlink (fh))
+ {
+ if (!verbose)
+ puts ("");
+ else
+ {
+ char buf[PATH_MAX + 1] = "";
+ readlink (fh, buf, sizeof(buf) - 1);
+ printf (" (symlink to %s)\n", buf);
+ }
+ return;
+ }
int pe_header_offset = get_dword (fh, 0x3c);
if (GetLastError () != NO_ERROR)
display_error ("get_dword");
@@ -604,18 +619,14 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse)
#ifdef __x86_64__
if (arch != IMAGE_FILE_MACHINE_AMD64)
{
- fputc ('\n', stderr);
- display_error ("Wrong architecture. Only x86_64 executables supported.",
- false, false);
+ puts (verbose ? " (not x86_64 dll)" : "\n");
return;
}
int base_off = 108;
#else
if (arch != IMAGE_FILE_MACHINE_I386)
{
- fputc ('\n', stderr);
- display_error ("Wrong architecture. Only ix86 executables supported.",
- false, false);
+ puts (verbose ? " (not x86 dll)" : "\n");
return;
}
int base_off = 92;