diff options
| author | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
| commit | 35d2f5bccb0f3dde600702ebcdb5424d4d50be4a (patch) | |
| tree | 6e0ff0341c69839e268459a199682628bae734ed /findutils | |
| parent | 248a2600a2f4b442101ad568d1994b908bb28d4b (diff) | |
| parent | f2559e5c2b7bd2c5fa0dd8e88d0a931da92a23af (diff) | |
| download | busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.gz busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.bz2 busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.zip | |
Merge branch 'busybox' into merge
Diffstat (limited to 'findutils')
| -rw-r--r-- | findutils/find.c | 4 | ||||
| -rw-r--r-- | findutils/grep.c | 4 | ||||
| -rw-r--r-- | findutils/xargs.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/findutils/find.c b/findutils/find.c index a0d4853de..d71c69782 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
| @@ -342,6 +342,7 @@ | |||
| 342 | 342 | ||
| 343 | #include <fnmatch.h> | 343 | #include <fnmatch.h> |
| 344 | #include "libbb.h" | 344 | #include "libbb.h" |
| 345 | #include "common_bufsiz.h" | ||
| 345 | #if ENABLE_FEATURE_FIND_REGEX | 346 | #if ENABLE_FEATURE_FIND_REGEX |
| 346 | # include "xregex.h" | 347 | # include "xregex.h" |
| 347 | #endif | 348 | #endif |
| @@ -421,8 +422,9 @@ struct globals { | |||
| 421 | recurse_flags_t recurse_flags; | 422 | recurse_flags_t recurse_flags; |
| 422 | IF_FEATURE_FIND_EXEC_PLUS(unsigned max_argv_len;) | 423 | IF_FEATURE_FIND_EXEC_PLUS(unsigned max_argv_len;) |
| 423 | } FIX_ALIASING; | 424 | } FIX_ALIASING; |
| 424 | #define G (*(struct globals*)&bb_common_bufsiz1) | 425 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 425 | #define INIT_G() do { \ | 426 | #define INIT_G() do { \ |
| 427 | setup_common_bufsiz(); \ | ||
| 426 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 428 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
| 427 | /* we have to zero it out because of NOEXEC */ \ | 429 | /* we have to zero it out because of NOEXEC */ \ |
| 428 | memset(&G, 0, sizeof(G)); \ | 430 | memset(&G, 0, sizeof(G)); \ |
diff --git a/findutils/grep.c b/findutils/grep.c index 5ed3faab2..e956abbb8 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
| @@ -58,6 +58,7 @@ | |||
| 58 | //config: Print the specified number of context lines (-C). | 58 | //config: Print the specified number of context lines (-C). |
| 59 | 59 | ||
| 60 | #include "libbb.h" | 60 | #include "libbb.h" |
| 61 | #include "common_bufsiz.h" | ||
| 61 | #include "xregex.h" | 62 | #include "xregex.h" |
| 62 | 63 | ||
| 63 | 64 | ||
| @@ -209,8 +210,9 @@ struct globals { | |||
| 209 | llist_t *pattern_head; /* growable list of patterns to match */ | 210 | llist_t *pattern_head; /* growable list of patterns to match */ |
| 210 | const char *cur_file; /* the current file we are reading */ | 211 | const char *cur_file; /* the current file we are reading */ |
| 211 | } FIX_ALIASING; | 212 | } FIX_ALIASING; |
| 212 | #define G (*(struct globals*)&bb_common_bufsiz1) | 213 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 213 | #define INIT_G() do { \ | 214 | #define INIT_G() do { \ |
| 215 | setup_common_bufsiz(); \ | ||
| 214 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 216 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
| 215 | } while (0) | 217 | } while (0) |
| 216 | #define max_matches (G.max_matches ) | 218 | #define max_matches (G.max_matches ) |
diff --git a/findutils/xargs.c b/findutils/xargs.c index 8b7ab7b6a..eca1185ec 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #include <conio.h> | 69 | #include <conio.h> |
| 70 | #endif | 70 | #endif |
| 71 | #include "libbb.h" | 71 | #include "libbb.h" |
| 72 | #include "common_bufsiz.h" | ||
| 72 | 73 | ||
| 73 | /* This is a NOEXEC applet. Be very careful! */ | 74 | /* This is a NOEXEC applet. Be very careful! */ |
| 74 | 75 | ||
| @@ -103,8 +104,9 @@ struct globals { | |||
| 103 | const char *eof_str; | 104 | const char *eof_str; |
| 104 | int idx; | 105 | int idx; |
| 105 | } FIX_ALIASING; | 106 | } FIX_ALIASING; |
| 106 | #define G (*(struct globals*)&bb_common_bufsiz1) | 107 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 107 | #define INIT_G() do { \ | 108 | #define INIT_G() do { \ |
| 109 | setup_common_bufsiz(); \ | ||
| 108 | G.eof_str = NULL; /* need to clear by hand because we are NOEXEC applet */ \ | 110 | G.eof_str = NULL; /* need to clear by hand because we are NOEXEC applet */ \ |
| 109 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.repl_str = "{}";) \ | 111 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.repl_str = "{}";) \ |
| 110 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.eol_ch = '\n';) \ | 112 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.eol_ch = '\n';) \ |
