summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-28 23:56:34 +0000
committerRoland McGrath <roland@gnu.org>2002-05-28 23:56:34 +0000
commit25b39daa9074d851dd75ea87640ffeb7808c61f0 (patch)
treec20c984f230041e76fef4643b451a4dbdf971a49 /utils
parent5cd8d4c8112c82457677bcf7eb92ab2cddad930d (diff)
2002-05-28 Roland McGrath <roland@frob.com>
* pids.c (add_fn_pids): unsigned -> size_t * w.c (add_utmp_procs): Likewise. * login.c (add_canonical_host): Likewise. * ps.c (main): Likewise. * login.c (add_entry, main): Likewise. * settrans.c (main): int -> size_t * showtrans.c (main): Likewise. * fsysopts.c (main): Likewise. * vmstat.c (main): Use int for FWIDTHS. * ping.c (main): size_t -> socklen_t * fakeauth.c (S_auth_getids, S_auth_makeauth, S_auth_server_authenticate): u_int -> size_t * showtrans.c (main): Cast field width/precision args to int.
Diffstat (limited to 'utils')
-rw-r--r--utils/fsysopts.c6
-rw-r--r--utils/login.c24
-rw-r--r--utils/pids.c7
-rw-r--r--utils/ping.c4
-rw-r--r--utils/ps.c4
-rw-r--r--utils/settrans.c2
-rw-r--r--utils/showtrans.c8
-rw-r--r--utils/vmstat.c2
-rw-r--r--utils/w.c4
9 files changed, 30 insertions, 31 deletions
diff --git a/utils/fsysopts.c b/utils/fsysopts.c
index 79e40979..f8b4c03d 100644
--- a/utils/fsysopts.c
+++ b/utils/fsysopts.c
@@ -1,8 +1,8 @@
/* Set options in a running filesystem
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,2002 Free Software Foundation, Inc.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
/* The filesystem options vector, in '\0' separated format. */
char *argz = 0;
- int argz_len = 0;
+ size_t argz_len = 0;
int deref = 0, recursive = 0;
diff --git a/utils/login.c b/utils/login.c
index 275cfe52..edd6be80 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -1,8 +1,8 @@
/* Hurdish login
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2002 Free Software Foundation, Inc.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -210,7 +210,7 @@ add_utmp_entry (char *args, unsigned args_len, int inherit_host)
/* Lookup the host HOST, and add entries for VIA (the host name), and
VIA_ADDR (the dotted decimal address) to ARGS & ARGS_LEN. */
static error_t
-add_canonical_host (char **args, unsigned *args_len, char *host)
+add_canonical_host (char **args, size_t *args_len, char *host)
{
struct hostent *he = gethostbyname (host);
@@ -247,7 +247,7 @@ add_canonical_host (char **args, unsigned *args_len, char *host)
/* Add the `=' separated environment entry ENTRY to ENV & ENV_LEN, exiting
with an error message if we can't. */
static void
-add_entry (char **env, unsigned *env_len, char *entry)
+add_entry (char **env, size_t *env_len, char *entry)
{
char *name = strsep (&entry, "=");
error_t err = envz_add (env, env_len, name, entry);
@@ -377,15 +377,15 @@ main(int argc, char *argv[])
char *path;
error_t err = 0;
char *args = 0; /* The login parameters */
- unsigned args_len = 0;
+ size_t args_len = 0;
char *args_defs = 0; /* Defaults for login parameters. */
- unsigned args_defs_len = 0;
+ size_t args_defs_len = 0;
char *env = 0; /* The new environment. */
- unsigned env_len = 0;
+ size_t env_len = 0;
char *env_defs = 0; /* Defaults for the environment. */
- unsigned env_defs_len = 0;
+ size_t env_defs_len = 0;
char *parent_env = 0; /* The environment we got from our parent */
- unsigned parent_env_len = 0;
+ size_t parent_env_len = 0;
int no_environ = 0; /* If false, use the env as default params. */
int no_args = 0; /* If false, put login params in the env. */
int inherit_environ = 0; /* True if we shouldn't clear our env. */
@@ -394,11 +394,11 @@ main(int argc, char *argv[])
int paranoid = 0; /* Admit no knowledge. */
int retry = 0; /* For some failures, exec a login shell. */
char *retry_args = 0; /* Args passed when retrying. */
- unsigned retry_args_len = 0;
+ size_t retry_args_len = 0;
char *shell = 0; /* The shell program to run. */
char *sh_arg0 = 0; /* The shell's argv[0]. */
char *sh_args = 0; /* The args to the shell. */
- unsigned sh_args_len = 0;
+ size_t sh_args_len = 0;
int shell_arg = 0; /* If there are shell args, use the first as
the shell name. */
struct ugids ugids = UGIDS_INIT; /* Authorization of the new shell. */
@@ -616,7 +616,7 @@ main(int argc, char *argv[])
{
struct passwd *pw;
char *passwd = 0; /* Login parameters from /etc/passwd */
- unsigned passwd_len = 0;
+ size_t passwd_len = 0;
/* Decide which password entry to get parameters from. */
if (ugids.eff_uids.num > 0)
diff --git a/utils/pids.c b/utils/pids.c
index 1f3ae316..44cd0b44 100644
--- a/utils/pids.c
+++ b/utils/pids.c
@@ -1,8 +1,7 @@
/* Pid parsing/frobbing
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Copyright (C) 1997,99,2002 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -46,7 +45,7 @@ proc_server ()
error_t
add_fn_pids (pid_t **pids, size_t *num_pids, unsigned id,
error_t (*pids_fn)(process_t proc, pid_t id,
- pid_t **pids, unsigned *num_pids))
+ pid_t **pids, size_t *num_pids))
{
size_t num_new_pids = 25;
pid_t _new_pids[num_new_pids], *new_pids = _new_pids;
diff --git a/utils/ping.c b/utils/ping.c
index 2f979e2c..2234f44c 100644
--- a/utils/ping.c
+++ b/utils/ping.c
@@ -40,7 +40,7 @@ char copyright[] =
/*
* From: @(#)ping.c 5.9 (Berkeley) 5/12/91
*/
-char rcsid[] = "$Id: ping.c,v 1.3 1998/10/20 09:42:49 roland Exp $";
+char rcsid[] = "$Id: ping.c,v 1.4 2002/05/28 23:56:34 roland Exp $";
char pkg[] = "netkit-base-0.10";
/*
@@ -468,7 +468,7 @@ main(int argc, char *argv[])
for (;;) {
struct sockaddr_in from;
register int cc;
- size_t fromlen;
+ socklen_t fromlen;
if (options & F_FLOOD) {
pinger();
diff --git a/utils/ps.c b/utils/ps.c
index 3dba399e..615852fd 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -1,6 +1,6 @@
/* Show process information.
- Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2002 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
@@ -173,7 +173,7 @@ main(int argc, char *argv[])
char *arg_hack_buf = 0;
struct idvec *only_uids = make_idvec (), *not_uids = make_idvec ();
char *tty_names = 0;
- unsigned num_tty_names = 0;
+ size_t num_tty_names = 0;
struct proc_stat_list *procset;
struct ps_context *context;
const char *fmt_string = "default", *sort_key_name = NULL;
diff --git a/utils/settrans.c b/utils/settrans.c
index e75fe160..d2d30a69 100644
--- a/utils/settrans.c
+++ b/utils/settrans.c
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
/* The translator's arg vector, in '\0' separated format. */
char *argz = 0;
- int argz_len = 0;
+ size_t argz_len = 0;
/* The control port for any active translator we start up. */
fsys_t active_control = MACH_PORT_NULL;
diff --git a/utils/showtrans.c b/utils/showtrans.c
index ab3ad486..aa55f14d 100644
--- a/utils/showtrans.c
+++ b/utils/showtrans.c
@@ -1,6 +1,6 @@
/* Show files' passive translators.
- Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2001,02 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -67,7 +67,7 @@ main (int argc, char *argv[])
else
{
char buf[1024], *trans = buf;
- int trans_len = sizeof (buf);
+ size_t trans_len = sizeof (buf);
error_t err = file_get_translator (node, &trans, &trans_len);
switch (err)
@@ -79,9 +79,9 @@ main (int argc, char *argv[])
if (!silent)
{
if (print_prefix)
- printf ("%s: %.*s\n", name, trans_len, trans);
+ printf ("%s: %.*s\n", name, (int) trans_len, trans);
else
- printf ("%.*s\n", trans_len, trans);
+ printf ("%.*s\n", (int) trans_len, trans);
}
if (trans != buf)
diff --git a/utils/vmstat.c b/utils/vmstat.c
index 4166e269..c674bd4f 100644
--- a/utils/vmstat.c
+++ b/utils/vmstat.c
@@ -490,7 +490,7 @@ main (int argc, char **argv)
do
{
int num;
- size_t fwidths[num_fields];
+ int fwidths[num_fields];
if (first_hdr)
first_hdr = 0;
diff --git a/utils/w.c b/utils/w.c
index ef6403aa..43bce025 100644
--- a/utils/w.c
+++ b/utils/w.c
@@ -1,6 +1,6 @@
/* Hurdish w
- Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2001,02 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
@@ -306,7 +306,7 @@ add_utmp_procs (struct proc_stat_list *procs, struct utmp *u)
else
{
struct proc_stat **pgrp_procs;
- unsigned num_procs;
+ size_t num_procs;
err = proc_stat_list_add_pgrp (procs, -pid, &pgrp_procs, &num_procs);
if (! err)