about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-20 23:46:03 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-20 23:46:03 -0400
commit34a9094f49241ebb72084c536cf468fd51ebe3ec (patch)
treed4d2e265abe097dfdee3c25aeb877ba001fba035 /include
parent78e64fdcaa44277fcab6ec60aa2d9b8b7742cf58 (diff)
downloadglibc-34a9094f49241ebb72084c536cf468fd51ebe3ec.tar.gz
glibc-34a9094f49241ebb72084c536cf468fd51ebe3ec.tar.xz
glibc-34a9094f49241ebb72084c536cf468fd51ebe3ec.zip
Don't unconditionally use alloca in gaih_inet
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 b99c3d152b..83504135f4 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