Commit Graph

102 Commits

Author SHA1 Message Date
Stephen Heumann 16cd3c0619 Merge with BusyBox 1.24.0.
There's really only one bug fix in here that should be significant for GNO hush. The other changes should be inconsequential, AFAIK.
2015-10-17 01:10:35 -05:00
Stephen Heumann 7d8853ba3f Bump version to 1.1.
Also bump corresponding BusyBox version to 1.23.1, since it has no relevant changes over 1.23.0.
2015-02-07 20:12:55 -06:00
Stephen Heumann ad96f52394 Bump version to 1.0. 2015-01-25 16:11:15 -06:00
Stephen Heumann 6276d32088 Bump version number 2015-01-17 19:40:20 -06:00
Stephen Heumann 70ea37208b Merge with BusyBox 1.23.0.
The only substantive change is about when simple line input mode is used.

I also bumped the version number and included a GNO-version-specific component.
2014-12-27 13:33:41 -06:00
Stephen Heumann 9320c1e704 Set things up so hush can be build with debug code turned on.
This involved breaking things up into more segments in debug mode, since the code is larger. I also had to remove some unused extern definitions, which were causing link errors when debug code was enabled.

To enable debug code, pass "DEBUG=1" to make or build.gs.
2014-11-06 11:42:17 -06:00
Stephen Heumann 051b79efc1 Move all the source files to 15-character ProDOS-compatible file names.
Dmake gets confused if you use over-15-character file names, so they needed to be shortened to get it to work. While I was at it, I also switched _ to . in the filenames so they're fully ProDOS compatible.

The shell/hush_test directory (not needed to build the code) still uses ProDOS-incompatible file names.
2014-11-02 22:11:07 -06:00
Stephen Heumann a3d8a81bb0 Add makefile (which can be used on GNO or a modern system), and build scripts based on in. 2014-11-01 22:59:10 -05:00
Michael Tokarev 32f774cd34 *: declare strings with ALIGN1, as appropriate
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 15:56:37 +02:00
Denys Vlasenko 6ec1510f71 applet_tables: do not include libbb.h, that header ir for target builds
...and applets/applet_tables.c is built on *host*.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-28 01:23:38 +02:00
Denys Vlasenko b9f2d9f7d9 mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko d4d289acf5 tweaks to build system, mainly making menuconfig text and order clearer
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-12 04:18:05 +02:00
Denys Vlasenko 0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko 8fa1f5d543 hush: fix faloout from previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-15 08:18:46 +02:00
Denys Vlasenko 6d48d3ee2a rename _BB_SUID_ALWAYS and NEVER into REQUIRE and DROP. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-30 12:57:19 +02:00
Denis Vlasenko f81e8dbc74 *: make "pragma GCC visibility push(hidden)" less ugly 2009-04-09 12:35:13 +00:00
Denis Vlasenko 98636eb08c Use intra-DSO calls when we build libbusybox. No-op for normal build.
This was Bernhard Fischer' idea.

   text    data     bss     dec     hex filename
 773549    7781    9740  791070   c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped
 769683    7397    9740  786820   c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
2008-05-09 17:59:34 +00:00
Denis Vlasenko 468aea2d88 shells: do not frocibly enable test, echo and kill _applets_,
just build relevant source and use xxx_main functions.
build system: add a special case when we have exactly one applet enabled
(makes "true", "false", "basename" REALLY tiny).
getopt32: do not use stdio.

function                                             old     new   delta
getopt32                                            1385    1412     +27
make_device                                         1187    1200     +13
basename_main                                        120     127      +7
tcpudpsvd_main                                      1922    1926      +4
testcmd                                                5       -      -5
echocmd                                                5       -      -5
fuser_main                                          1243    1231     -12
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 4/1 up/down: 51/-22)             Total: 29 bytes
2008-04-01 14:47:57 +00:00
Denis Vlasenko 85c247161b *: fix fallout from -Wunused-parameter
function                                             old     new   delta
bbunpack                                             358     366      +8
passwd_main                                         1070    1072      +2
handle_incoming_and_exit                            2651    2653      +2
getpty                                                88      86      -2
script_main                                          975     972      -3
inetd_main                                          2036    2033      -3
dname_enc                                            377     373      -4
make_new_session                                     474     462     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24)            Total: -12 bytes
   text    data     bss     dec     hex filename
 797429     658    7428  805515   c4a8b busybox_old
 797417     658    7428  805503   c4a7f busybox_unstripped
2008-03-17 09:04:04 +00:00
Denis Vlasenko 68404f13d4 *: add -Wunused-parameter; fix resulting breakage
function                                             old     new   delta
procps_scan                                         1265    1298     +33
aliascmd                                             278     283      +5
parse_file_cmd                                       116     120      +4
dname_enc                                            373     377      +4
setcmd                                                90      93      +3
execcmd                                               57      60      +3
count_lines                                           72      74      +2
process_command_subs                                 340     339      -1
test_main                                            409     407      -2
mknod_main                                           179     177      -2
handle_incoming_and_exit                            2653    2651      -2
argstr                                              1312    1310      -2
shiftcmd                                             131     128      -3
exitcmd                                               46      43      -3
dotcmd                                               297     294      -3
breakcmd                                              86      83      -3
evalpipe                                             353     349      -4
evalcommand                                         1180    1176      -4
evalcmd                                              109     105      -4
send_tree                                            374     369      -5
mkfifo_main                                           82      77      -5
evalsubshell                                         152     147      -5
typecmd                                               75      69      -6
letcmd                                                61      55      -6
add_cmd                                             1190    1183      -7
main                                                 891     883      -8
ash_main                                            1415    1407      -8
parse_stream                                        1377    1367     -10
alloc_procps_scan                                     55       -     -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148)          Total: -94 bytes
   text    data     bss     dec     hex filename
 797195     658    7428  805281   c49a1 busybox_old
 797101     658    7428  805187   c4943 busybox_unstripped
2008-03-17 09:00:54 +00:00
Denis Vlasenko 745cd17926 Further optimize applet tables; prettify build output
text    data     bss     dec     hex filename
 775923     929    9100  785952   bfe20 busybox_old
 775565     929    9100  785594   bfcba busybox_unstripped
2007-11-29 03:31:20 +00:00
Denis Vlasenko 1aa7e477b1 reorganize applet table. Eliminates pointers to names.
Should be a big win for libbusybox. busybox wins too:

   text    data     bss     dec     hex filename
 776524     929    9100  786553   c0079 busybox_old
 775903     929    9100  785932   bfe0c busybox_unstripped
2007-11-28 06:49:03 +00:00
Denis Vlasenko 15cb4a4272 fix a problem with two different applet_name's 2007-10-11 10:06:26 +00:00
Denis Vlasenko 9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko 724d196c75 Move applets/applet.c into libbb, allows to get rid of --whole-archive
(smaller code). Tested in static and shared mode.
2007-10-10 14:41:07 +00:00
Denis Vlasenko 642a52d65e make --help work for "individual applets" too. 2007-10-07 21:00:41 +00:00
Denis Vlasenko d62fd84d4b libbusybox: move (possibly compressed) help stuff into libbusybox.
Makes individual binaries much smaller.
2007-10-07 20:46:34 +00:00
Denis Vlasenko 03fc408de6 fix typo in comment 2007-04-11 07:36:31 +00:00
Denis Vlasenko 80d14beae9 Rename two config options:
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE
FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS
Make SH_STANDALONE depend on PREFER_APPLETS.
getopt.c: more randomconfig-induced fixes
2007-04-10 23:03:30 +00:00
Denis Vlasenko 335b63d8d1 make a few struct bb_applet members conditional
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
2007-04-10 21:38:30 +00:00
Denis Vlasenko c44ab01b75 Improve STANDALONE_SHELL. "safe" applets are renamed NOEXEC applets
and now this fact is recorded in applets.h, not ash.c.

Several fixes to "--help + STANDALONE_SHELL" scenarios.

function                                             old     new   delta
run_current_applet_and_exit                            -     355    +355
arith                                               2064    2073      +9
refresh                                             1148    1156      +8
getopt32                                            1068    1073      +5
telnet_main                                         1510    1514      +4
md5_sha1_sum_main                                    565     566      +1
xstrtoul_range_sfx                                   255     251      -4
packed_usage                                       22523   22514      -9
tryexec                                              255     203     -52
static.safe_applets                                  152       -    -152
.rodata                                           131320  131128    -192
run_applet_by_name                                   869     506    -363
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/5 up/down: 382/-772)         Total: -390 bytes

./busybox ash -c 'i=20000; while test $i != 0; do touch z; i=$((i-1)); done'
runs more than twice as fast with STANDALONE_SHELL versus without.
2007-04-09 03:11:58 +00:00
Denis Vlasenko 32b633aa3f merge busybox.c into applets.c 2007-04-09 03:05:48 +00:00
Denis Vlasenko c7ba8b9d6c do not put all <applet>_main() declarations
in busybox.h - this produces false dependencies
2007-02-03 17:27:14 +00:00
Denis Vlasenko 765996aaea Cleanup usage messages (-200 bytes).
Remove busybox_main from applet table since
it is called via separate check
2006-12-24 16:59:27 +00:00
Denis Vlasenko 0ee3999d13 random tiny size savings 2006-12-24 15:23:28 +00:00
Denis Vlasenko 7d219aab70 build system overhaul 2006-10-05 10:17:08 +00:00
Paul Fox 6ba8bbe88a add ordering warning on enum Location 2006-06-09 12:25:10 +00:00
Rob Landley b623a542df Header file cleanup. platform.h apparently needs to be included early on so it
can figure out what header files to include, and override stuff that comes
later.  But applets shouldn't include platform.h directly, they should include
busybox.h or libbb.h.  Since busybox.h already includes libbb.h, move libbb.h
to the top of busybox.h and platform.h near the top of libbb.h (right after
bbconfig.h, which is something platform.h also needs access to).

While we're at it, move some stuff from busybox.h to libbb.h so we have one
big file to audit/clean up/try to make sense of instead of many.
2006-05-31 22:09:03 +00:00
Bernhard Reutner-Fischer e00fc16aaa - move libc checks from busybox.h to platform.h
- add ATTRIBUTE_ALWAYS_INLINE, endian handling for DEC UNIX, some more
  compiler dependent defines to platform.h
- add conditional bb_setpgrp define to platform.h
- remove superfluous specifying args from "#define fdprintf dprintf"
2006-05-26 13:10:10 +00:00
Bernhard Reutner-Fischer 421d9e5941 - move buffer allocation schemes to libbb.h
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-04-03 16:39:31 +00:00
"Vladimir N. Oleynik" dd1ccddf1b moved BB_BANNER to applets/version.c file: make kernel like version,
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
Bernhard Reutner-Fischer 86f5c9906b - add platform.h.
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
"Vladimir N. Oleynik" 843c5ef0f9 reorder include <sys/types.h> and <sys/types.h>. 2005-09-29 07:55:51 +00:00
Bernhard Reutner-Fischer d4cffd1cc3 - make sure to include dmalloc.h at the very end of busybox.h or libbb.h. 2005-09-21 17:38:30 +00:00
Rob Landley 193c8c7383 #ifdef reduction infrastructure, based on an argument between Shaun Jackman,
Rob Landley, and others.

Currently CONFIG options are defined or undefined, so we chop out code with
#ifdefs, ala:
#ifdef CONFIG_THING
  stuff();
#endif

This creates a new header file, bb_config.h, which sets the CONFIG entry to 1
or 0, and lets us do:

  if(CONFIG_THING) stuff();

And let the compiler do dead code elimination to get rid of it.  (Note: #ifdef
will still work because for the 1 case it's a static const int, not a #define.)
2005-07-27 06:55:36 +00:00
Mike Frysinger ca1b6fc745 newlib fixe from Shaun Jackman 2005-03-04 01:09:43 +00:00
Eric Andersen c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Manuel Novoa III 68474f3b36 Make sure stdlib.h is always included before dmalloc.h to avoid problems
parsing problems.
2004-02-05 14:45:58 +00:00
Glenn L McGrath 7c87b67c08 Patch from Bastian Blank, allow the buildtime to be overriden with a
different string, used by the debian busybox-cvs to specify the debian
date based version number.
2004-01-13 10:57:32 +00:00
Eric Andersen 85e5e72bc1 Remove remaining libc5 support code 2003-07-22 08:56:55 +00:00