OSDN Git Service

config: UCLIBC_HAS_OBSTACK to optionally enable obstack support
authorAnthony G. Basile <blueness@gentoo.org>
Thu, 13 Jun 2013 14:54:25 +0000 (10:54 -0400)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 14 Jun 2013 08:43:41 +0000 (10:43 +0200)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Makefile.in
extra/Configs/Config.in
libc/misc/gnu/Makefile.in
test/malloc/Makefile.in

index da865db..706c0a2 100644 (file)
@@ -281,6 +281,7 @@ HEADERS_RM-$(UCLIBC_HAS_THREADS)             += *thread*.h semaphore.h \
        bits/*thread*.h \
        bits/initspin.h
 HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE)      += atomic.h bits/atomic.h
+HEADERS_RM-$(UCLIBC_HAS_OBSTACK)             += obstack.h
 HEADERS_RM-$(UCLIBC_HAS_UTMPX)               += bits/utmpx.h utmpx.h
 HEADERS_RM-$(UCLIBC_HAS_WCHAR)               += wchar.h wctype.h
 HEADERS_RM-$(UCLIBC_HAS_WORDEXP)             += wordexp.h
index e1120ac..374d772 100644 (file)
@@ -648,6 +648,15 @@ config MALLOC_GLIBC_COMPAT
          does not detect glibc style returning-a-valid-pointer-for-malloc(0)
          behavior).  Most people can safely answer N.
 
+config UCLIBC_HAS_OBSTACK
+       bool "Obstack Support (gnu extension)"
+       help
+         When this option is enabled, uClibc will provide support for obstacks.
+         An obstack is a structure in which memory can be dynamically allocated
+         as a 'stack of objects'.  Many programs need this GNU extention and
+         you should say Y if you are using any.  Otherwise, say N to save some
+         space.
+
 config UCLIBC_DYNAMIC_ATEXIT
        bool "Dynamic atexit() Support"
        default y
index 429b471..d820746 100644 (file)
@@ -7,8 +7,7 @@
 
 subdirs += libc/misc/gnu
 
-#XXX: add UCLIBC_HAS_OBSTACK
-CSRC-y := obstack.c
+CSRC-$(UCLIBC_HAS_OBSTACK) := obstack.c
 
 MISC_GNU_DIR := $(top_srcdir)libc/misc/gnu
 MISC_GNU_OUT := $(top_builddir)libc/misc/gnu
index d14617d..669ef6a 100644 (file)
@@ -6,3 +6,7 @@ TESTS_DISABLED := time_malloc
 ifneq ($(UCLIBC_SUSV2_LEGACY),y)
 TESTS_DISABLED += tst-valloc
 endif
+
+ifneq ($(UCLIBC_HAS_OBSTACK),y)
+TESTS_DISABLED += tst-obstack
+endif