[PATCH] Update newlib so that it passes libc++'s tests
Jonathan Roelofs
jonathan@codesourcery.com
Fri Sep 19 22:40:00 GMT 2014
(For context, here's the original thread:
https://sourceware.org/ml/newlib/2013/msg01077.html)
I've rebased the remaining part of the original patch. Please see the attached.
Is this good for commit, or does it still need work?
Cheers,
Jon
--
Jon Roelofs
jonathan@codesourcery.com
CodeSourcery / Mentor Embedded
-------------- next part --------------
diff --git a/src/newlib/libc/include/stdlib.h b/src/newlib/libc/include/stdlib.h
index dee9ed6..374b9b6 100644
--- a/src/newlib/libc/include/stdlib.h
+++ b/src/newlib/libc/include/stdlib.h
@@ -151,7 +151,12 @@ long _EXFUN(a64l,(const char *__input));
char * _EXFUN(l64a,(long __input));
char * _EXFUN(_l64a_r,(struct _reent *,long __input));
int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg));
+#endif
+#if !defined(__STRICT_ANSI__) || \
+ (defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L)
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
+#ifndef __STRICT_ANSI__
int _EXFUN(putenv,(char *__string));
int _EXFUN(_putenv_r,(struct _reent *, char *__string));
_PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t));
@@ -189,12 +194,20 @@ unsigned short *
_EXFUN(_seed48_r,(struct _reent *, unsigned short [3]));
_VOID _EXFUN(srand48,(long));
_VOID _EXFUN(_srand48_r,(struct _reent *, long));
+#endif
+#if !defined(__STRICT_ANSI__) || \
+ (defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L)
long long _EXFUN(atoll,(const char *__nptr));
+#endif
+#ifndef __STRICT_ANSI__
long long _EXFUN(_atoll_r,(struct _reent *, const char *__nptr));
+#endif
+#if !defined(__STRICT_ANSI__) || \
+ (defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L)
long long _EXFUN(llabs,(long long));
lldiv_t _EXFUN(lldiv,(long long __numer, long long __denom));
-#endif /* ! __STRICT_ANSI__ */
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
long long _EXFUN(strtoll,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
#endif
#ifndef __STRICT_ANSI__
More information about the Newlib
mailing list