2
0
mirror of https://github.com/bebbo/amigaos-cross-toolchain.git synced 2025-12-08 22:38:24 +00:00
Files
amigaos-cross-toolchain6/patches/gcc-2.95.3/01_fix_gcc_4.4_errors.diff
Krystian Bacławski d6fedb1cbf Fix diff paths.
2012-02-17 23:30:48 -08:00

112 lines
3.6 KiB
Diff

--- gcc-2.95.3/gcc/collect2.c
+++ gcc-2.95.3/gcc/collect2.c
@@ -1824,7 +1824,7 @@ collect_execute (prog, argv, redir)
if (redir)
{
/* Open response file. */
- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);
+ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0666);
/* Duplicate the stdout and stderr file handles
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,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
--- gcc-2.95.3/include/libiberty.h 1998-05-01 08:48:25.000000000 -0700
+++ gcc-2.95.3/include/libiberty.h 2012-02-17 22:11:16.964827523 -0800
@@ -16,6 +16,9 @@
#include "ansidecl.h"
+#include <string.h>
+#include <stdlib.h>
+
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
--- gcc-2.95.3/include/objalloc.h 1998-05-01 08:48:25.000000000 -0700
+++ gcc-2.95.3/include/objalloc.h 2012-02-17 22:11:11.409116969 -0800
@@ -21,6 +21,8 @@
#include "ansidecl.h"
+#include <stdlib.h>
+
/* These routines allocate space for an object. The assumption is
that the object will want to allocate space as it goes along, but
will never want to free any particular block. There is a function
--- gcc-2.95.3/libiberty/argv.c 2012-02-17 22:23:09.927783521 -0800
+++ gcc-2.95.3/libiberty/argv.c 2012-02-17 22:24:19.035714384 -0800
@@ -40,7 +40,6 @@
extern void *malloc (size_t size); /* 4.10.3.3 */
extern void *realloc (void *ptr, size_t size); /* 4.10.3.4 */
extern void free (void *ptr); /* 4.10.3.2 */
-extern char *strdup (const char *s); /* Non-ANSI */
#else /* !__STDC__ */
--- gcc-2.95.3/libiberty/argv.c 2012-02-17 23:18:18.000000000 -0800
+++ gcc-2.95.3/libiberty/argv.c 2012-02-17 23:23:39.000000000 -0800
@@ -35,11 +35,13 @@
#ifdef __STDC__
#include <stddef.h>
+#ifndef __APPLE__
extern void *memcpy (void *s1, const void *s2, size_t n); /* 4.11.2.1 */
extern size_t strlen (const char *s); /* 4.11.6.3 */
extern void *malloc (size_t size); /* 4.10.3.3 */
extern void *realloc (void *ptr, size_t size); /* 4.10.3.4 */
extern void free (void *ptr); /* 4.10.3.2 */
+#endif
#else /* !__STDC__ */
--- gcc-2.95.3/libiberty/strerror.c 2012-02-17 23:24:34.000000000 -0800
+++ gcc-2.95.3/libiberty/strerror.c 2012-02-17 23:25:04.000000000 -0800
@@ -29,8 +29,10 @@
#ifdef __STDC__
#include <stddef.h>
+#ifndef __APPLE__
extern void *malloc (size_t size); /* 4.10.3.3 */
extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */
+#endif
#else /* !__STDC__ */
extern char *malloc (); /* Standard memory allocater */
extern char *memset ();
--- gcc-2.95.3/libiberty/strsignal.c 2012-02-17 23:25:29.000000000 -0800
+++ gcc-2.95.3/libiberty/strsignal.c 2012-02-17 23:25:44.000000000 -0800
@@ -25,8 +25,10 @@
#ifdef __STDC__
#include <stddef.h>
+#ifndef __APPLE__
extern void *malloc (size_t size); /* 4.10.3.3 */
extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */
+#endif
#else /* !__STDC__ */
extern char *malloc (); /* Standard memory allocater */
extern char *memset ();