summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-02-04 22:36:03 +0000
committerJakub Jelinek <jakub@redhat.com>2009-02-04 22:36:03 +0000
commit73c5dd45bc405428148ee740cac61a1279fe57d4 (patch)
tree878555d8c116d7ac9cb716b79e10d240fde946a3 /include
parent23a4b43d6a98912d505458daeced44b22830a773 (diff)
Updated to fedora-glibc-20090204T2135cvs/fedora-glibc-2_9_90-3
Diffstat (limited to 'include')
-rw-r--r--include/alloca.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/alloca.h b/include/alloca.h
index 563d7868bd..9a4b5c7da0 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -46,4 +46,17 @@ extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const));
__alloca (((len) = (newlen)))
#endif
+#if defined stackinfo_get_sp && defined stackinfo_sub_sp
+# define alloca_account(size, avar) \
+ ({ void *old__ = stackinfo_get_sp (); \
+ void *m__ = __alloca (size); \
+ avar += stackinfo_sub_sp (old__); \
+ m__; })
+#else
+# define alloca_account(size, avar) \
+ ({ size_t s__ = (size); \
+ avar += s__; \
+ __alloca (s__); })
+#endif
+
#endif