posix: Use _POSIX_C_SOURCE=200809L instead of 200809
This constant is supposed to be defined as a long instead of an int, presumably to support systems where int isn't large enough. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
eb38e8db31
commit
3cc4c5eb7a
5 changed files with 5 additions and 5 deletions
|
@ -133,7 +133,7 @@ if (CONFIG_GPROF)
|
|||
target_link_options(native_simulator INTERFACE "-pg")
|
||||
endif()
|
||||
|
||||
zephyr_compile_definitions(_POSIX_C_SOURCE=200809 _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED)
|
||||
zephyr_compile_definitions(_POSIX_C_SOURCE=200809L _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED)
|
||||
|
||||
if (CONFIG_NATIVE_APPLICATION)
|
||||
zephyr_ld_options(
|
||||
|
|
|
@ -71,7 +71,7 @@ void hwm_signal_end_handler(int sig)
|
|||
* Therefore we set SA_RESETHAND: This way, the 2nd time the signal is received
|
||||
* the default handler would be called to terminate the program no matter what.
|
||||
*
|
||||
* Note that SA_RESETHAND requires either _POSIX_C_SOURCE>=200809 or
|
||||
* Note that SA_RESETHAND requires either _POSIX_C_SOURCE>=200809L or
|
||||
* _XOPEN_SOURCE>=500
|
||||
*/
|
||||
void hwm_set_sig_handler(void)
|
||||
|
|
|
@ -60,7 +60,7 @@ NSI_OPT?=-O0
|
|||
# Warnings switches (for the runner itself)
|
||||
NSI_WARNINGS?=-Wall -Wpedantic
|
||||
# Preprocessor flags
|
||||
NSI_CPPFLAGS?=-D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
|
||||
NSI_CPPFLAGS?=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
|
||||
|
||||
NO_PIE_CO:=-fno-pie -fno-pic
|
||||
DEPENDFLAGS:=-MMD -MP
|
||||
|
|
|
@ -55,7 +55,7 @@ static void nsi_hws_signal_end_handler(int sig)
|
|||
* Therefore we set SA_RESETHAND: This way, the 2nd time the signal is received
|
||||
* the default handler would be called to terminate the program no matter what.
|
||||
*
|
||||
* Note that SA_RESETHAND requires either _POSIX_C_SOURCE>=200809 or
|
||||
* Note that SA_RESETHAND requires either _POSIX_C_SOURCE>=200809L or
|
||||
* _XOPEN_SOURCE>=500
|
||||
*/
|
||||
static void nsi_hws_set_sig_handler(void)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#ifdef CONFIG_NEWLIB_LIBC
|
||||
#define _POSIX_C_SOURCE 200809
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue