This patch adds support for enabling the following extensions:
* IO C99 formats enable more options for formatting output. We need this to
support "%z" in Python 3
* Linux errno extensions define more error numbers. We need this to support
ESHUTDOWN in Python 3
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
select LIBNEWLIBM if LIBNEWLIBC
select LIBUKALLOC
select LIBVFSCORE
+
+if LIBNEWLIBC
+ config LIBNEWLIBC_WANT_IO_C99_FORMATS
+ bool "Use C99 IO formats"
+ default n
+
+ config LIBNEWLIBC_LINUX_ERRNO_EXTENSIONS
+ bool "Use Linux errno extensions"
+ default n
+endif
################################################################################
LIBNEWLIB_GLOBAL_FLAGS-y += -DMISSING_SYSCALL_NAMES -DMALLOC_PROVIDED
LIBNEWLIB_GLOBAL_FLAGS-y += -D_POSIX_REALTIME_SIGNALS
+LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_WANT_IO_C99_FORMATS) += -D_WANT_IO_C99_FORMATS
+LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_LINUX_ERRNO_EXTENSIONS) += -D__LINUX_ERRNO_EXTENSIONS__
CFLAGS-y += $(LIBNEWLIB_GLOBAL_FLAGS-y)
CXXFLAGS-y += $(LIBNEWLIB_GLOBAL_FLAGS-y)