[git commit] config: UCLIBC_HAS_OBSTACK to optionally enable obstack support
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jun 14 08:43:41 UTC 2013
commit: http://git.uclibc.org/uClibc/commit/?id=f143f920694cec922ed2ac4082aab223acc413df
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
Signed-off-by: Anthony G. Basile <blueness at gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
Makefile.in | 1 +
extra/Configs/Config.in | 9 +++++++++
libc/misc/gnu/Makefile.in | 3 +--
test/malloc/Makefile.in | 4 ++++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index da865db..706c0a2 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 e1120ac..374d772 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 429b471..d820746 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 d14617d..669ef6a 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
More information about the uClibc-cvs
mailing list