Squashed commit of the following:

tools/configure.c: Add missing '\n' in printf statement

    tools/configure.c: Add missed -g option to getopt() string

    tools/configure.c and tools/configure.sh:  Fix Windows native pre-build kconfig-conf incompability.  Looks like prebuilt Windows native kconfig-conf interprets "..\apps" as "..apps" (possibly '\a' as escape-sequence) so expand winnative path to double-backslashed variant "..\\apps".

    tools/mkdeps.c:  Fix '\0' missing in MinGW.  Implicit bug. There are 2 cases.

    1. Under Linux.  The code works as planned: '\n' is always replaced with '\0' due to sprintf fills n-1 bytes and reaches buffer length limit.

    2. Under Windows/MinGW. There is memory corruption.  Seems like it`s a bug inside MinGW/snprintf.  Snprintf fills consecutively "oldbase",' ',"str",'\n', but does not inserts trailing '\0' instead of '\n'.  And when next append() occurs, strlen() returns garbage-appended "oldbase".

    So the fix just removes '\n' and reserves space for '\0'.

    tools/link.bat: Fix .fakelink creation

    configs/Makefile and tools/Config.mk:  Move single file copy to the new function COPYFILE.  This fixes the Windows native build case when there is no cp or cp does not recognize Windows paths.
This commit is contained in:
Anatol Ivanov
2018-11-05 16:35:28 -06:00
committed by Gregory Nutt
parent 65c74f5444
commit 1dad62d3b7
6 changed files with 90 additions and 7 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ goto :End
)
xcopy %src% %link% /c /q /s /e /y /i
echo FAKELNK > include\apps\.fakelnk
echo FAKELNK > %link%\.fakelnk
goto :End
:ShowUsage