Fix linkage of grantpt(3).

Also clean up the implementation of all the pty functions, add tests,
and fix the stub implementations of ttyname(3) and ttyname_r(3).

Bug: https://code.google.com/p/android/issues/detail?id=58888

(cherry picked from commit 4916706cfe)

Change-Id: I5cb7a1c17b156456e4c4818e65f256eb8d045424
This commit is contained in:
Elliott Hughes
2014-07-25 17:24:00 -07:00
parent a09fe118b1
commit 2ea0a58e01
9 changed files with 184 additions and 169 deletions

View File

@@ -170,7 +170,7 @@ extern char *optarg;
extern int optind, opterr, optopt;
extern int isatty(int);
extern char* ttyname(int);
extern char* ttyname(int) __warnattr("ttyname is not thread-safe; use ttyname_r instead");
extern int ttyname_r(int, char*, size_t);
extern int acct(const char* filepath);