aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-13 14:57:24 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-13 14:57:24 +0200
commitaa7da73880539713b14d19d6b34c2940c3579fcd (patch)
tree12f7dcdc55cdac0ce7eba2be7944da26ef52342d /findutils
parent7649bd024cbfcc12693ddd5c172cba93497aaed3 (diff)
downloadbusybox-aa7da73880539713b14d19d6b34c2940c3579fcd.tar.gz
add USE_PORTABLE_CODE option and use it in find applet
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'findutils')
-rw-r--r--findutils/find.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/findutils/find.c b/findutils/find.c
index ba8fa0854..76f670942 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -276,7 +276,11 @@ ACTF(inum)
ACTF(exec)
{
int i, rc;
+#if ENABLE_USE_PORTABLE_CODE
+ char **argv = alloca(sizeof(char*) * (ap->exec_argc + 1));
+#else /* gcc 4.3.1 generates smaller code: */
char *argv[ap->exec_argc + 1];
+#endif
for (i = 0; i < ap->exec_argc; i++)
argv[i] = subst(ap->exec_argv[i], ap->subst_count[i], fileName);
argv[i] = NULL; /* terminate the list */