summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in1
-rw-r--r--extra/Configs/Config.in9
-rw-r--r--libc/misc/gnu/Makefile.in3
-rw-r--r--test/malloc/Makefile.in4
4 files changed, 15 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index da865dbeb..706c0a204 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index e1120ac28..374d77241 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -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
diff --git a/libc/misc/gnu/Makefile.in b/libc/misc/gnu/Makefile.in
index 429b471e1..d820746ed 100644
--- a/libc/misc/gnu/Makefile.in
+++ b/libc/misc/gnu/Makefile.in
@@ -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
diff --git a/test/malloc/Makefile.in b/test/malloc/Makefile.in
index d14617d31..669ef6adf 100644
--- a/test/malloc/Makefile.in
+++ b/test/malloc/Makefile.in
@@ -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