Browse Source

- UCLIBC_HAS_GETPT pulls in getpt.
- ptsname_r depends on UCLIBC_HAS_PTY just like ptsname()

Bernhard Reutner-Fischer 16 years ago
parent
commit
8dec9e26aa
2 changed files with 8 additions and 2 deletions
  1. 4 1
      include/stdlib.h
  2. 4 1
      libc/stdlib/Makefile.in

+ 4 - 1
include/stdlib.h

@@ -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 */

+ 4 - 1
libc/stdlib/Makefile.in

@@ -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