2
0
mirror of https://frontier.innolan.net/github/amigaos-cross-toolchain6.git synced 2024-10-19 10:29:55 +00:00

Make gcc 4.x fixes compatible with linux.

This commit is contained in:
Krystian Bacławski
2012-02-17 21:30:08 -08:00
parent f514221a2a
commit 63b8fa6264
2 changed files with 10 additions and 2 deletions

View File

@ -82,12 +82,16 @@
#ifndef NEED_sys_errlist
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
might declare sys_errlist in a way that the compiler might consider
@@ -463,7 +464,7 @@
@@ -463,7 +464,11 @@
#else
-extern int sys_nerr;
-extern char *sys_errlist[];
+#ifdef __APPLE__
+extern const int sys_nerr;
+#else
+extern int sys_nerr;
+#endif
+extern const char *const sys_errlist[];
#endif

View File

@ -20,12 +20,16 @@
#ifdef HAVE_SYS_ERRLIST
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
might declare sys_errlist in a way that the compiler might consider
@@ -463,7 +464,7 @@
@@ -463,7 +464,11 @@
#else
-extern int sys_nerr;
-extern char *sys_errlist[];
+#ifdef __APPLE__
+extern const int sys_nerr;
+#else
+extern int sys_nerr;
+#endif
+extern const char *const sys_errlist[];
#endif