Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/gen/popen.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/gen/popen.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.12 retrieving revision 1.14 diff -u -p -r1.12 -r1.14 --- src/lib/libc/gen/popen.c 1996/06/29 00:51:49 1.12 +++ src/lib/libc/gen/popen.c 1997/07/21 14:07:23 1.14 @@ -1,4 +1,4 @@ -/* $NetBSD: popen.c,v 1.12 1996/06/29 00:51:49 jtc Exp $ */ +/* $NetBSD: popen.c,v 1.14 1997/07/21 14:07:23 jtc Exp $ */ /* * Copyright (c) 1988, 1993 @@ -36,14 +36,16 @@ * SUCH DAMAGE. */ +#include #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)popen.c 8.1 (Berkeley) 6/4/93"; #else -static char rcsid[] = "$NetBSD: popen.c,v 1.12 1996/06/29 00:51:49 jtc Exp $"; +__RCSID("$NetBSD: popen.c,v 1.14 1997/07/21 14:07:23 jtc Exp $"); #endif #endif /* LIBC_SCCS and not lint */ +#include "namespace.h" #include #include @@ -55,6 +57,11 @@ static char rcsid[] = "$NetBSD: popen.c, #include #include +#ifdef __weak_alias +__weak_alias(popen,_popen); +__weak_alias(pclose,_pclose); +#endif + static struct pid { struct pid *next; FILE *fp; @@ -69,8 +76,11 @@ popen(program, type) struct pid *cur; FILE *iop; int pdes[2], pid; +#ifdef __GNUC__ + (void) &cur; +#endif - if (*type != 'r' && *type != 'w' || type[1]) { + if ((*type != 'r' && *type != 'w') || type[1]) { errno = EINVAL; return (NULL); }