aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-11-24 18:50:32 -0800
committerUlrich Drepper <drepper@redhat.com>2009-11-24 18:50:32 -0800
commitaa9890239a2aef81e64f3f22a31c7e01b6501f69 (patch)
tree9f11b2e9d90685e5c9b15a69e7ffefd259e4777e /include
parent0f622686af3ae5a8f03dae886b08c260b38bda16 (diff)
downloadglibc-aa9890239a2aef81e64f3f22a31c7e01b6501f69.zip
glibc-aa9890239a2aef81e64f3f22a31c7e01b6501f69.tar.gz
glibc-aa9890239a2aef81e64f3f22a31c7e01b6501f69.tar.bz2
Optimize grantpt.
grantpt was performing two consecutive calls to stat with the same file name. Avoid this by creating a special version of the ptsname function which allows to pass the stat result back to the caller.
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index d90e6ff..f540bece 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -9,6 +9,7 @@
/* Now define the internal interfaces. */
#ifndef __Need_M_And_C
+# include <sys/stat.h>
__BEGIN_DECLS
@@ -77,6 +78,8 @@ extern int __clearenv (void);
extern char *__canonicalize_file_name (__const char *__name);
extern char *__realpath (__const char *__name, char *__resolved);
extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
+extern int __ptsname_internal (int fd, char *buf, size_t buflen,
+ struct stat64 *stp);
extern int __getpt (void);
extern int __posix_openpt (int __oflag);