mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-01 12:00:35 +08:00
* cygcheck.cc (pathlike::check_existence): Remove class name from declaration.
(display_internet_error): Use proper format specifier for DWORD. (environ): Remove unneeded declaration. (main): Use brace around nested if to avoid an overly-helpful compiler warning. * dump_setup.cc (parse_filename): Reorganize nested if to avoid an overly-helpful compiler warning. * path.cc (GUID_shortcut): Use braces around part of initializer which needs them. (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler warning. (struct opt): Make static. * ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler warning. * regtool.cc: Make some anonymous structs static to avoid a compiler warning. * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential uninitialized use. * strace.cc (add_child): Use proper format specifier for DWORD. (remove_child): Ditto. (proc_child): Ditto.
This commit is contained in:
parent
175742d8c8
commit
a35d9f1a67
@ -1,3 +1,28 @@
|
|||||||
|
2008-09-12 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* cygcheck.cc (pathlike::check_existence): Remove class name from
|
||||||
|
declaration.
|
||||||
|
(display_internet_error): Use proper format specifier for DWORD.
|
||||||
|
(environ): Remove unneeded declaration.
|
||||||
|
(main): Use brace around nested if to avoid an overly-helpful compiler
|
||||||
|
warning.
|
||||||
|
* dump_setup.cc (parse_filename): Reorganize nested if to avoid an
|
||||||
|
overly-helpful compiler warning.
|
||||||
|
* path.cc (GUID_shortcut): Use braces around part of initializer which
|
||||||
|
needs them.
|
||||||
|
(conv_fstab_spaces): Parenthesize assignment in while loop to avoid a
|
||||||
|
compiler warning.
|
||||||
|
(struct opt): Make static.
|
||||||
|
* ps.cc (main): Reorganize nested if to avoid an overly-helpful
|
||||||
|
compiler warning.
|
||||||
|
* regtool.cc: Make some anonymous structs static to avoid a compiler
|
||||||
|
warning.
|
||||||
|
* ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential
|
||||||
|
uninitialized use.
|
||||||
|
* strace.cc (add_child): Use proper format specifier for DWORD.
|
||||||
|
(remove_child): Ditto.
|
||||||
|
(proc_child): Ditto.
|
||||||
|
|
||||||
2008-08-27 Christopher Faylor <me+cygwin@cgf.cx>
|
2008-08-27 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* cygcheck.cc (nuke): Use malloc rather than alloca for environment
|
* cygcheck.cc (nuke): Use malloc rather than alloca for environment
|
||||||
|
@ -124,9 +124,9 @@ struct pathlike
|
|||||||
{
|
{
|
||||||
char *dir;
|
char *dir;
|
||||||
bool issys;
|
bool issys;
|
||||||
void pathlike::check_existence (const char *fn, int showall, int verbose,
|
void check_existence (const char *fn, int showall, int verbose,
|
||||||
char* first, const char *ext1 = "",
|
char* first, const char *ext1 = "",
|
||||||
const char *ext2 = "");
|
const char *ext2 = "");
|
||||||
};
|
};
|
||||||
|
|
||||||
pathlike *paths;
|
pathlike *paths;
|
||||||
@ -201,7 +201,7 @@ display_internet_error (const char *message, ...)
|
|||||||
sizeof (err_buf), NULL) == 0)
|
sizeof (err_buf), NULL) == 0)
|
||||||
strcpy (err_buf, "(Unknown error)");
|
strcpy (err_buf, "(Unknown error)");
|
||||||
|
|
||||||
fprintf (stderr, "cygcheck: %s: %s (win32 error %d)\n", message,
|
fprintf (stderr, "cygcheck: %s: %s (win32 error %lu)\n", message,
|
||||||
err_buf, err);
|
err_buf, err);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -901,9 +901,6 @@ cygcheck (const char *app)
|
|||||||
return track_down (papp, ".exe", 0);
|
return track_down (papp, ".exe", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
struct RegInfo
|
struct RegInfo
|
||||||
{
|
{
|
||||||
RegInfo *prev;
|
RegInfo *prev;
|
||||||
@ -2115,11 +2112,13 @@ main (int argc, char **argv)
|
|||||||
if (posixly == NULL)
|
if (posixly == NULL)
|
||||||
putenv ("POSIXLY_CORRECT=");
|
putenv ("POSIXLY_CORRECT=");
|
||||||
|
|
||||||
if (argc == 0 && !sysinfo && !keycheck && !check_setup && !list_package)
|
if ((argc == 0) && !sysinfo && !keycheck && !check_setup && !list_package)
|
||||||
if (givehelp)
|
{
|
||||||
usage (stdout, 0);
|
if (givehelp)
|
||||||
else
|
usage (stdout, 0);
|
||||||
usage (stderr, 1);
|
else
|
||||||
|
usage (stderr, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if ((check_setup || sysinfo || find_package || list_package || grep_packages)
|
if ((check_setup || sysinfo || find_package || list_package || grep_packages)
|
||||||
&& keycheck)
|
&& keycheck)
|
||||||
|
@ -91,24 +91,25 @@ parse_filename (const char *in_fn, fileparse& f)
|
|||||||
f.pkg[0] = f.what[0] = '\0';
|
f.pkg[0] = f.what[0] = '\0';
|
||||||
p = base (fn);
|
p = base (fn);
|
||||||
for (ver = p; *ver; ver++)
|
for (ver = p; *ver; ver++)
|
||||||
if (*ver == '-')
|
if (*ver != '-')
|
||||||
if (isdigit (ver[1]))
|
continue;
|
||||||
{
|
else if (isdigit (ver[1]))
|
||||||
*ver++ = '\0';
|
{
|
||||||
strcpy (f.pkg, p);
|
*ver++ = '\0';
|
||||||
break;
|
strcpy (f.pkg, p);
|
||||||
}
|
break;
|
||||||
else if (strcasecmp (ver, "-src") == 0 ||
|
}
|
||||||
strcasecmp (ver, "-patch") == 0)
|
else if (strcasecmp (ver, "-src") == 0 ||
|
||||||
{
|
strcasecmp (ver, "-patch") == 0)
|
||||||
*ver++ = '\0';
|
{
|
||||||
strcpy (f.pkg, p);
|
*ver++ = '\0';
|
||||||
strcpy (f.what, strlwr (ver));
|
strcpy (f.pkg, p);
|
||||||
strcpy (f.pkgtar, p);
|
strcpy (f.what, strlwr (ver));
|
||||||
strcat (f.pkgtar, f.tail);
|
strcpy (f.pkgtar, p);
|
||||||
ver = strchr (ver, '\0');
|
strcat (f.pkgtar, f.tail);
|
||||||
break;
|
ver = strchr (ver, '\0');
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!f.pkg[0])
|
if (!f.pkg[0])
|
||||||
strcpy (f.pkg, p);
|
strcpy (f.pkg, p);
|
||||||
|
@ -35,8 +35,8 @@ details. */
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
static const GUID GUID_shortcut
|
static const GUID GUID_shortcut =
|
||||||
= { 0x00021401L, 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46 };
|
{0x00021401L, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
WSH_FLAG_IDLIST = 0x01, /* Contains an ITEMIDLIST. */
|
WSH_FLAG_IDLIST = 0x01, /* Contains an ITEMIDLIST. */
|
||||||
@ -276,7 +276,7 @@ inline char *
|
|||||||
conv_fstab_spaces (char *field)
|
conv_fstab_spaces (char *field)
|
||||||
{
|
{
|
||||||
register char *sp = field;
|
register char *sp = field;
|
||||||
while (sp = strstr (sp, "\\040"))
|
while ((sp = strstr (sp, "\\040")) != NULL)
|
||||||
{
|
{
|
||||||
*sp++ = ' ';
|
*sp++ = ' ';
|
||||||
memmove (sp, sp + 3, strlen (sp + 3) + 1);
|
memmove (sp, sp + 3, strlen (sp + 3) + 1);
|
||||||
@ -284,7 +284,7 @@ conv_fstab_spaces (char *field)
|
|||||||
return field;
|
return field;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct opt
|
static struct opt
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned val;
|
unsigned val;
|
||||||
@ -503,7 +503,7 @@ from_fstab (bool user, PWCHAR path, PWCHAR path_end)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
static int
|
||||||
mnt_sort (const void *a, const void *b)
|
mnt_sort (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const mnt_t *ma = (const mnt_t *) a;
|
const mnt_t *ma = (const mnt_t *) a;
|
||||||
|
@ -344,14 +344,15 @@ main (int argc, char *argv[])
|
|||||||
if ((proc_id > 0) && (p->pid != proc_id))
|
if ((proc_id > 0) && (p->pid != proc_id))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!aflag)
|
if (aflag)
|
||||||
if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT)
|
/* nothing to do */;
|
||||||
{
|
else if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT)
|
||||||
if (p->uid32 != (__uid32_t) uid)
|
{
|
||||||
continue;
|
if (p->uid32 != (__uid32_t) uid)
|
||||||
}
|
continue;
|
||||||
else if (p->uid != uid)
|
}
|
||||||
continue;
|
else if (p->uid != uid)
|
||||||
|
continue;
|
||||||
char status = ' ';
|
char status = ' ';
|
||||||
if (p->process_state & PID_STOPPED)
|
if (p->process_state & PID_STOPPED)
|
||||||
status = 'S';
|
status = 'S';
|
||||||
|
@ -202,7 +202,7 @@ Fail (DWORD rv)
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct
|
static struct
|
||||||
{
|
{
|
||||||
const char *string;
|
const char *string;
|
||||||
HKEY key;
|
HKEY key;
|
||||||
@ -865,8 +865,7 @@ cmd_save ()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct
|
||||||
struct
|
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*func) ();
|
int (*func) ();
|
||||||
|
@ -161,10 +161,12 @@ static HANDLE
|
|||||||
lookup_thread_id (DWORD threadId, int *tix)
|
lookup_thread_id (DWORD threadId, int *tix)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
*tix = 0;
|
||||||
for (i=0; i<num_active_threads; i++)
|
for (i=0; i<num_active_threads; i++)
|
||||||
if (active_thread_ids[i] == threadId)
|
if (active_thread_ids[i] == threadId)
|
||||||
{
|
{
|
||||||
if (tix) *tix = i;
|
if (tix)
|
||||||
|
*tix = i;
|
||||||
return active_threads[i];
|
return active_threads[i];
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -131,7 +131,7 @@ add_child (DWORD id, HANDLE hproc)
|
|||||||
lasth = children.next->hproc = hproc;
|
lasth = children.next->hproc = hproc;
|
||||||
processes++;
|
processes++;
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
fprintf (stderr, "Windows process %d attached\n", id);
|
fprintf (stderr, "Windows process %lu attached\n", id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ remove_child (DWORD id)
|
|||||||
c->next = c1->next;
|
c->next = c1->next;
|
||||||
free (c1);
|
free (c1);
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
fprintf (stderr, "Windows process %d detached\n", id);
|
fprintf (stderr, "Windows process %lu detached\n", id);
|
||||||
processes--;
|
processes--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -650,7 +650,7 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid)
|
|||||||
{
|
{
|
||||||
status = DBG_EXCEPTION_NOT_HANDLED;
|
status = DBG_EXCEPTION_NOT_HANDLED;
|
||||||
if (ev.u.Exception.dwFirstChance)
|
if (ev.u.Exception.dwFirstChance)
|
||||||
fprintf (ofile, "--- Process %u, exception %p at %p\n", ev.dwProcessId,
|
fprintf (ofile, "--- Process %lu, exception %p at %p\n", ev.dwProcessId,
|
||||||
ev.u.Exception.ExceptionRecord.ExceptionCode,
|
ev.u.Exception.ExceptionRecord.ExceptionCode,
|
||||||
ev.u.Exception.ExceptionRecord.ExceptionAddress);
|
ev.u.Exception.ExceptionRecord.ExceptionAddress);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user