--- gcc-4.0.3.orig/gcc/tlink.c	2004-11-09 11:12:19.000000000 +0100
+++ gcc-4.0.3.new/gcc/tlink.c	2005-06-22 13:01:44.000000000 +0200
@@ -34,6 +34,10 @@
 
 #define MAX_ITERATIONS 17
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 /* Defined in the automatically-generated underscore.c.  */
 extern int prepends_underscore;
 
--- gcc-4.0.3.orig/gcc/gthr-posix.h	2005-07-19 13:58:06.000000000 +0200
+++ gcc-4.0.3.new/gcc/gthr-posix.h	2005-07-23 17:28:14.000000000 +0200
@@ -40,6 +40,13 @@
 #define _REENTRANT 1
 #endif
 
+#pragma weak _pthread_mutex_lock
+#pragma weak _pthread_mutex_trylock
+#pragma weak _pthread_mutex_unlock
+
+#pragma weak _pthread_mutex_init
+#pragma weak _pthread_mutex_destroy
+
 #include <pthread.h>
 #include <unistd.h>
 
--- gcc-4.0.3.orig/gcc/ada/adaint.c	2005-08-01 23:10:02.000000000 +0200
+++ gcc-4.0.3.new/gcc/ada/adaint.c	2005-08-01 23:11:10.000000000 +0200
@@ -261,6 +261,10 @@
 #include <sys/param.h>
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 #define GNAT_MAX_PATH_LEN MAXPATHLEN
 
 #endif

