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>2000-05-18 22:39:11 +0400
committerChristopher Faylor <me@cgf.cx>2000-05-18 22:39:11 +0400
commite73a56e9827a6d9ea4066b8dd75e7838d440adf1 (patch)
tree3c0fa1151437cd0ced988b84710d8bb3e95e239d /winsup/utils
parent8126b13644bb9f6d854837665a1eb51ad485dbf9 (diff)
* Makefile.in: Eliminate WINSUP_DEPS.
* cygpath.cc: Reorganize includes to accomodate sys/cygwin.h changes. * mkgroup.c: Ditto. * mkpasswd.c: Ditto. * mount.cc: Ditto. Eliminate use of cygwin source specific includes. * ps.cc: Ditto. * cygwin.cc: Eliminate obsolete file.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog10
-rw-r--r--winsup/utils/Makefile.in2
-rw-r--r--winsup/utils/cygpath.cc2
-rw-r--r--winsup/utils/cygwin.cc126
-rw-r--r--winsup/utils/mkgroup.c2
-rw-r--r--winsup/utils/mkpasswd.c2
-rw-r--r--winsup/utils/mount.cc2
-rw-r--r--winsup/utils/ps.cc3
8 files changed, 14 insertions, 135 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index ae48b8197..3db3b7729 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,13 @@
+Thu May 18 14:38:26 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.in: Eliminate WINSUP_DEPS.
+ * cygpath.cc: Reorganize includes to accomodate sys/cygwin.h changes.
+ * mkgroup.c: Ditto.
+ * mkpasswd.c: Ditto.
+ * mount.cc: Ditto. Eliminate use of cygwin source specific includes.
+ * ps.cc: Ditto.
+ * cygwin.cc: Eliminate obsolete file.
+
Wed Apr 26 23:43:25 2000 Christopher Faylor <cgf@cygnus.com>
* mount.cc (main): Add "-X" option to specify a "Cygwin executable".
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index 64309fc0f..98d9b51d4 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -62,8 +62,6 @@ PROGS:=mount$(EXEEXT) umount$(EXEEXT) ps$(EXEEXT) kill$(EXEEXT) \
passwd$(EXEEXT) getfacl$(EXEEXT) setfacl$(EXEEXT) strace$(EXEEXT) \
regtool$(EXEEXT)
-WINSUP_DEPS:=$(cygwin_source)/winsup.h
-
.SUFFIXES:
.NOEXPORT:
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 90843647d..0eab89d33 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -13,11 +13,11 @@ details. */
#include <stdlib.h>
#include <limits.h>
#include <getopt.h>
+#include <windows.h>
#include <io.h>
#include <sys/fcntl.h>
#include <sys/cygwin.h>
#include <ctype.h>
-#include <windows.h>
static char *prog_name;
static char *file_arg;
diff --git a/winsup/utils/cygwin.cc b/winsup/utils/cygwin.cc
deleted file mode 100644
index 1fba787fe..000000000
--- a/winsup/utils/cygwin.cc
+++ /dev/null
@@ -1,126 +0,0 @@
-/* cygwin.cc: general system debugging tool.
-
- Copyright 1996, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* This program is intended to be a general tool for debugging cygwin.
- Possibilities include
- - dumping various internal data structures
- - poking various values into system tables
- - turning on strace'ing for arbitrary tasks
- */
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <windows.h>
-#include "winsup.h"
-
-static char *prog_name;
-
-static void
-usage (FILE *stream, int status)
-{
- fprintf (stream, "\
-Usage: %s \\\n\
- [-s|--strace pid mask]\\\n\
- [-H|--help] [-V|--version]\n\
-",
- prog_name);
- exit (status);
-}
-
-static struct option long_options[] =
-{
- { "version", no_argument, NULL, 'V' },
- { "help", no_argument, NULL, 'H' },
- { "strace", required_argument, NULL, 's' },
- { 0, no_argument, 0, 0 }
-};
-
-struct strace_args
-{
- int pid;
- int mask;
- char *fn;
-};
-
-/* Turn on strace'ing for the indicated pid. */
-
-static void
-set_strace (strace_args *args)
-{
- shared_info *s = cygwin_getshared ();
-
- pinfo *p = s->p[args->pid];
-
- if (!p)
- {
- fprintf (stderr, "%s: process %d not found\n", prog_name, args->pid);
- exit (1);
- }
-
- p->strace_mask = args->mask;
-}
-
-int
-main (int argc, char *argv[])
-{
- int c;
- int seen_flag_p = 0;
- int show_version_p = 0;
- int set_strace_p = 0;
- strace_args strace_args;
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
-
- while ((c = getopt_long (argc, argv, "HVs:", long_options, (int *) 0))
- != EOF)
- {
- seen_flag_p = 1;
-
- switch (c)
- {
- case 'H':
- usage (stdout, 0);
- break;
- case 'V':
- show_version_p = 1;
- break;
- case 's':
- if (optind + 1 > argc)
- usage (stderr, 1);
- strace_args.pid = atoi (optarg);
- if (optind < argc)
- strace_args.mask = atoi (argv[optind++]);
- if (optind < argc)
- strace_args.fn = argv[optind++];
- set_strace_p = 1;
- break;
- default:
- usage (stderr, 1);
- break;
- }
- }
-
- if (show_version_p)
- printf ("CYGWIN version ???\n");
-
- if (!seen_flag_p || optind != argc)
- usage (stderr, 1);
-
- if (set_strace_p)
- set_strace (&strace_args);
-
- return 0;
-}
diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c
index ecf080166..558a31d79 100644
--- a/winsup/utils/mkgroup.c
+++ b/winsup/utils/mkgroup.c
@@ -12,8 +12,8 @@
#include <stdlib.h>
#include <wchar.h>
#include <stdio.h>
-#include <sys/cygwin.h>
#include <windows.h>
+#include <sys/cygwin.h>
#include <lmaccess.h>
#include <lmapibuf.h>
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
index 5b964585e..91c7cb294 100644
--- a/winsup/utils/mkpasswd.c
+++ b/winsup/utils/mkpasswd.c
@@ -12,8 +12,8 @@
#include <stdlib.h>
#include <wchar.h>
#include <stdio.h>
-#include <sys/cygwin.h>
#include <windows.h>
+#include <sys/cygwin.h>
#include <lmaccess.h>
#include <lmapibuf.h>
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
index 86db5339b..4c93ed28f 100644
--- a/winsup/utils/mount.cc
+++ b/winsup/utils/mount.cc
@@ -14,8 +14,6 @@ details. */
#include <mntent.h>
#include <windows.h>
#include <sys/cygwin.h>
-#include "winsup.h"
-#include "external.h"
#ifdef errno
#undef errno
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index 4767a6ae0..cca56ac5f 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -9,14 +9,13 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include <stdio.h>
+#include <windows.h>
#include <time.h>
#include <getopt.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
#include <sys/cygwin.h>
-#include "winsup.h"
-#include "external.h"
static char *
start_time (external_pinfo *child)