summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-01-02 20:18:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-01-02 20:18:34 +0000
commite8b4b962a0edc31ed272e3ddbc58ceadbd5b2d45 (patch)
treecfbc29cdfa0d350b30e997f14f79ea79fa1e6a94 /lib
parentb54c0c644bb20582b30c1ddcf709457c189cd2b4 (diff)
more pid_t use
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/popen.c5
-rw-r--r--lib/libc/net/rcmdsh.c7
-rw-r--r--lib/libc/stdio/mktemp.c5
-rw-r--r--lib/libc/yp/yp_bind.c7
-rw-r--r--lib/libsectok/scio.c8
-rw-r--r--lib/libwrap/shell_cmd.c8
6 files changed, 23 insertions, 17 deletions
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c
index 7f47a5bb967..aa21ca3e957 100644
--- a/lib/libc/gen/popen.c
+++ b/lib/libc/gen/popen.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: popen.c,v 1.10 2001/07/09 07:04:39 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: popen.c,v 1.11 2002/01/02 20:18:31 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -62,7 +62,8 @@ popen(program, type)
{
struct pid *cur;
FILE *iop;
- int pdes[2], pid;
+ int pdes[2];
+ pid_t pid;
#ifdef __GNUC__
(void)&cur;
diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c
index 93523a4c56c..5ce3ec0fef4 100644
--- a/lib/libc/net/rcmdsh.c
+++ b/lib/libc/net/rcmdsh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcmdsh.c,v 1.5 1998/04/25 16:23:58 millert Exp $ */
+/* $OpenBSD: rcmdsh.c,v 1.6 2002/01/02 20:18:32 deraadt Exp $ */
/*
* This is an rcmd() replacement originally by
@@ -6,7 +6,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.5 1998/04/25 16:23:58 millert Exp $";
+static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.6 2002/01/02 20:18:32 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -35,7 +35,8 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog)
char *rshprog;
{
struct hostent *hp;
- int cpid, sp[2];
+ int sp[2];
+ pid_t cpid;
char *p;
struct passwd *pw;
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index a992e24f164..875c3ca2298 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mktemp.c,v 1.13 1998/06/30 23:03:13 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mktemp.c,v 1.14 2002/01/02 20:18:32 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -101,7 +101,8 @@ _gettemp(path, doopen, domkdir, slen)
{
register char *start, *trv, *suffp;
struct stat sbuf;
- int pid, rval;
+ int rval;
+ pid_t pid;
if (doopen && domkdir) {
errno = EINVAL;
diff --git a/lib/libc/yp/yp_bind.c b/lib/libc/yp/yp_bind.c
index c0a84b30e4a..5fc3cb72b0b 100644
--- a/lib/libc/yp/yp_bind.c
+++ b/lib/libc/yp/yp_bind.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: yp_bind.c,v 1.11 2001/06/27 00:58:57 lebel Exp $";
+static char *rcsid = "$OpenBSD: yp_bind.c,v 1.12 2002/01/02 20:18:32 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -59,14 +59,15 @@ _yp_dobind(dom, ypdb)
const char *dom;
struct dom_binding **ypdb;
{
- static int pid = -1;
+ static pid_t pid = -1;
char path[MAXPATHLEN];
struct dom_binding *ysd, *ysd2;
struct ypbind_resp ypbr;
struct timeval tv;
struct sockaddr_in clnt_sin;
struct ypbind_binding *bn;
- int clnt_sock, fd, gpid;
+ int clnt_sock, fd;
+ pid_t gpid;
CLIENT *client;
int new = 0, r;
int count = 0;
diff --git a/lib/libsectok/scio.c b/lib/libsectok/scio.c
index c09037a056e..b9352794752 100644
--- a/lib/libsectok/scio.c
+++ b/lib/libsectok/scio.c
@@ -1,4 +1,4 @@
-/* $Id: scio.c,v 1.10 2001/09/19 22:29:20 rees Exp $ */
+/* $Id: scio.c,v 1.11 2002/01/02 20:18:32 deraadt Exp $ */
/*
copyright 1997
@@ -77,7 +77,8 @@ static char ttynametmpl[] = "/dev/tty%02d";
#endif
static struct {
- int fd, flags, pid;
+ int fd, flags;
+ pid_t pid;
struct termios tio0, tio1;
} sc[4];
@@ -90,7 +91,8 @@ int
todos_scopen(int ttyn, int flags, int *ep)
{
char ttyname[32];
- int fd, i, pid, oflags;
+ int fd, i, oflags;
+ pid_t pid;
#ifdef BYTECOUNT
num_getc = 0;
diff --git a/lib/libwrap/shell_cmd.c b/lib/libwrap/shell_cmd.c
index b371f353616..e5e2dab0dd9 100644
--- a/lib/libwrap/shell_cmd.c
+++ b/lib/libwrap/shell_cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shell_cmd.c,v 1.1 1997/02/26 03:06:57 downsj Exp $ */
+/* $OpenBSD: shell_cmd.c,v 1.2 2002/01/02 20:18:33 deraadt Exp $ */
/*
* shell_cmd() takes a shell command after %<character> substitutions. The
@@ -14,7 +14,7 @@
#if 0
static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
#else
-static char rcsid[] = "$OpenBSD: shell_cmd.c,v 1.1 1997/02/26 03:06:57 downsj Exp $";
+static char rcsid[] = "$OpenBSD: shell_cmd.c,v 1.2 2002/01/02 20:18:33 deraadt Exp $";
#endif
#endif
@@ -43,8 +43,8 @@ static void do_child();
void shell_cmd(command)
char *command;
{
- int child_pid;
- int wait_pid;
+ pid_t child_pid;
+ pid_t wait_pid;
/*
* Most of the work is done within the child process, to minimize the