aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-03-24 14:48:15 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-03-24 14:48:15 +0000
commit0f0595abd921e2593f780bec34a0d89e872be6ca (patch)
treee772b16c5ab87d6817ccd3f486f89375b945d46a /winsup/utils
parentb832c4cf214e3932d50de622dead4133845fc47e (diff)
downloadnewlib-0f0595abd921e2593f780bec34a0d89e872be6ca.zip
newlib-0f0595abd921e2593f780bec34a0d89e872be6ca.tar.gz
newlib-0f0595abd921e2593f780bec34a0d89e872be6ca.tar.bz2
* cygcheck.cc (init_paths): Use full path instead of "." for the
current directory. Do not add "." if present in $PATH. (dump_sysinfo): Skip placeholder first value of paths[].
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog6
-rw-r--r--winsup/utils/cygcheck.cc12
2 files changed, 15 insertions, 3 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 599f39d..ad035a3 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-24 Brian Dessent <brian@dessent.net>
+
+ * cygcheck.cc (init_paths): Use full path instead of "." for the
+ current directory. Do not add "." if present in $PATH.
+ (dump_sysinfo): Skip placeholder first value of paths[].
+
2005-03-07 Christopher Faylor <cgf@timesys.com>
* kill.cc (getsig): Rectify bug introduced by 2005-02-26 change. Don't
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index b196296..c8bcff6 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -158,7 +158,12 @@ init_paths ()
{
char tmp[4000], *sl;
add_path ((char *) ".", 1); /* to be replaced later */
- add_path ((char *) ".", 1); /* the current directory */
+
+ if (GetCurrentDirectory (4000, tmp))
+ add_path (tmp, strlen (tmp));
+ else
+ display_error ("init_paths: GetCurrentDirectory()");
+
if (GetSystemDirectory (tmp, 4000))
add_path (tmp, strlen (tmp));
else
@@ -180,7 +185,8 @@ init_paths ()
while (1)
{
for (e = b; *e && *e != ';'; e++);
- add_path (b, e - b);
+ if (strncmp(b, ".", 1) && strncmp(b, ".\\", 2))
+ add_path (b, e - b);
if (!*e)
break;
b = e + 1;
@@ -1237,7 +1243,7 @@ dump_sysinfo ()
if (givehelp)
printf ("Looking for various Cygnus DLLs... (-v gives version info)\n");
int cygwin_dll_count = 0;
- for (i = 0; i < num_paths; i++)
+ for (i = 1; i < num_paths; i++)
{
WIN32_FIND_DATA ffinfo;
sprintf (tmp, "%s/*.*", paths[i]);