aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/fixdep.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2024-09-281-2/+9
|\
| * fixdep: add fstat error handlingSam James2024-09-271-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `fstat` fails, `st` is left uninitialised. In our case, Ben Kohler noticed our release media builds were failing in Gentoo on x86 when building busybox with occasional SIGBUS. This turned out to be EOVERFLOW (from 32-bit ino_t) which wasn't being reported because nothing was checking the return value from `fstat`. Fix that to avoid UB (use of uninit var) and to give a more friendly error to the user. This actually turns out to be fixed already in the kernel from back in 2010 [0] and 2016 [1]. [0] https://github.com/torvalds/linux/commit/a3ba81131aca243bfecfa78c42edec0cd69f72d6 [1] https://github.com/torvalds/linux/commit/46fe94ad18aa7ce6b3dad8c035fb538942020f2b Reported-by: Ben Kohler <bkohler@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2023-04-091-1/+5
|\|
| * fixdep: avoid underflow when end of entry doesn't coincide with EOFArsen Arsenović2023-02-271-0/+5
| | | | | | | | | | | | | | Bug: https://bugs.gentoo.org/893776 Closes: https://bugs.busybox.net/show_bug.cgi?id=15326 Signed-off-by: Arsen Arsenović <arsen@gentoo.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-05-141-6/+6
|\|
| * fix "warning array subscript has type 'char'"Denys Vlasenko2021-04-141-6/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | fixdep: fix assumption that `long` is as large as `void *`Johannes Schindelin2017-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | It is not. At least not in general. And in particular not on 64-bit Windows, where sizeof(long) == 4. What the code wanted to use is actually called intptr_t. Note: `intptr_t` is a C99 feature. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | fixdep: be careful about handling empty lines correctlyJohannes Schindelin2017-07-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code without this patch is seriously flawed, as it can easily overrun the buffer while looking for the *beginning* of the line. The symptom when trying to build without this patch in Git for Windows' SDK (which is a special-purpose version of MSYS2) is: $ make mingw64_defconfig && make -j15 HOSTCC scripts/basic/fixdep make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 127 make: *** [Makefile:358: scripts_basic] Error 2 make: *** [Makefile:358: scripts_basic] Error 2 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | fixdep: read the dependency files in binary modeJohannes Schindelin2017-07-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make sure that the original line endings are preserved, as fixdep hardcodes the assumption of Unix-type line endings. The symptom is this (kinda hard to understand) error when building in Git for Windows' SDK (which is a special-purpose version of MSYS2): $ make mingw64_defconfig && make -j15 HOSTCC scripts/basic/fixdep C:/git-sdk-64/mingw64/x86_64-w64-mingw32/include/ctype.h 64-w64-mingw32/include/ctype.h: Invalid argument fixdep: make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 2 make: *** [Makefile:358: scripts_basic] Error 2 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | Merge branch 'busybox' into mergeRon Yorston2014-01-131-1/+1
|\| | | | | | | | | | | Conflicts: include/platform.h scripts/basic/fixdep.c
| * build system: stop including alloca.h, stdlib.h provides itDenys Vlasenko2014-01-091-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into mergeRon Yorston2012-03-231-0/+1
|\| | | | | | | | | | | Conflicts: Makefile.flags scripts/basic/fixdep.c
| * suppress "warning: implicit declaration of function 'alloca'"Denys Vlasenko2011-09-151-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | fixdep: fix mmap() on msysKlessing, Daniel2011-10-301-6/+28
| |
* | win32: fixdep: workaround mmap()Nguyễn Thái Ngọc Duy2011-01-231-0/+29
|/
* scripts: fix fixdep.c to let it workable in cygwinMacpaul Lin2010-12-181-1/+1
| | | | | | | | | Update retrun character detection in the fixdep.c to let it work in cygwin. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Greentime <green.hu@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Revert "scripts: fix fixdep.c to let it workable in cygwin"Denys Vlasenko2010-12-181-1/+1
| | | | This reverts commit 10c36b86574133bb1cd29ad04db64c7953b94ab5.
* scripts: fix fixdep.c to let it workable in cygwinGreentime2010-12-181-1/+1
| | | | | | | | | Update return character detection in the fixdep.c to let it workable in cygwin. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Greentime <green.hu@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix extra bogus files generation in include/config/*Denys Vlasenko2010-06-171-4/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Hurd compat fixes. Mostly dealing with absent PATH_MAXJérémie Koenig2010-03-261-2/+2
| | | | | Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-13/+17
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer2007-04-041-1/+1
|
* fixdep.c: avoit doing memcmp in most casesDenis Vlasenko2006-12-301-3/+3
| | | | | uidgid_get.c: add forgotten copyright notice pwd/grp/shadow: avoid collisions with libc names
* saw commit of vapier@busybox.net (thanks!),Denis Vlasenko2006-12-301-17/+22
| | | | | decided to stop doing FOUR memcmp's per each input character. I should have fixed this much earlier...
* prevent accessing memory that we dont ownMike Frysinger2006-12-301-5/+5
|
* build system: check for ENABLE_, USE_ and SKIP_ (not only for CONFIG_)Denis Vlasenko2006-10-191-15/+21
|
* build system overhaulDenis Vlasenko2006-10-051-0/+393