aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* win32: import fsync(2) implementation from gnulibRon Yorston2018-02-211-0/+1
|
* Merge branch 'busybox' into mergeRon Yorston2017-08-221-0/+5
|\
| * Hopefully fix "will break strict-aliasing rules" warning for get_le32Denys Vlasenko2017-08-101-0/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | platform.h: WIN32 doesn't support '%m' printf specifierRon Yorston2017-07-291-0/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston2017-07-291-0/+11
|\|
| * ash: support platforms that don't have '%m' printf specifierRon Yorston2017-07-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The '%m' conversion specifier prints an error message based on the current value of 'errno'. It is available in the GNU C library, Cygwin (since 2012), uClibc and musl. It is not available in various BSDs, BSD-derived systems (MacOS, Android) or Microsoft Windows. Use a symbol defined in platform.h to control how error messages can be formatted to display the 'errno' message. On platforms that support it use '%m'; on other platforms use '%s' and strerror(). On platforms that have '%m' there is essentially no change in the size of the binary. Otherwise: function old new delta redirect 1287 1310 +23 xtcsetpgrp 27 44 +17 dup2_or_raise 34 51 +17 setinputfile 267 275 +8 .rodata 163379 163371 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 65/-8) Total: 57 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: less hackish implementation of evaltreenr()Denys Vlasenko2017-07-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defining a function alias with __attribute__ ((alias("evaltree"),__noreturn__)) is not that usual, and clang had a bug which made it misunderstand this construct. Switch to: ALWAYS_INLINE NORETURN evaltreenr() { evaltree(); unreachable(); } Older gcc's do not know unreachable(), on them we pay the price of having a few extra calls to abort(): function old new delta evalsubshell 151 156 +5 evalpipe 357 362 +5 argstr 1141 1144 +3 On newer gcc, code size does not change. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-07-181-0/+6
|\|
| * Move get_unaligned_le32() macros to platform.hDenys Vlasenko2017-07-151-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-02-081-5/+10
|\|
| * Allow FAST_FUNC to be overridden at build timeKang-Che Sung2017-01-091-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Busybox uses FAST_FUNC macro to tweak with IA-32 calling conventions in order to make the function call slightly smaller or slightly faster. However, when I experiment with GCC's LTO (Link Time Optimization), I discovered that FAST_FUNC could hinder LTO's optimization so that the resulting executable become a few bytes larger (than what is compiled without FAST_FUNC). This change allows to specify e.g. CONFIG_EXTRA_CFLAGS="-DFAST_FUNC= -flto" and compile with LTO without a source code hack. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-02-221-1/+5
|\|
| * include/platform.h: Remove extra #endif introduced in 6df9612.Ari Sundholm2015-12-171-1/+0
| | | | | | | | | | | | | | It causes the compilation to fail. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Resolve linker issues with Android API 21 (dprintf, tcdrain)Chris Renshaw2015-12-171-1/+6
| | | | | | | | | | Signed-off-by: Chris Renshaw <osm0sis@outlook.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeFRPRon Yorston2015-05-181-3/+17
|\|
| * Conditionalize Bionic workarounds on __ANDROID_API__Matt Whitlock2015-05-031-4/+10
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bionic lacks mempcpy; enable existing workaroundMatt Whitlock2015-05-031-0/+1
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bionic lacks ttyname_r; provide a workaroundMatt Whitlock2015-04-251-0/+7
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-03-141-0/+17
|\| | | | | | | | | | | Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
| * gzip: speed up and shrink put_16bit()Denys Vlasenko2015-02-021-0/+2
| | | | | | | | | | | | | | function old new delta put_16bit 104 98 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * platform.h: enable mempcpy for FreeBSDDenys Vlasenko2015-02-021-1/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * platform.h: mempcpy needs <string.h>Denys Vlasenko2015-01-291-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * platform.h: add compat mempcpyDenys Vlasenko2015-01-251-0/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Changes to allow building with MinGW-w64Ron Yorston2015-01-051-0/+2
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-06-301-0/+3
|\|
| * Rename INIT_LAST to INIT_FUNC to avoid confusionBartosz Golaszewski2014-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'busybox' into mergeRon Yorston2014-05-061-2/+14
|\| | | | | | | | | | | | | Conflicts: debianutils/which.c editors/vi.c libbb/executable.c
| * 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>
* | 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>
* | Extend WIN32 statfs to include type, fsid and namelenRon Yorston2014-01-061-1/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-021-1/+1
|\| | | | | | | | | | | Conflicts: archival/Config.src shell/ash.c
| * platform: strchrnul is missing if __APPLE__Daniel Borca2013-11-271-1/+1
| | | | | | | | | | Signed-off-by: Daniel Borca <dborca@yahoo.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-08-271-0/+1
|\|
| * md5/sha512: a better fix for strict aliasing warningsDenys Vlasenko2013-06-271-0/+1
| | | | | | | | | | | | | | The locations *are* well-aligned for direct stores on any architecture. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | df: limited implementation for WIN32Ron Yorston2013-04-031-1/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2013-03-191-10/+12
|\|
| * platform: use KERNEL_VERSION to simplify uClibc version checkingMike Frysinger2013-03-121-9/+11
| | | | | | | | | | | | | | | | This makes reading the logic (as well as adding new code) a lot simpler, and fixes one or two cases that were broken due to incorrect sub-version tests. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Fix move_to_unaligned16Denys Vlasenko2013-02-271-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-02-071-1/+4
|\|
| * sha3sum: new appletLauri Kasanen2013-01-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta KeccakF - 496 +496 KeccakF_RoundConstants - 192 +192 sha3_hash - 171 +171 sha3_end - 40 +40 hash_file 274 299 +25 KeccakF_RotationConstants - 25 +25 KeccakF_PiLane - 25 +25 packed_usage 29213 29232 +19 sha3_begin - 18 +18 KeccakF_Mod5 - 10 +10 applet_names 2445 2453 +8 applet_main 1420 1424 +4 applet_nameofs 710 712 +2 ------------------------------------------------------------------------------ (add/remove: 8/0 grow/shrink: 9/7 up/down: 1049/-54) Total: ~995 bytes Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-09-071-1/+8
|\| | | | | | | | | | | Conflicts: include/libbb.h shell/ash.c
| * platform.h: disable ALIGNn macros for s390[x]Denys Vlasenko2012-08-061-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * platform.h: Android tweaks: ioprio defines, BB_ADDITIONAL_PATHTias Guns2012-06-101-0/+6
| | | | | | | | | | Signed-off-by: Tias Guns <tias@ulyssis.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move Adroid endgrent() and endpwent() NOPS to libbb.hDenys Vlasenko2012-01-081-5/+0
| | | | | | | | | | | | They should be after includes of pwd.h and grp.h Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * platform.h: define endgrent() and endpwent() as no-ops on AndroidDenys Vlasenko2012-01-061-0/+5
| | | | | | | | | | | | Surprisingly, bionic libc seems to lack these functions. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | mingw32: add manRon Yorston2012-06-261-0/+1
| |
* | strsep is in upstream BusyBox: no need for MINGW32 versionRon Yorston2012-04-181-0/+1
| |