aboutsummaryrefslogtreecommitdiff
path: root/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Changes to allow building with MinGW-w64Ron Yorston2015-01-052-0/+7
| |
* | Revert "Use putenv to implement unsetenv/clearenv"Ron Yorston2014-12-181-3/+1
| | | | | | | | This reverts commit fa147bd7ecb086f4fb9a4afea16b946693a822ce.
* | Merge branch 'busybox' into mergeRon Yorston2014-12-142-21/+40
|\| | | | | | | | | | | | | Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
| * libarchive: add capability to unpack to mem.bufferDenys Vlasenko2014-12-072-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance and number of processes for a "depmod -a" with gzipped modules was abysmal. This patch adds a code path without fork, benefiting all users of xmalloc_open_zipped_read_close. "modinfo radeon.ko.gz", a single-file reader, got 30% faster. "depmod -a", which used to fork over 800 times, got 20% faster. Heavily based on a patch by Lauri Kasanen <curaga@operamail.com> function old new delta setup_transformer_on_fd - 159 +159 transformer_write - 122 +122 fork_transformer - 112 +112 xmalloc_open_zipped_read_close 63 118 +55 read_bunzip 1866 1896 +30 xtransformer_write - 19 +19 unzip_main 2449 2462 +13 bbunpack 755 766 +11 unpack_lzma_stream 2717 2723 +6 unpack_xz_stream 2393 2397 +4 unpack_Z_stream 1173 1175 +2 inflate_unzip 111 105 -6 check_signature16 70 63 -7 unpack_bz2_stream 359 349 -10 unpack_unxz 12 - -12 unpack_unlzma 12 - -12 unpack_uncompress 12 - -12 unpack_gunzip 12 - -12 unpack_bunzip2 12 - -12 open_transformer 106 92 -14 inflate_unzip_internal 1945 1916 -29 unpack_gz_stream 693 655 -38 open_zipped 89 47 -42 setup_unzip_on_fd 142 53 -89 ------------------------------------------------------------------------------ (add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295) Total: 238 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rename transformer_aux_data_t -> transformer_state_tDenys Vlasenko2014-12-071-12/+12
| | | | | | | | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use ARG_MAX for bb_arg_max() only if it's 60k+Denys Vlasenko2014-11-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes ARG_MAX is small (like 32k) yet sysconf(_SC_ARG_MAX) is big, and people prefer using the bigger value. OTOH, with sufficiently large ARG_MAX, further wins from sysconf(_SC_ARG_MAX) being bigger are exponentially smaller: you can see 4 times fewer fork+execs when you run find, but when each execed process already takes a thousand parameters it's likely execution time is dominated by what that process does with each parameter. Thus, with this change ARG_MAX is used if it's sufficiently big, otherwise sysconf(_SC_ARG_MAX) is used. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * zcip: Add environment variable for overriding log functionalityMichel Stam2014-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_logenv_override - 70 +70 packed_usage 29969 30033 +64 zcip_main 1426 1431 +5 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 139/0) Total: 139 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Remove declaration of getpagesizeRon Yorston2014-11-291-7/+0
| |
* | Use putenv to implement unsetenv/clearenvRon Yorston2014-11-231-1/+3
| | | | | | | | | | | | | | | | | | | | noexec applets failed on ReactOS 0.3.17. This was because the environment was being manipulated directly using the environ pointer. Implementing unsetenv and clearenv using putenv fixes the problem. WIN32 putenv doesn't allow environment variables to have empty values. This was the case before and it's still the case after this change. Shell variables are fine.
* | Merge branch 'busybox' into mergeRon Yorston2014-10-062-3/+3
|\|
| * less: move "retry-on-EAGAIN" logic closer to read opsDenys Vlasenko2014-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes "G" (goto end of input) command work as well as /search_for_nonexistent_string: both will read to EOF now even from somewhat slow input (such as kernel's "git log"). function old new delta ndelay_on 35 43 +8 ndelay_off 35 43 +8 read_lines 695 691 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-4) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * taskset: support CPU masks for more than 64 CPUsDenys Vlasenko2014-08-171-1/+0
| | | | | | | | | | | | | | function old new delta taskset_main 522 631 +109 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: add optional support for authenticationMorten Kvistgaard2014-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta cmdio_get_cmd_and_arg - 237 +237 get_passwd - 97 +97 check_password - 82 +82 ftpd_main 2297 2178 -119 ask_and_check_password_extended 206 84 -122 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/2 up/down: 416/-241) Total: 175 bytes Signed-off-by: Morten Kvistgaard <MK@pch-engineering.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-06-302-0/+149
|\|
| * Rename INIT_LAST to INIT_FUNC to avoid confusionBartosz Golaszewski2014-06-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | We don't have an INIT_FIRST, so let's rename INIT_LAST to INIT_FUNC to imply that the function is called at program start-up. Also: the priority argument for __attribute__((constructor)) isn't used, so let's remove it. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unit-tests: implement the unit-testing frameworkBartosz Golaszewski2014-06-222-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This set of patches adds a simple unit-testing framework to Busybox unit-tests: add some helper macros for unit-test framework implementation unit-tests: implement the unit-testing framework unit-tests: add basic documentation on writing the unit test cases unit-tests: modify the Makefile 'test' target to run unit-tests too unit-tests: add two example test cases unit-tests: modify the existing strrstr test code to use the unit-test framework Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytesBartosz Golaszewski2014-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_sc_clk_tck - 10 +10 timescmd 118 113 -5 print_route 1763 1758 -5 mpstat_main 1288 1283 -5 iostat_main 1947 1942 -5 INET_setroute 879 871 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: use sysconf(_SC_ARG_MAX) to determine the command-line size limitDenys Vlasenko2014-06-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The find utility uses a hardcoded value of 32 * 1024 as the limit of the command-line length when calling 'find -exec ... {} +'. This results in over 4 times more execve() calls than in coreutils' find. This patch uses the limit defined in system headers. Based on the patch by Bartosz Golaszewski <bartekgola@gmail.com>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Add conditional support for -v / --verboseDenys Vlasenko2014-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FEATURE_VERBOSE off, practically no size change. With it on: function old new delta remove_file 493 556 +63 install_main 719 765 +46 bb_make_directory 383 419 +36 rmdir_main 162 191 +29 copy_file 1516 1544 +28 mv_main 502 525 +23 cmp_main 677 693 +16 bbconfig_config_bz2 5264 5279 +15 mkdir_main 158 168 +10 install_longopts 66 76 +10 rm_main 167 175 +8 nexpr 840 846 +6 scan_tree 275 280 +5 fsck_main 1807 1811 +4 ed_main 2541 2545 +4 expand_one_var 1574 1575 +1 swap_on_off_main 420 418 -2 parse_command 1443 1440 -3 redirect 1279 1274 -5 do_load 946 918 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 16/4 up/down: 304/-38) Total: 266 bytes Based on the patch by Igor Živković. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | MinGW: rename execable -> executableRon Yorston2014-05-061-1/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-05-063-31/+43
|\| | | | | | | | | | | | | Conflicts: debianutils/which.c editors/vi.c libbb/executable.c
| * libbb: rename execable -> executable. No code changesDenys Vlasenko2014-05-021-3/+3
| | | | | | | | | | | | English speakers complained that it sounded awfully broken. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make syslog level for bb_error_msg's configurable. use it in crondDenys Vlasenko2014-04-301-0/+1
| | | | | | | | | | | | | | | | | | function old new delta bb_verror_msg 380 386 +6 syslog_level - 1 +1 crondlog 165 108 -57 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: tweak help text, make course less crypticDenys Vlasenko2014-04-301-1/+0
| | | | | | | | | | | | | | | | | | function old new delta packed_usage 29736 29740 +4 crond_main 1485 1486 +1 load_crontab 712 706 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modprobe-small: fix help messages for aliased module-related appletsDenys Vlasenko2014-04-191-25/+25
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: provide usleep() fallback implementationBernhard Reutner-Fischer2014-04-131-2/+14
| | | | | | | | | | | | | | | | POSIX.1-2008 removed the usleep function, provide a fallback implementaion using the recommended nanosleep(). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Provide fake getpwent_r to reduce changes from upstreamRon Yorston2014-03-231-0/+3
| |
* | ps: exclude more unused codeRon Yorston2014-03-231-0/+4
| |
* | Implement vprintf replacementRon Yorston2014-03-201-0/+2
| |
* | Implement getc replacementRon Yorston2014-03-201-0/+2
| |
* | Implement read replacement to handle OEM codepagesRon Yorston2014-03-201-0/+2
| |
* | Implement write replacement to handle OEM codepagesRon Yorston2014-03-201-0/+2
| |
* | Implement puts replacement to handle OEM codepagesRon Yorston2014-03-191-0/+2
| |
* | Use OEM codepage for console I/ORon Yorston2014-03-191-0/+4
| | | | | | | | | | | | | | | | | | | | Windows console applications use different codepages for console I/O and the rest of the API: http://msdn.microsoft.com/en-us/goglobal/bb688114.aspx#E2F Attempt to workaround this by converting characters when they're read from and written to the console. Not all possible paths are handled.
* | Drop CONFIG_WIN32_NET settingRon Yorston2014-03-171-5/+1
| |
* | Fix some compiler warningsRon Yorston2014-03-131-1/+1
| |
* | Pretend chown succeeds so 'cp -rp' doesn't complainRon Yorston2014-03-131-1/+1
| |
* | Remove unused mingw_utime; update utimes to handle read-only filesRon Yorston2014-03-121-4/+0
| |
* | Import mempcpy from gnulibRon Yorston2014-03-111-0/+5
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-03-111-3/+5
|\|
| * xargs: add support for -I and -i. Closes 493Denys Vlasenko2014-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta process_stdin_with_replace - 195 +195 xmalloc_substitute_string - 145 +145 xargs_main 808 884 +76 count_strstr - 45 +45 packed_usage 29580 29571 -9 parse_params 1445 1416 -29 func_exec 285 138 -147 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 1/3 up/down: 461/-185) Total: 276 bytes text data bss dec hex filename 922156 932 17692 940780 e5aec busybox_old 922440 932 17692 941064 e5c08 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * zcat: complain if input is not compressedDenys Vlasenko2014-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta buffer_fill_and_print 178 191 +13 varvalue 735 743 +8 bbunpack 747 755 +8 open_zipped 85 89 +4 xmalloc_open_zipped_read_close 61 63 +2 get_addr_1 240 242 +2 fbsplash_main 1228 1230 +2 pstree_main 322 321 -1 builtin_type 121 119 -2 do_load 954 926 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | mingw: dummy implementation of times/sysconfRon Yorston2014-01-301-0/+17
| |
* | date: add dummy stimeRon Yorston2014-01-191-0/+1
| |
* | date: actually use modified strftimeRon Yorston2014-01-191-0/+3
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-131-6/+22
|\| | | | | | | | | | | Conflicts: include/platform.h scripts/basic/fixdep.c
| * Another FreeBSD fix from Matthias AndreeDenys Vlasenko2014-01-081-3/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * platform.h: undef HAVE_STRCHRNUL only on correct versions of FreeBSDDenys Vlasenko2014-01-071-5/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Implement POSIX-compliant mktemp for WIN32Ron Yorston2014-01-071-0/+2
| |
* | Revise mingw_stat to minimise changes from upstream BusyBoxRon Yorston2014-01-071-19/+26
| |