svn commit: [26152] trunk/busybox/shell
vapier at busybox.net
vapier at busybox.net
Sat Apr 18 21:04:26 UTC 2009
Author: vapier
Date: 2009-04-18 21:04:25 +0000 (Sat, 18 Apr 2009)
New Revision: 26152
Log:
fix build errors when function support is turned off
Modified:
trunk/busybox/shell/hush.c
Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c 2009-04-18 14:13:53 UTC (rev 26151)
+++ trunk/busybox/shell/hush.c 2009-04-18 21:04:25 UTC (rev 26152)
@@ -2901,13 +2901,17 @@
static int run_function(const struct function *funcp, char **argv)
{
int rc;
+ save_arg_t sv;
+#if ENABLE_HUSH_FUNCTIONS
smallint sv_flg;
- save_arg_t sv;
+#endif
save_and_replace_G_args(&sv, argv);
+#if ENABLE_HUSH_FUNCTIONS
/* "we are in function, ok to use return" */
sv_flg = G.flag_return_in_progress;
G.flag_return_in_progress = -1;
+#endif
/* On MMU, funcp->body is always non-NULL */
#if !BB_MMU
@@ -2921,7 +2925,9 @@
rc = run_list(funcp->body);
}
+#if ENABLE_HUSH_FUNCTIONS
G.flag_return_in_progress = sv_flg;
+#endif
restore_G_args(&sv, argv);
return rc;
@@ -6775,8 +6781,10 @@
static int builtin_source(char **argv)
{
FILE *input;
+ save_arg_t sv;
+#if ENABLE_HUSH_FUNCTIONS
smallint sv_flg;
- save_arg_t sv;
+#endif
if (*++argv == NULL)
return EXIT_FAILURE;
@@ -6789,16 +6797,20 @@
}
close_on_exec_on(fileno(input));
+#if ENABLE_HUSH_FUNCTIONS
sv_flg = G.flag_return_in_progress;
/* "we are inside sourced file, ok to use return" */
G.flag_return_in_progress = -1;
+#endif
save_and_replace_G_args(&sv, argv);
parse_and_run_file(input);
fclose(input);
restore_G_args(&sv, argv);
+#if ENABLE_HUSH_FUNCTIONS
G.flag_return_in_progress = sv_flg;
+#endif
return G.last_exitcode;
}
More information about the busybox-cvs
mailing list