]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Configure IO C99 formats and errno extensions
authorCostin Lupu <costin.lupu@cs.pub.ro>
Thu, 12 Sep 2019 08:36:12 +0000 (11:36 +0300)
committerCostin Lupu <costin.lupu@cs.pub.ro>
Mon, 16 Sep 2019 12:43:28 +0000 (15:43 +0300)
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>
Config.uk
Makefile.uk

index 89010a18e2587bec34f0121680b2e6d08dd338ff..da587ba332e710659faaec0effdc0d7f2f7e6f30 100644 (file)
--- a/Config.uk
+++ b/Config.uk
@@ -10,3 +10,13 @@ menuconfig LIBNEWLIBC
        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
index 01da724361f1bcc4664454db728dd5c22bfb63ce..812f602636294b18744be924ea701a106724094b 100644 (file)
@@ -82,6 +82,8 @@ LIBNEWLIBM_CXXINCLUDES += -I$(LIBNEWLIB_LIBM)/common
 ################################################################################
 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)