OSDN Git Service

- UCLIBC_HAS_GETPT pulls in getpt.
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 7 Jun 2008 13:55:32 +0000 (13:55 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 7 Jun 2008 13:55:32 +0000 (13:55 -0000)
- ptsname_r depends on UCLIBC_HAS_PTY just like ptsname()

include/stdlib.h
libc/stdlib/Makefile.in

index 0b44474..b5ab9c9 100644 (file)
@@ -835,14 +835,17 @@ extern char *ptsname (int __fd) __THROW __wur;
 #endif
 
 #ifdef __USE_GNU
+# if defined __UCLIBC_HAS_PTY__
 /* Store at most BUFLEN characters of the pathname of the slave pseudo
    terminal associated with the master FD is open on in BUF.
    Return 0 on success, otherwise an error number.  */
 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
      __THROW __nonnull ((2));
-
+# endif
+# if defined __UCLIBC_HAS_GETPT__
 /* Open a master pseudo terminal and return its file descriptor.  */
 extern int getpt (void);
+# endif
 #endif
 
 #if 0 /* def __USE_BSD */
index dfef6d1..2f62836 100644 (file)
@@ -12,7 +12,7 @@ include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
 CSRC := \
        abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c \
        rand.c random.c random_r.c setenv.c system.c div.c ldiv.c lldiv.c \
-       getpt.c drand48-iter.c jrand48.c \
+       drand48-iter.c jrand48.c \
        jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
        nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
        valloc.c a64l.c l64a.c __uc_malloc.c
@@ -22,6 +22,9 @@ endif
 ifeq ($(UCLIBC_HAS_PTY),y)
 CSRC += grantpt.c unlockpt.c ptsname.c
 endif
+ifeq ($(UCLIBC_HAS_GETPT),y)
+CSRC += getpt.c
+endif
 ifeq ($(UCLIBC_HAS_ARC4RANDOM),y)
 CSRC += arc4random.c
 endif