This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 2/2] don't compile gcvt if posix < 200112
- From: uchan0+newlib at gmail dot com
- To: newlib at sourceware dot org
- Cc: uchan-nos <uchan0 at gmail dot com>
- Date: Tue, 23 Jul 2019 08:14:45 +0900
- Subject: [PATCH 2/2] don't compile gcvt if posix < 200112
- References: <20190722231445.15990-1-uchan0+newlib@gmail.com>
From: uchan-nos <uchan0@gmail.com>
---
newlib/libc/stdlib/efgcvt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/newlib/libc/stdlib/efgcvt.c b/newlib/libc/stdlib/efgcvt.c
index 9314bf361..c1684f35a 100644
--- a/newlib/libc/stdlib/efgcvt.c
+++ b/newlib/libc/stdlib/efgcvt.c
@@ -102,6 +102,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <stdlib.h>
#include "local.h"
+#if __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112
+
char *
fcvt (double d,
int ndigit,
@@ -163,3 +165,5 @@ gcvt (double d,
}
return (_gcvt (_REENT, d, ndigit, buf, 'g', 0) ? tbuf : 0);
}
+
+#endif // __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112
--
2.17.1