svn commit: trunk/uClibc/libc/stdlib

aldot at uclibc.org aldot at uclibc.org
Sat Jun 7 14:51:43 UTC 2008


Author: aldot
Date: 2008-06-07 07:51:43 -0700 (Sat, 07 Jun 2008)
New Revision: 22260

Log:
- revert incorrect parts of r22257 and 22259
  since posix_openpt lives in getpt.c it has to stay there unconditionally.


Modified:
   trunk/uClibc/libc/stdlib/Makefile.in
   trunk/uClibc/libc/stdlib/bsd_getpt.c
   trunk/uClibc/libc/stdlib/getpt.c


Changeset:
Modified: trunk/uClibc/libc/stdlib/Makefile.in
===================================================================
--- trunk/uClibc/libc/stdlib/Makefile.in	2008-06-07 14:29:19 UTC (rev 22259)
+++ trunk/uClibc/libc/stdlib/Makefile.in	2008-06-07 14:51:43 UTC (rev 22260)
@@ -12,7 +12,7 @@
 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 \
-	drand48-iter.c jrand48.c \
+	getpt.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,9 +22,6 @@
 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

Modified: trunk/uClibc/libc/stdlib/bsd_getpt.c
===================================================================
--- trunk/uClibc/libc/stdlib/bsd_getpt.c	2008-06-07 14:29:19 UTC (rev 22259)
+++ trunk/uClibc/libc/stdlib/bsd_getpt.c	2008-06-07 14:51:43 UTC (rev 22260)
@@ -22,13 +22,13 @@
 #include <string.h>
 #include <unistd.h>
 
+#if defined __USE_BSD
 libc_hidden_proto(open)
 /* Experimentally off - libc_hidden_proto(mempcpy) */
 
 /* Prefix for master pseudo terminal nodes.  */
 #define _PATH_PTY "/dev/pty"
 
-
 /* Letters indicating a series of pseudo terminals.  */
 #ifndef PTYNAME1
 #define PTYNAME1 "pqrsPQRS"
@@ -41,7 +41,6 @@
 #endif
 const char __libc_ptyname2[] attribute_hidden = PTYNAME2;
 
-
 /* Open a master pseudo terminal and return its file descriptor.  */
 int
 __getpt (void)
@@ -76,3 +75,4 @@
   __set_errno (ENOENT);
   return -1;
 }
+#endif /* __USE_BSD */

Modified: trunk/uClibc/libc/stdlib/getpt.c
===================================================================
--- trunk/uClibc/libc/stdlib/getpt.c	2008-06-07 14:29:19 UTC (rev 22259)
+++ trunk/uClibc/libc/stdlib/getpt.c	2008-06-07 14:51:43 UTC (rev 22260)
@@ -45,7 +45,7 @@
 /* Directory containing the UNIX98 pseudo terminals.  */
 #define _PATH_DEVPTS _PATH_DEV "pts"
 
-#if !defined __UNIX98PTY_ONLY__
+#if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
 /* Prototype for function that opens BSD-style master pseudo-terminals.  */
 extern int __bsd_getpt (void) attribute_hidden;
 #endif
@@ -106,6 +106,8 @@
     }
   return -1;
 }
+#undef have_no_dev_ptmx
+#undef devpts_mounted
 
 #if defined __USE_GNU && defined __UCLIBC_HAS_GETPT__
 int




More information about the uClibc-cvs mailing list