Add three patches about STM32 intherupts and network loopback files
* Add the missing macro STM32_IRQ_NIRQS used by ./arch/arm/src/stm32f7/stm32_irq.c
Signed-off-by: Kejun ZHOU <zhoukejun@outlook.com>
* The struct in_addr doesn't have the member sin_addr.
Signed-off-by: Kejun ZHOU <zhoukejun@outlook.com>
* The function lib_lo_ipv6match() is for IPv6.
Correct the function it calls from lib_lo_ipv4matchto() to lib_lo_ipv6match().
Also add CONFIG_NET_IPv6 for configuration.
Signed-off-by: Kejun ZHOU <zhoukejun@outlook.com>
libs/libc/pthread/pthread_spinlock.c: Resolve several TODO issues by accessing up_testset() via the boardctl() interface rather than attempting to call it directly.
configs/boardctl.c, include/sys/boardctl.h: Add access to architecture-specific up_testset() via boardctl().
arch/Kconfig's, sched/Kconfig, and include/nuttx/spinlock.h: Spinlocks are not available unless the architecture supports the up_testset() operation.
Fixed coding standard error in several files. Use of while( is incorrect; a space is required between while and (. Also ran tools/nxstyle and fix thoses complaints as well in most files.
Changes to comply with coding standard. Mostly focused on files with missing space after keyword in if(, switch(, and for(. Offending files also got changes to comply with tools nxstyle. If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh. Still need to fix occurrences of while( with missing space. There are a lot of them.
- Numbered arguments now work by using two pass parsing and an argument list.
The maximum number of numbered args is determined by CONFIG_LIBC_NL_ARGMAX
which is then copied into NL_ARGMAX.
- Size of pointer argument ('p') is determined before output.
include/limits.h: Define NL_ARGMAX (as well as some of the other 'invariant
values' per http://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html)
sched/init/nx_start.c: Add support for CONFIG_BOARD_DRIVER_INITIALIZE. If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().
Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.
Raname board_initialize() to board_late_initialize()
The previous implementation was probably corect. On Cygwin with GCC I see this:
int main(int argc, char **argv)
{
printf("Value 1.2 is: [%f]\n", 1.2);
printf("Value 0.1 is: [%f]\n", 0.1);
printf("Value 0.0: [%f]\n", 0.0);
printf("Value 347.6872: [%f]\n", 347.6872);
}
Generates output
Value 1.2 is: [1.200000]
Value 0.1 is: [0.100000]
Value 0.0: [0.000000]
Value 347.6872: [347.687200]
This reverts commit eb0223bc7f.
Author: Gregory Nutt <gnutt@nuttx.org>
TODO: Remove 'Missing fscanf()' bug
Clean up remaining complaints for tools/nxstyle
Apply tools/detab, rmcr, convert-comments, lowhex, and indent.sh to the new and highly modified files.
Author: Johannes <nivus.entwicklung@gmail.com>
- Move vscanf logic to lib_sscanf.c Switched to stream interface (tricky, because the old implementation used massive read ahead, which isn't suitable for streams, chars already read are gone).
- Added scanf and fscanf
- Added hh, h, and ll modifiers
- Fixes for standard compliance in scanf
- Fixes for standard compliance in strto... function family (don't consume single '-' or '+', allow sign in strotul(l))
Squashed commit of the following:
sched/sched/sched_getsockets.c: Fix an error in conditional compilation.
fs/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
Documentation/: Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
include/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
libs/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
net/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
sched/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
syscall/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
tools/: Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
Squashed commit of the following:
configs/: The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
fs/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
tools/: Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
syscall/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
libs/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
include/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
drivers/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
Documentation/: Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
binfmt/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
arch/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
net/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
sched/: Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
sched/Kconfig: CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
configs/: Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
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.