mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
Handle deprecated sys_errlist and sys_nerr.
This commit is contained in:
@@ -71,3 +71,23 @@
|
|||||||
char *
|
char *
|
||||||
xmalloc (size)
|
xmalloc (size)
|
||||||
unsigned size;
|
unsigned size;
|
||||||
|
--- binutils-2.9.1/libiberty/strerror.c 2012-02-17 20:46:45.643806527 -0800
|
||||||
|
+++ binutils-2.9.1/libiberty/strerror.c 2012-02-17 20:49:54.372029811 -0800
|
||||||
|
@@ -7,6 +7,8 @@
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
+#undef NEED_sys_errlist
|
||||||
|
+
|
||||||
|
#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 @@
|
||||||
|
#else
|
||||||
|
|
||||||
|
extern int sys_nerr;
|
||||||
|
-extern char *sys_errlist[];
|
||||||
|
+extern const char *const sys_errlist[];
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
--- binutils-2.9.1/libiberty/strerror.c 1998-05-01 08:47:54.000000000 -0700
|
|
||||||
+++ binutils-2.9.1/libiberty/strerror.c 2011-05-08 20:59:25.383808009 -0700
|
|
||||||
@@ -455,15 +455,17 @@
|
|
||||||
same name, it differs from other implementations in that it is dynamically
|
|
||||||
initialized rather than statically initialized. */
|
|
||||||
|
|
||||||
+#undef NEED_sys_errlist
|
|
||||||
+
|
|
||||||
#ifdef NEED_sys_errlist
|
|
||||||
|
|
||||||
static int sys_nerr;
|
|
||||||
-static const char **sys_errlist;
|
|
||||||
+static const char *sys_errlist[];
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
extern int sys_nerr;
|
|
||||||
-extern char *sys_errlist[];
|
|
||||||
+//extern char *sys_errlist[];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -9,3 +9,23 @@
|
|||||||
|
|
||||||
/* Duplicate the stdout and stderr file handles
|
/* Duplicate the stdout and stderr file handles
|
||||||
so they can be restored later. */
|
so they can be restored later. */
|
||||||
|
--- gcc-2.95.3/libiberty/strerror.c 2012-02-17 20:46:45.643806527 -0800
|
||||||
|
+++ gcc-2.95.3/libiberty/strerror.c 2012-02-17 20:49:54.372029811 -0800
|
||||||
|
@@ -7,6 +7,8 @@
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
+#define HAVE_SYS_ERRLIST
|
||||||
|
+
|
||||||
|
#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 @@
|
||||||
|
#else
|
||||||
|
|
||||||
|
extern int sys_nerr;
|
||||||
|
-extern char *sys_errlist[];
|
||||||
|
+extern const char *const sys_errlist[];
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user