Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-02-12 05:16:06 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2016-02-12 19:16:06 +0300
commit8b8952064cfacf91b18aed37fbd44f621edb6941 (patch)
treed9f29af5d98a654923fedea315e25e59f62ab445 /newlib/libc
parent8b83da2d55b2a61f22b8b330f966d06e3092b079 (diff)
Fix compile with GCC 5 -Werror
newlib/libc/ * stdio64/freopen64.c: Include <string.h> for memset(). * stdlib/quick_exit.c: Include <unistd.h> for _exit(). * string/gnu_basename.c (__gnu_basename): Fix discarded const qualifier warning. * stdlib/strtold.c: Include "mprec.h" for _strtorx_r(). Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/stdio64/freopen64.c1
-rw-r--r--newlib/libc/stdlib/quick_exit.c1
-rw-r--r--newlib/libc/stdlib/strtold.c2
-rw-r--r--newlib/libc/string/gnu_basename.c2
4 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c
index 8a069d53e..f7df35407 100644
--- a/newlib/libc/stdio64/freopen64.c
+++ b/newlib/libc/stdio64/freopen64.c
@@ -74,6 +74,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <time.h>
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
diff --git a/newlib/libc/stdlib/quick_exit.c b/newlib/libc/stdlib/quick_exit.c
index fc435711e..1d6fb231e 100644
--- a/newlib/libc/stdlib/quick_exit.c
+++ b/newlib/libc/stdlib/quick_exit.c
@@ -28,6 +28,7 @@
*/
#include <stdlib.h>
+#include <unistd.h>
#include <sys/lock.h>
/**
diff --git a/newlib/libc/stdlib/strtold.c b/newlib/libc/stdlib/strtold.c
index 96254eb49..a6d415db6 100644
--- a/newlib/libc/stdlib/strtold.c
+++ b/newlib/libc/stdlib/strtold.c
@@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h>
#include "local.h"
+#include "mprec.h"
+#undef FLT_ROUNDS
#ifdef _HAVE_LONG_DOUBLE
diff --git a/newlib/libc/string/gnu_basename.c b/newlib/libc/string/gnu_basename.c
index 46b92d0fd..90e22ccdf 100644
--- a/newlib/libc/string/gnu_basename.c
+++ b/newlib/libc/string/gnu_basename.c
@@ -20,7 +20,7 @@ _DEFUN (__gnu_basename, (path),
char *p;
if ((p = strrchr (path, '/')))
return p + 1;
- return path;
+ return (char *) path;
}
#endif /* !_NO_BASENAME */