a76dd50ce1
Move Adroid endgrent() and endpwent() NOPS to libbb.h
...
They should be after includes of pwd.h and grp.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2012-01-08 16:11:38 +01:00
6b64a26976
platform.h: define endgrent() and endpwent() as no-ops on Android
...
Surprisingly, bionic libc seems to lack these functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2012-01-06 16:23:18 +01:00
cc87588a61
disable strverscmp usage if we build against uClibc-0.9.31
...
Signed-off-by: Oliver Metz <oliver.metz@googlemail.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-10-09 02:08:42 +02:00
e0894f567a
Android build fixes and alternate (hopefully simpler) defconfig for it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-09-09 18:00:44 +02:00
1285437217
Fixes for FreeBSD build
...
Signed-off-by: Matthias Andree <mandree@freebsd.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-08-28 05:05:02 +02:00
14bd16ac56
more tweak for bionic
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-07-08 08:49:40 +02:00
4dc35fb5b6
platform.h: tweaks for cygwin
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-07-08 04:41:38 +02:00
75214cfe00
Use the _unlocked stdio macros only when they're all available
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-30 02:59:17 +02:00
0e79e7bb42
Use the built-in getline on more systems that don't have it
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-30 02:11:49 +02:00
0a5b310067
platform.c: provide getline implementation
...
Signed-off-by: Timo Teras <timo.teras@iki.fi >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-29 02:19:58 +02:00
1e18a01fa2
ls: fix HAVE_STRVERSCMP check; add check for older uclibc versions
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-21 17:12:52 +02:00
561f9c8585
Add HAVE_STRVERSCMP, guard the only usage of strverscmp with #ifdef
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-21 16:38:29 +02:00
f533ec8767
*: simplify Ethernet header includes
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-10 05:17:59 +02:00
71d7313625
platform.h: support for build under Android
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-06-03 20:51:58 +02:00
89f5bfd6c3
libbb.h: use inlined sigfillset, sigemptyset, sigisemptyset on uclibc
...
text data bss dec hex filename
875879 493 7584 883956 d7cf4 busybox_old
875879 493 7584 883956 d7cf4 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-05-12 23:03:18 +02:00
47061b4e9b
straighten out dprintf/fdprintf mess; remove old "define lchown chown"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-04-17 23:14:19 +02:00
dc50676cce
Move stpcpy replacement function into libbb
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-02-13 18:37:12 +01:00
698e8095fa
use unistd.h before _POSIX_VERSION
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-02-08 05:35:04 +01:00
dd807c16f9
incorporate header fixes proposed in bug 3097
...
Not sure these are *really* needed, but I suppose they don't hurt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-02-07 14:58:57 +01:00
330718ef55
FreeBSD compat
...
Signed-off-by: Chris Rees <utisoft@gmail.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-01-24 17:07:06 +01:00
e3c127d846
FreeBSD compat
...
Signed-off-by: Chris Rees <utisoft@gmail.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-01-24 17:04:59 +01:00
1f4a987d47
pltaform.h: move include of stdint.h before uint16_t is used
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-01-22 17:31:35 +01:00
b40da22357
fix compile error on non-x86 architectures
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-01-21 01:16:09 +01:00
9ad97d5041
sighandler_t definition for BSD
...
Signed-off-by: Chris Rees <utisoft@gmail.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2011-01-20 00:51:52 +01:00
fb132e4737
whitespace cleanup
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com >
2010-10-29 11:46:52 +02:00
e4dcba1c10
*: whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-10-28 18:57:19 +02:00
58647e8f85
Remove check for supported libc.
...
If it is not supported, it won't work. No need to break working ones
which happen to this over this check.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-10-24 03:02:57 +02:00
9ff50b8697
*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bits
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com >
2010-10-18 11:40:26 +02:00
bcccad3531
md5: code shrink; and use 64-byte temp buf, not 128-byte.
...
function old new delta
md5_hash 111 108 -3
md5_end 129 125 -4
md5_hash_block 459 454 -5
filter_rename_config 250 244 -6
md5_crypt 587 578 -9
popmaildir_main 828 816 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-39) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-10-16 20:46:35 +02:00
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
867ffb9616
platform.h: regularize endian detection
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-08-16 03:24:40 +02:00
95b83ba4f8
OpenBSD compatibility
...
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-08-06 09:17:26 +02:00
0635ddd8f7
Added code for nonstandard function strsep()
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-06-19 20:03:18 +02:00
fdd7b566ec
A few minor portability improvements
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-06-19 20:03:15 +02:00
0ecc116592
dnsd: enforce alignment on packet buffer
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-04-14 10:14:25 -07:00
80f4275629
include/platform.h: PowerPC can also do unaligned access
...
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-02-11 23:23:28 +01:00
5fb38491e3
dnsd: fix one big-endian goof; add a TODO about RA bit
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-02-06 22:48:10 +01:00
12ca080a1c
*: eliminate more aliasing warnings
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-02-04 18:41:18 +01:00
98a4c7cf3d
*: suppress ~60% of "aliased warnings" on gcc-4.4.1
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-02-04 15:00:15 +01:00
bb1dcc9aab
more thorough fix for systems with strange socklen_t
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-02-02 12:45:38 +01:00
5b9b1365a0
stat: get rid on intmax_t
...
function old new delta
print_it 225 218 -7
print_stat 919 889 -30
print_statfs 370 339 -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-68) Total: -68 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-02-02 03:08:57 +01:00
57be1eefab
ping: fix unaligned access. closes bug 745.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-11-26 15:26:31 +01:00
245a4f84be
big endian warning fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-11-07 01:31:14 +01:00
53283adb24
include/libbb.h: mark malloc-returning functions with GCC attribute
...
function old new delta
ash_main 1336 1365 +29
readcmd 1062 1072 +10
add_split_dependencies 707 717 +10
rtnl_talk 539 548 +9
normalize 165 174 +9
xmalloc_optname_optval 583 590 +7
test_main 247 253 +6
insert_bg_job 366 371 +5
dname_enc 391 395 +4
nslookup_main 165 168 +3
ifplugd_main 1099 1102 +3
tftpd_main 493 495 +2
make_new_session 413 415 +2
localcmd 274 276 +2
date_main 696 698 +2
tee_main 317 318 +1
setvar 183 184 +1
hash_find 233 234 +1
xrtnl_dump_filter 400 399 -1
prepend_new_eth_table 297 295 -2
unpack_Z_stream 1229 1226 -3
read_line_input 4823 4820 -3
do_load 523 520 -3
udhcp_run_script 669 665 -4
mkfs_vfat_main 1609 1605 -4
rtnl_rtprot_initialize 70 65 -5
procps_scan 1842 1835 -7
read_opt 873 865 -8
ifupdown_main 2133 2125 -8
mkfs_ext2_main 2492 2482 -10
logread_main 503 492 -11
svlogd_main 1441 1429 -12
rewrite 1032 1018 -14
fbsplash_main 917 903 -14
str2sockaddr 431 405 -26
unpack_lzma_stream 2705 2677 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 18/18 up/down: 106/-163) Total: -57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-11-02 14:20:34 +01:00
fe4e23f9de
Add more compat code for non GNU environments
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-11-01 04:01:30 +01:00
21a542d7d7
platform compatibility work (by Dan Fandrich)
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-10-27 11:05:00 +01:00
da49f58524
move libc related stuff out of platform.h
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-07-08 02:58:38 +02:00
9b1b62adc4
Patches to enable FreeBSD build
...
platform.h: fix wrong check for endianness, fix lchown
aliasing to chown on uclibc.
Code seems to not be affected in my testing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-07-05 03:34:12 +02:00
5a49d284a6
add platform tweaks
...
login: consider platforms having no domainname field in the utsname struct
include/platform.h: define IUCLC to 0 on platforms where it is not defined
Signed-off-by: Luca Favatella <slackydeb@gmail.com >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2009-05-19 13:18:45 +02:00
3be2308676
fix move_to_unaligned32
2009-04-17 22:20:44 +00:00