aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2002-12-16 21:38:27 +0800
committerknu <knu@FreeBSD.org>2002-12-16 21:38:27 +0800
commit1bc36c4ed236792f1b2278e2c0eb9d5b8dbcc7bd (patch)
tree9d02f3003bd3eb43a253daa6db90cd478a019de6
parentfa358ca7cc96d4c1aafe0f508ee694815c14f897 (diff)
downloadfreebsd-ports-gnome-1bc36c4ed236792f1b2278e2c0eb9d5b8dbcc7bd.tar.gz
freebsd-ports-gnome-1bc36c4ed236792f1b2278e2c0eb9d5b8dbcc7bd.tar.zst
freebsd-ports-gnome-1bc36c4ed236792f1b2278e2c0eb9d5b8dbcc7bd.zip
Fix the build problem of *-rtems-gcc on CURRENT due to conflicting
declarations of sys_nerr, sys_errlist and sys_nsig. Obtained from: lang/gcc295 Submitted by: bento
-rw-r--r--devel/i386-rtems-gcc/files/patch-strerror.c14
-rw-r--r--devel/i386-rtems-gcc/files/patch-strsignal.c56
2 files changed, 70 insertions, 0 deletions
diff --git a/devel/i386-rtems-gcc/files/patch-strerror.c b/devel/i386-rtems-gcc/files/patch-strerror.c
new file mode 100644
index 000000000000..cfc439c9012a
--- /dev/null
+++ b/devel/i386-rtems-gcc/files/patch-strerror.c
@@ -0,0 +1,14 @@
+--- gcc-2.95.3/libiberty/strerror.c.orig Fri May 15 16:42:41 1998
++++ gcc-2.95.3/libiberty/strerror.c Mon May 6 13:53:14 2002
+@@ -461,9 +461,10 @@
+ static const char **sys_errlist;
+
+ #else
+-
++/* sigh... why don't they just leave this to stdio.h...
+ extern int sys_nerr;
+ extern char *sys_errlist[];
++*/
+
+ #endif
+
diff --git a/devel/i386-rtems-gcc/files/patch-strsignal.c b/devel/i386-rtems-gcc/files/patch-strsignal.c
new file mode 100644
index 000000000000..5740d6f1740d
--- /dev/null
+++ b/devel/i386-rtems-gcc/files/patch-strsignal.c
@@ -0,0 +1,56 @@
+--- gcc-2.95.3/libiberty/strsignal.c.orig Fri May 15 16:42:42 1998
++++ gcc-2.95.3/libiberty/strsignal.c Mon May 6 14:01:43 2002
+@@ -244,7 +244,7 @@
+ #else
+
+ #ifdef NSIG
+-static int sys_nsig = NSIG;
++static int Gsys_nsig = NSIG;
+ #else
+ #ifdef _NSIG
+ static int sys_nsig = _NSIG;
+@@ -330,7 +330,7 @@
+ if ((sys_siglist = (const char **) malloc (nbytes)) != NULL)
+ {
+ memset (sys_siglist, 0, nbytes);
+- sys_nsig = num_signal_names;
++ Gsys_nsig = num_signal_names;
+ for (eip = signal_table; eip -> name != NULL; eip++)
+ {
+ sys_siglist[eip -> value] = eip -> msg;
+@@ -379,7 +379,7 @@
+ {
+ init_signal_tables ();
+ }
+- maxsize = MAX (sys_nsig, num_signal_names);
++ maxsize = MAX (Gsys_nsig, num_signal_names);
+ return (maxsize - 1);
+ }
+
+@@ -432,7 +432,7 @@
+
+ #endif
+
+- if ((signo < 0) || (signo >= sys_nsig))
++ if ((signo < 0) || (signo >= Gsys_nsig))
+ {
+ /* Out of range, just return NULL */
+ msg = NULL;
+@@ -591,7 +591,7 @@
+ {
+ init_signal_tables ();
+ }
+- if ((signo <= 0) || (signo >= sys_nsig))
++ if ((signo <= 0) || (signo >= Gsys_nsig))
+ {
+ fprintf (stderr, "%s: unknown signal\n", message);
+ }
+@@ -621,7 +621,7 @@
+
+ maxsigno = signo_max ();
+ printf ("%d entries in names table.\n", num_signal_names);
+- printf ("%d entries in messages table.\n", sys_nsig);
++ printf ("%d entries in messages table.\n", Gsys_nsig);
+ printf ("%d is max useful index.\n", maxsigno);
+
+ /* Keep printing values until we get to the end of *both* tables, not