Pullreq libc libnx updates
* NuttX: make strerror() return 'Success' for 0
* NuttX: fix strrchr() so that it considers null terminator as part of string
From strrchr(3) man page:
"The terminating null byte is considered part of the string, so that if c
is specified as '\0', these functions return a pointer to the terminator."
* NuttX: mm_free(): Add DEBUGASSERT()'s to catch memory corruption early.
It's easier to find the source when asserts fail already when freeing
an overflowed buffer, than if the corruption is only detected on next
malloc().
* MM_FILL_ALLOCATIONS: Add debug option to fill all mallocs()
This is helpful for detecting uninitialized variables,
especially in C++ code. I seem to be forgetting to initialize
member variables and then they just get random values..
* NuttX: nxtk_bitmapwindow: Fix warning message when bitmap is fully off-screen.
* nxfonts_getfont: Avoid unnecessary warnings for other whitespace chars also.
* NuttX: Fix kerning of 'I' in Sans17x22 font
The I character was running together with some other
characters, e.g. in sequence "IMI".
* NXMU: Revalidate window pointer for mouse events.
NXMU caches the previous window pointer so that further mouse
events can be sent to the same window. However, if the window
is destroyed while mouse button is held down, the pointer may
become invalid and cause a crash. This patch revalidates the
pointer before using it.
Approved-by: GregoryN <gnutt@nuttx.org>
1. Move exepath_*() related code to libc/misc
1. Rename exepath_ to envpath_
2. Rename BINFMT_EXEPATH to LIB_ENVPATH
libs/libc/modlib: Add pre module library symbol table support
libs/libc/stdio/lib_libvsprintf.c: Resolves the integer field width problem if Issue 35 for the cases of long and long long integer types.
libs/libc/stdio/lib_libvsprintf.c: Resolves the integer field width problem if Issue 35 for the case of integer types.
libs/libc/stdio: Remove CONFIG_NOPRINTF_FIELDWIDTH. That option does, indeed, make the printf family of functions much smaller. But it also adds a lot of complexity and makes the functions non-standard. Removing this might break some of the tinier platforms but it is the best thing to do for long term maintanance for for OpenGroup.org compliance.
When performing a floating point conversion the parsing code could
consume more than required characters from the input buffer. This made
impossible to convert input of form "1.1K" using format "%f%c".
Fix the issue by advancing the input buffer with the actual characters
converted as a float point number.
Signed-off-by: Mihai Serban <mihai.serban@gmail.com>
A few improvements to getaddrinfo:
- Use the protocol and socktype hints in returned address
- Ignore AI_PASSIVE argument if hostname is not NULL
Approved-by: GregoryN <gnutt@nuttx.org>
many locations: Change occurences of open() followed by file_detach() to file_open(). Change most non-controversion calls to open() to nx_open().
fs/inode/fs_fileopen.c: Flesh out file_open() with some interim, placeholder logic.
fs/inode/fs_fileopen.c: Add a framework for a file_open() implementation (no real logic in place yet).
fs/vfs/fs_open.c: Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.