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>2001-11-11 09:07:36 +0300
committerChristopher Faylor <me@cgf.cx>2001-11-11 09:07:36 +0300
commitd0d517913c0c66166bd895f0d14b79260eeb69bb (patch)
tree0b421f7bce96f35a9400a1e3558ea891a5d86933 /winsup/utils/cygcheck.cc
parent2fac517df43d7d8de14bd2c7ef4b944ffb507960 (diff)
* dump_setup.cc: New file.
* Makefile.in: Add info for dump_setup.o. * cygcheck.cc (main): Recognize '-c' option for checking setup installed base. * path.cc (cygpath): Read mount table if not loaded.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc28
1 files changed, 21 insertions, 7 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 0f905a956..e9e800204 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -25,6 +25,7 @@ int registry = 0;
int sysinfo = 0;
int givehelp = 0;
int keycheck = 0;
+int check_setup = 0;
#ifdef __GNUC__
typedef long long longlong;
@@ -32,6 +33,8 @@ typedef long long longlong;
typedef __int64 longlong;
#endif
+void dump_setup (int, char **);
+
const char *known_env_vars[] = {
"c_include_path",
"compiler_path",
@@ -1191,6 +1194,7 @@ usage ()
}
struct option longopts[] = {
+ {"check-setup", no_argument, NULL, 'c'},
{"sysinfo", no_argument, NULL, 's'},
{"registry", no_argument, NULL, 'r'},
{"verbose", no_argument, NULL, 'v'},
@@ -1199,7 +1203,7 @@ struct option longopts[] = {
{0, no_argument, NULL, 0}
};
-char opts[] = "srvkh";
+char opts[] = "srvkhc";
int
main (int argc, char **argv)
@@ -1212,6 +1216,9 @@ main (int argc, char **argv)
case 's':
sysinfo = 1;
break;
+ case 'c':
+ check_setup = 1;
+ break;
case 'r':
registry = 1;
break;
@@ -1230,10 +1237,10 @@ main (int argc, char **argv)
argc -= optind;
argv += optind;
- if (argc == 0 && !sysinfo && !keycheck)
+ if (argc == 0 && !sysinfo && !keycheck && !check_setup)
usage ();
- if (sysinfo && keycheck)
+ if ((check_setup || sysinfo) && keycheck)
usage ();
if (keycheck)
@@ -1241,7 +1248,8 @@ main (int argc, char **argv)
init_paths ();
- if (argc >= 1 && givehelp)
+ /* FIXME: Add help for check_setup */
+ if (argc >= 1 && givehelp && !check_setup)
{
if (argc == 1)
{
@@ -1260,11 +1268,17 @@ main (int argc, char **argv)
printf ("\n");
}
- for (i = 0; i < argc; i++)
+ if (check_setup)
{
- cygcheck (argv[i]);
- printf ("\n");
+ dump_setup (verbose, argv);
+ puts ("");
}
+ else
+ for (i = 0; i < argc; i++)
+ {
+ cygcheck (argv[i]);
+ puts ("");
+ }
if (sysinfo)
dump_sysinfo ();