Add grantpt(3).
This commit is contained in:
parent
2563b926ad
commit
46ebbf82d4
3 changed files with 31 additions and 1 deletions
|
@ -528,6 +528,7 @@ stdlib/clearenv.o \
|
|||
stdlib/_Exit.o \
|
||||
stdlib/exit.o \
|
||||
stdlib/getenv.o \
|
||||
stdlib/grantpt.o \
|
||||
stdlib/mkdtemp.o \
|
||||
stdlib/mkdtemps.o \
|
||||
stdlib/mkostemp.o \
|
||||
|
|
|
@ -150,7 +150,6 @@ long a64l(const char* s);
|
|||
double drand48(void);
|
||||
double erand48(unsigned short [3]);
|
||||
int getsubopt(char**, char* const *, char**);
|
||||
int grantpt(int);
|
||||
char* initstate(unsigned, char*, size_t);
|
||||
long jrand48(unsigned short [3]);
|
||||
char* l64a(long);
|
||||
|
@ -170,6 +169,10 @@ void srandom(unsigned);
|
|||
int unlockpt(int);
|
||||
#endif
|
||||
|
||||
#if __USE_SORTIX || __USE_XOPEN
|
||||
int grantpt(int);
|
||||
#endif
|
||||
|
||||
#if __USE_SORTIX || 600 <= __USE_XOPEN
|
||||
int posix_openpt(int);
|
||||
#endif
|
||||
|
|
26
libc/stdlib/grantpt.c
Normal file
26
libc/stdlib/grantpt.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Jonas 'Sortie' Termansen.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* stdlib/grantpt.c
|
||||
* Grant permissions to open the pseudoterminal slave.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int grantpt(int fd)
|
||||
{
|
||||
(void) fd;
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue