aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/alloca.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/alloca.h b/include/alloca.h
index b99c3d1..8350413 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -49,15 +49,24 @@ libc_hidden_proto (__libc_alloca_cutoff)
#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__); \
+ ({ void *old__ = stackinfo_get_sp (); \
+ void *m__ = __alloca (size); \
+ avar += stackinfo_sub_sp (old__); \
+ m__; })
+# define extend_alloca_account(buf, len, newlen, avar) \
+ ({ void *old__ = stackinfo_get_sp (); \
+ void *m__ = extend_alloca (buf, len, newlen); \
+ avar += stackinfo_sub_sp (old__); \
m__; })
#else
# define alloca_account(size, avar) \
- ({ size_t s__ = (size); \
- avar += s__; \
+ ({ size_t s__ = (size); \
+ avar += s__; \
__alloca (s__); })
+# define extend_alloca_account(buf, len, newlen, avar) \
+ ({ size_t s__ = (newlen); \
+ avar += s__; \
+ extend_alloca (buf, len, s__); })
#endif
#endif