* sysdeps/unix/bsd/bsd4.4/revoke.S: New file.

* sysdeps/stub/revoke.c: New file.
	* misc/Makefile (routines): Add revoke.
	* posix/unistd.h [__USE_BSD] (revoke): Declare it.
	* sysdeps/generic/pty.c (openpty, forkpty): Declare return types.
	(forkpty): Declare login_tty.
	* misc/logwtmp.c (logwtmp): Declare to return void.
	* misc/login_tty.c (login_tty): Include unistd.h.  Declare return type.
This commit is contained in:
Roland McGrath 1995-03-27 10:24:00 +00:00
parent 1474b80f01
commit 342414a6e0
8 changed files with 77 additions and 3 deletions

View File

@ -1,5 +1,14 @@
Mon Mar 27 02:23:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> Mon Mar 27 02:23:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/unix/bsd/bsd4.4/revoke.S: New file.
* sysdeps/stub/revoke.c: New file.
* misc/Makefile (routines): Add revoke.
* posix/unistd.h [__USE_BSD] (revoke): Declare it.
* sysdeps/generic/pty.c (openpty, forkpty): Declare return types.
(forkpty): Declare login_tty.
* misc/logwtmp.c (logwtmp): Declare to return void.
* misc/login_tty.c (login_tty): Include unistd.h. Declare return type.
* posix/unistd.h [__USE_BSD] (ttyslot): Declare it. * posix/unistd.h [__USE_BSD] (ttyslot): Declare it.
* posix/unistd.h [__USE_BSD] (L_SET, L_INCR, L_XTND): Define * posix/unistd.h [__USE_BSD] (L_SET, L_INCR, L_XTND): Define

7
NEWS
View File

@ -1,4 +1,4 @@
GNU C Library NEWS -- history of user-visible changes. 21 March 1995 GNU C Library NEWS -- history of user-visible changes. 27 March 1995
Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
See the end for copying conditions. See the end for copying conditions.
@ -98,6 +98,11 @@ Version 1.10
* The new functions `ecvt', `fcvt', and `gcvt' provide an obsolete interface * The new functions `ecvt', `fcvt', and `gcvt' provide an obsolete interface
for formatting floating-point numbers. They are provided only for for formatting floating-point numbers. They are provided only for
compatibility; new programs should use `sprintf' instead. compatibility; new programs should use `sprintf' instead.
* The new auxiliary library `-lutil' from 4.4 BSD contains various
functions for maintaining the login-record files (primarily of use to
system programs such as `login'), and convenient functions for
allocating and initializing a pseudo-terminal (pty) device.
Version 1.09 Version 1.09

View File

@ -37,8 +37,8 @@ routines := brk sbrk sstk ioctl \
select \ select \
acct chroot fsync sync reboot \ acct chroot fsync sync reboot \
gethostid sethostid \ gethostid sethostid \
mknod \ revoke vhangup mknod \
swapon vhangup mktemp mkstemp \ swapon mktemp mkstemp \
ualarm usleep \ ualarm usleep \
gtty stty \ gtty stty \
ptrace \ ptrace \

View File

@ -43,6 +43,7 @@ static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93";
#include <unistd.h> #include <unistd.h>
#include <utmp.h> #include <utmp.h>
void
logwtmp(line, name, host) logwtmp(line, name, host)
char *line, *name, *host; char *line, *name, *host;
{ {

View File

@ -559,6 +559,9 @@ extern int sync __P ((void));
group of the control terminal. */ group of the control terminal. */
extern int vhangup __P ((void)); extern int vhangup __P ((void));
/* Revoke the access of all descriptors currently open on FILE. */
extern int revoke __P ((const char *__file));
/* Turn accounting on if NAME is an existing file. The system will then write /* Turn accounting on if NAME is an existing file. The system will then write
a record for each process as it terminates, to this file. If NAME is NULL, a record for each process as it terminates, to this file. If NAME is NULL,

View File

@ -47,6 +47,7 @@ static char sccsid[] = "@(#)pty.c 8.1 (Berkeley) 6/4/93";
#include <string.h> #include <string.h>
#include <grp.h> #include <grp.h>
int
openpty(amaster, aslave, name, termp, winp) openpty(amaster, aslave, name, termp, winp)
int *amaster, *aslave; int *amaster, *aslave;
char *name; char *name;
@ -97,12 +98,14 @@ openpty(amaster, aslave, name, termp, winp)
return (-1); return (-1);
} }
int
forkpty(amaster, name, termp, winp) forkpty(amaster, name, termp, winp)
int *amaster; int *amaster;
char *name; char *name;
struct termios *termp; struct termios *termp;
struct winsize *winp; struct winsize *winp;
{ {
extern int login_tty();
int master, slave, pid; int master, slave, pid;
if (openpty(&master, &slave, name, termp, winp) == -1) if (openpty(&master, &slave, name, termp, winp) == -1)

30
sysdeps/stub/revoke.c Normal file
View File

@ -0,0 +1,30 @@
/* Revoke the access of all descriptors currently open on a file.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <unistd.h>
#include <errno.h>
int
revoke (file)
const char *file;
{
errno = ENOSYS;
return -1;
}
stub_warning (revoke)

View File

@ -0,0 +1,23 @@
/* Revoke the access of all descriptors currently open on a file.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL (revoke, 1)
ret