svn commit: trunk/uClibc: include libc/stdlib

aldot at uclibc.org aldot at uclibc.org
Wed Nov 29 21:04:35 UTC 2006


Author: aldot
Date: 2006-11-29 13:04:35 -0800 (Wed, 29 Nov 2006)
New Revision: 16729

Log:
- gcvt() is marked LEGACY in XSI and mandatory in BSD.
  Also make compilation conditional on float support.


Modified:
   trunk/uClibc/include/stdlib.h
   trunk/uClibc/libc/stdlib/Makefile.in


Changeset:
Modified: trunk/uClibc/include/stdlib.h
===================================================================
--- trunk/uClibc/include/stdlib.h	2006-11-29 20:51:47 UTC (rev 16728)
+++ trunk/uClibc/include/stdlib.h	2006-11-29 21:04:35 UTC (rev 16729)
@@ -693,10 +693,12 @@
 #endif
 
 
-#if defined __USE_SVID || defined __USE_XOPEN_EXTENDED
+#if defined __USE_SVID || defined __USE_XOPEN_EXTENDED || defined __USE_BSD
 /* Convert floating point numbers to strings.  The returned values are
    valid only until another call to the same function.  */
 
+# ifdef __UCLIBC_SUSV3_LEGACY__
+
 #if 0
 /* Convert VALUE to a string with NDIGIT digits and return a pointer to
    this.  Set *DECPT with the position of the decimal character and *SIGN
@@ -716,8 +718,8 @@
    be written to BUF.  */
 extern char *gcvt (double __value, int __ndigit, char *__buf)
      __THROW __nonnull ((3)) __wur;
+# endif /* __UCLIBC_SUSV3_LEGACY__ */
 
-
 # if 0 /*def __USE_MISC*/
 /* Long double versions of above functions.  */
 extern char *qecvt (long double __value, int __ndigit,

Modified: trunk/uClibc/libc/stdlib/Makefile.in
===================================================================
--- trunk/uClibc/libc/stdlib/Makefile.in	2006-11-29 20:51:47 UTC (rev 16728)
+++ trunk/uClibc/libc/stdlib/Makefile.in	2006-11-29 21:04:35 UTC (rev 16729)
@@ -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 \
-	getpt.c ptsname.c grantpt.c unlockpt.c gcvt.c drand48-iter.c jrand48.c \
+	getpt.c ptsname.c grantpt.c unlockpt.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 posix_memalign.c a64l.c l64a.c
@@ -24,7 +24,10 @@
 endif
 ifeq ($(UCLIBC_HAS_FLOATS),y)
 CSRC += drand48.c drand48_r.c erand48.c erand48_r.c
+ifeq ($(UCLIBC_SUSV3_LEGACY),y)
+CSRC += gcvt.c
 endif
+endif
 
 # multi source stdlib.c
 CSRC +=	abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \




More information about the uClibc-cvs mailing list