summaryrefslogtreecommitdiff
path: root/lang/mono/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/mono/files')
-rw-r--r--lang/mono/files/patch-configure30
-rw-r--r--lang/mono/files/patch-libgc_configure21
-rw-r--r--lang/mono/files/patch-mcs_class_MWF_build-csproj11
-rw-r--r--lang/mono/files/patch-mcs_class_System_System.IO_KeventWatcher.cs196
-rw-r--r--lang/mono/files/patch-mcs_class_System_System.Net.Sockets_Socket.cs30
-rw-r--r--lang/mono/files/patch-mcs_tools_gensources.sh8
-rw-r--r--lang/mono/files/patch-mcs_tools_mkbundle_mkbundle.cs11
-rw-r--r--lang/mono/files/patch-mono_metadata_appdomain.c19
-rw-r--r--lang/mono/files/patch-mono_metadata_class.c17
-rw-r--r--lang/mono/files/patch-mono_metadata_socket-io.c11
-rw-r--r--lang/mono/files/patch-mono_mini_mini-ppc.h20
-rw-r--r--lang/mono/files/patch-mono_mini_mini-x86.h11
-rw-r--r--lang/mono/files/patch-mono_tests_libtest.c14
-rw-r--r--lang/mono/files/patch-mono_utils_mono-proclib.c12
14 files changed, 217 insertions, 194 deletions
diff --git a/lang/mono/files/patch-configure b/lang/mono/files/patch-configure
index eac067363dbc..c87eab20d235 100644
--- a/lang/mono/files/patch-configure
+++ b/lang/mono/files/patch-configure
@@ -1,27 +1,10 @@
$FreeBSD$
+https://bugzilla.novell.com/show_bug.cgi?id=553640
+
--- configure.orig
+++ configure
-@@ -2958,7 +2958,8 @@
- LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
- libmono_ldflags="$PTHREAD_LIBS"
- fi
-- CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
-+ CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD6 -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
-+ libmono_cflags="$libmono_cflags -D_REENTRANT"
- need_link_unlink=yes
-
- cat >>confdefs.h <<\_ACEOF
-@@ -2972,7 +2973,7 @@
- # TLS is only partially implemented on -CURRENT (compiler support
- # but NOT library support)
- #
-- with_tls=pthread
-+# with_tls=pthread
- ;;
- *-*-*openbsd*)
- platform_win32=no
@@ -39414,8 +39415,8 @@
INTERP_SUPPORTED=no
LIBC="libc.so.6"
@@ -33,12 +16,3 @@ $FreeBSD$
X11="libX11.so"
sizeof_register="SIZEOF_VOID_P"
-@@ -39675,7 +39676,7 @@
- jit_wanted=true
- ;;
- macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
-- powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* )
-+ powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
- if test "x$ac_cv_sizeof_void_p" = "x8"; then
- TARGET=POWERPC64;
- CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
diff --git a/lang/mono/files/patch-libgc_configure b/lang/mono/files/patch-libgc_configure
deleted file mode 100644
index 3b4bb4332167..000000000000
--- a/lang/mono/files/patch-libgc_configure
+++ /dev/null
@@ -1,21 +0,0 @@
-
-$FreeBSD$
-
---- libgc/configure.orig
-+++ libgc/configure
-@@ -4641,7 +4641,14 @@
- cat >>confdefs.h <<\_ACEOF
- #define GC_FREEBSD_THREADS 1
- _ACEOF
--
-+ if test "${enable_parallel_mark}" = yes; then
-+ cat >>confdefs.h <<\_ACEOF
-+#define PARALLEL_MARK 1
-+_ACEOF
-+ fi
-+ cat >>confdefs.h <<\_ACEOF
-+#define THREAD_LOCAL_ALLOC 1 //only for tls=__thread. delete for pthread.
-+_ACEOF
- if test "x$PTHREAD_CFLAGS" != "x"; then
- INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
- fi
diff --git a/lang/mono/files/patch-mcs_class_MWF_build-csproj b/lang/mono/files/patch-mcs_class_MWF_build-csproj
deleted file mode 100644
index 9d069f58fa87..000000000000
--- a/lang/mono/files/patch-mcs_class_MWF_build-csproj
+++ /dev/null
@@ -1,11 +0,0 @@
---- mcs/class/Managed.Windows.Forms/build-csproj.orig Thu Apr 19 21:32:15 2007
-+++ mcs/class/Managed.Windows.Forms/build-csproj Mon Apr 23 20:21:51 2007
-@@ -177,7 +177,7 @@
- {
- cat $Resource | while read SRC; do
- SRC=`echo $SRC | $tr '/' '\\\\'`
--SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
-+SRC=`echo $SRC | sed 's/-resource://' | awk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
-
- cat << EOT
- <File
diff --git a/lang/mono/files/patch-mcs_class_System_System.IO_KeventWatcher.cs b/lang/mono/files/patch-mcs_class_System_System.IO_KeventWatcher.cs
new file mode 100644
index 000000000000..63a16f16c45e
--- /dev/null
+++ b/lang/mono/files/patch-mcs_class_System_System.IO_KeventWatcher.cs
@@ -0,0 +1,196 @@
+
+$FreeBSD$
+
+https://bugzilla.novell.com/show_bug.cgi?id=542485
+
+--- mcs/class/System/System.IO/KeventWatcher.cs.orig
++++ mcs/class/System/System.IO/KeventWatcher.cs
+@@ -38,11 +38,11 @@
+ namespace System.IO {
+
+ struct kevent : IDisposable {
+- public int ident;
++ public IntPtr ident;
+ public short filter;
+ public ushort flags;
+ public uint fflags;
+- public int data;
++ public IntPtr data;
+ public IntPtr udata;
+
+ public void Dispose ()
+@@ -53,8 +53,8 @@
+ }
+
+ struct timespec {
+- public int tv_sec;
+- public int tv_usec;
++ public IntPtr tv_sec;
++ public IntPtr tv_usec;
+ }
+
+ class KeventFileData {
+@@ -88,6 +88,31 @@
+ static Thread thread;
+ static int conn;
+ static bool stop;
++
++ /* Flags */
++
++ const int EV_ADD = 0x0001; /* add event to kq (implies enable) */
++ const int EV_DELETE = 0x0002; /* delete event from kq */
++ const int EV_ENABLE = 0x0004; /* enable event */
++ const int EV_DISABLE = 0x0008; /* disable event (not reported) */
++ const int EV_ONESHOT = 0x0010; /* only report one occurrence */
++ const int EV_CLEAR = 0x0020; /* clear event state after reporting */
++ const int EV_EOF = 0x8000; /* EOF detected */
++ const int EV_ERROR = 0x4000; /* error, data contains errno */
++
++ /* System defined filters */
++ const int EVFILT_READ = -1;
++ const int EVFILT_VNODE = -4; /* attached to vnodes */
++
++ /* Events */
++
++ const int NOTE_DELETE = 0x0001; /* vnode was removed */
++ const int NOTE_WRITE = 0x0002; /* data contents changed */
++ const int NOTE_EXTEND = 0x0004; /* size increased */
++ const int NOTE_ATTRIB = 0x0008; /* attributes changed */
++ const int NOTE_LINK = 0x0010; /* link count changed */
++ const int NOTE_RENAME = 0x0020; /* vnode was renamed */
++ const int NOTE_REVOKE = 0x0040; /* vnode access was revoked */
+
+ private KeventWatcher ()
+ {
+@@ -142,9 +167,9 @@
+
+ data.Enabled = true;
+ lock (this) {
++ stop = false;
+ StartMonitoringDirectory (data);
+ watches [fsw] = data;
+- stop = false;
+ }
+ }
+ }
+@@ -162,20 +187,23 @@
+ kevent ev = new kevent();
+ ev.udata = IntPtr.Zero;
+ timespec nullts = new timespec();
+- nullts.tv_sec = 0;
+- nullts.tv_usec = 0;
++ nullts.tv_sec = IntPtr.Zero;
++ nullts.tv_usec = IntPtr.Zero;
+ if (fd > 0) {
+- ev.ident = fd;
+- ev.filter = -4;
+- ev.flags = 1 | 4 | 20;
+- ev.fflags = 20 | 2 | 1 | 8;
+- ev.data = 0;
++ ev.ident = (IntPtr)fd;
++ ev.filter = EVFILT_VNODE;
++ ev.flags = EV_ADD | EV_ENABLE | EV_CLEAR;
++ ev.fflags = NOTE_RENAME | NOTE_WRITE | NOTE_DELETE | NOTE_ATTRIB;
++ ev.data = IntPtr.Zero;
+ ev.udata = Marshal.StringToHGlobalAuto (data.Directory);
+ kevent outev = new kevent();
+ outev.udata = IntPtr.Zero;
+- kevent (conn, ref ev, 1, ref outev, 0, ref nullts);
++ int ret = kevent (conn, ref ev, 1, ref outev, 0, ref nullts);
++ if ((ret == -1) || ((ev.flags & EV_ERROR) > 0)) {
++ return;
++ }
+ data.ev = ev;
+- requests [fd] = data;
++ requests [(IntPtr)fd] = data;
+ }
+
+ if (!data.IncludeSubdirs)
+@@ -204,31 +232,35 @@
+
+ static void StopMonitoringDirectory (KeventData data)
+ {
+- close(data.ev.ident);
++ close((int)(data.ev.ident));
+ }
+
+ void Monitor ()
+ {
+-
++
+ while (!stop) {
+ kevent ev = new kevent();
+ ev.udata = IntPtr.Zero;
+ kevent nullev = new kevent();
+ nullev.udata = IntPtr.Zero;
+ timespec ts = new timespec();
+- ts.tv_sec = 0;
+- ts.tv_usec = 0;
++ ts.tv_sec = IntPtr.Zero;
++ ts.tv_usec = IntPtr.Zero;
+ int haveEvents;
+ lock (this) {
+ haveEvents = kevent (conn, ref nullev, 0, ref ev, 1, ref ts);
+ }
+
+- if (haveEvents > 0) {
+- // Restart monitoring
+- KeventData data = (KeventData) requests [ev.ident];
+- StopMonitoringDirectory (data);
+- StartMonitoringDirectory (data);
+- ProcessEvent (ev);
++ if (haveEvents != 0) {
++ if ((haveEvents == -1) || ((ev.flags & EV_ERROR) > 0)) {
++ Error ();
++ } else {
++ // Restart monitoring
++ KeventData data = (KeventData) requests [(IntPtr)(ev.ident)];
++ StopMonitoringDirectory (data);
++ StartMonitoringDirectory (data);
++ ProcessEvent (ev);
++ }
+ } else {
+ System.Threading.Thread.Sleep (500);
+ }
+@@ -240,10 +272,18 @@
+ }
+ }
+
++ void Error ()
++ {
++ // Something went wrong. Stop the thread.
++ lock (this) {
++ stop = true;
++ }
++ }
++
+ void ProcessEvent (kevent ev)
+ {
+ lock (this) {
+- KeventData data = (KeventData) requests [ev.ident];
++ KeventData data = (KeventData) requests [(IntPtr)(ev.ident)];
+ if (!data.Enabled)
+ return;
+
+@@ -265,7 +305,7 @@
+ data.DirEntries [fsi.FullName] = new KeventFileData(fsi, fsi.LastAccessTime, fsi.LastWriteTime);
+ if (fsw.IncludeSubdirectories && fsi is DirectoryInfo) {
+ data.Directory = filename;
+- requests [ev.ident] = data;
++ requests [(IntPtr)(ev.ident)] = data;
+ ProcessEvent(ev);
+ }
+ PostEvent(filename, fsw, fa, changedFsi);
+@@ -348,10 +388,10 @@
+ [DllImport ("libc")]
+ extern static int close(int fd);
+
+- [DllImport ("libc")]
++ [DllImport ("libc", SetLastError=true)]
+ extern static int kqueue();
+
+- [DllImport ("libc")]
++ [DllImport ("libc", SetLastError=true)]
+ extern static int kevent(int kqueue, ref kevent ev, int nchanges, ref kevent evtlist, int nevents, ref timespec ts);
+ }
+ }
diff --git a/lang/mono/files/patch-mcs_class_System_System.Net.Sockets_Socket.cs b/lang/mono/files/patch-mcs_class_System_System.Net.Sockets_Socket.cs
deleted file mode 100644
index 368a6a71e7c3..000000000000
--- a/lang/mono/files/patch-mcs_class_System_System.Net.Sockets_Socket.cs
+++ /dev/null
@@ -1,30 +0,0 @@
---- mcs/class/System/System.Net.Sockets/Socket.cs.orig 2008-11-01 00:35:55.000000000 -0300
-+++ mcs/class/System/System.Net.Sockets/Socket.cs 2008-11-01 00:38:16.000000000 -0300
-@@ -1552,7 +1552,7 @@
- }
-
- int error = 0;
-- if (!blocking) {
-+// if (!blocking) {
- SocketAddress serial = end_point.Serialize ();
- Connect_internal (socket, serial, out error);
- if (error == 0) {
-@@ -1564,15 +1564,16 @@
- connected = false;
- req.Complete (new SocketException (error), true);
- }
-- }
-+// }
-
-- if (blocking || error == (int) SocketError.InProgress || error == (int) SocketError.WouldBlock) {
-+/* if (blocking || error == (int) SocketError.InProgress || error == (int) SocketError.WouldBlock) {
- // continue asynch
- connected = false;
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.Connect);
- sac.BeginInvoke (null, req);
- }
-+*/
-
- return(req);
- }
diff --git a/lang/mono/files/patch-mcs_tools_gensources.sh b/lang/mono/files/patch-mcs_tools_gensources.sh
deleted file mode 100644
index f111a86093c4..000000000000
--- a/lang/mono/files/patch-mcs_tools_gensources.sh
+++ /dev/null
@@ -1,8 +0,0 @@
---- mcs/tools/gensources.sh.orig 2008-04-03 11:08:16.000000000 -0400
-+++ mcs/tools/gensources.sh 2008-04-03 11:08:24.000000000 -0400
-@@ -1,4 +1,4 @@
--#!/usr/bin/env bash
-+#!/usr/bin/env sh
-
- includefile=$1
- excludefile=$2
diff --git a/lang/mono/files/patch-mcs_tools_mkbundle_mkbundle.cs b/lang/mono/files/patch-mcs_tools_mkbundle_mkbundle.cs
deleted file mode 100644
index 23bab51163c9..000000000000
--- a/lang/mono/files/patch-mcs_tools_mkbundle_mkbundle.cs
+++ /dev/null
@@ -1,11 +0,0 @@
---- mcs/tools/mkbundle/mkbundle.cs.orig Wed Jul 5 17:57:12 2006
-+++ mcs/tools/mkbundle/mkbundle.cs Sat Sep 9 11:46:36 2006
-@@ -354,7 +354,7 @@
- smonolib = "`pkg-config --variable=libdir mono`/libmono.a ";
- else
- smonolib = "-Wl,-Bstatic -lmono -Wl,-Bdynamic ";
-- cmd = String.Format ("{4} -o {2} -Wall `pkg-config --cflags mono` {0} {3} " +
-+ cmd = String.Format ("{4} -o {2} -pthread -Wall `pkg-config --cflags mono` {0} {3} " +
- "`pkg-config --libs-only-L mono` " + smonolib +
- "`pkg-config --libs-only-l mono | sed -e \"s/\\-lmono //\"` {1}",
- temp_c, temp_o, output, zlib, cc);
diff --git a/lang/mono/files/patch-mono_metadata_appdomain.c b/lang/mono/files/patch-mono_metadata_appdomain.c
new file mode 100644
index 000000000000..376387913ecf
--- /dev/null
+++ b/lang/mono/files/patch-mono_metadata_appdomain.c
@@ -0,0 +1,19 @@
+
+$FreeBSD$
+
+https://bugzilla.novell.com/show_bug.cgi?id=528830
+
+--- mono/metadata/appdomain.c.orig
++++ mono/metadata/appdomain.c
+@@ -2322,6 +2322,11 @@
+ /* The icall wrapper will execute the abort */
+ CloseHandle (thread_handle);
+ return;
++ } else if (!mono_thread_has_appdomain_ref (mono_thread_current (), domain) && !(mono_thread_interruption_requested ())) {
++ if (!domain->friendly_name) {
++ CloseHandle (thread_handle);
++ return;
++ }
+ }
+ }
+ CloseHandle (thread_handle);
diff --git a/lang/mono/files/patch-mono_metadata_class.c b/lang/mono/files/patch-mono_metadata_class.c
deleted file mode 100644
index 9075cfce9d62..000000000000
--- a/lang/mono/files/patch-mono_metadata_class.c
+++ /dev/null
@@ -1,17 +0,0 @@
-
-$FreeBSD$
-
---- mono/metadata/class.c.orig
-+++ mono/metadata/class.c
-@@ -7648,7 +7648,10 @@
- gboolean
- mono_class_generic_sharing_enabled (MonoClass *class)
- {
--#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__mono_ppc__)
-+#if defined(__FreeBSD__) && defined(__x86_64__)
-+ /* https://bugzilla.novell.com/show_bug.cgi?id=434457 */
-+ static gboolean supported = FALSE;
-+#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__mono_ppc__)
- static gboolean supported = TRUE;
- #else
- /* Not supported by the JIT backends */
diff --git a/lang/mono/files/patch-mono_metadata_socket-io.c b/lang/mono/files/patch-mono_metadata_socket-io.c
deleted file mode 100644
index bc570787bc78..000000000000
--- a/lang/mono/files/patch-mono_metadata_socket-io.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- mono/metadata/socket-io.c.orig Wed Nov 22 18:27:54 2006
-+++ mono/metadata/socket-io.c Wed Nov 22 18:28:11 2006
-@@ -2653,7 +2653,7 @@
- struct sockaddr_in6 saddr6;
- struct addrinfo *info = NULL, hints;
- gint32 family;
-- char hostname[1024] = {0};
-+ char hostname[NI_MAXHOST] = {0};
- int flags = 0;
- #else
- struct in_addr inaddr;
diff --git a/lang/mono/files/patch-mono_mini_mini-ppc.h b/lang/mono/files/patch-mono_mini_mini-ppc.h
deleted file mode 100644
index a93f779674f2..000000000000
--- a/lang/mono/files/patch-mono_mini_mini-ppc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-$FreeBSD$
-
---- mono/mini/mini-ppc.h.orig
-+++ mono/mini/mini-ppc.h
-@@ -281,6 +281,14 @@
- #define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.__fpregs.__fpu_regs [(n)])
- #define UCONTEXT_REG_NIP(ctx) _UC_MACHINE_PC(ctx)
- #define UCONTEXT_REG_LNK(ctx) ((ctx)->uc_mcontext.__gregs [_REG_LR])
-+#elif defined(__FreeBSD__)
-+#include <ucontext.h>
-+ typedef ucontext_t os_ucontext;
-+
-+ #define UCONTEXT_REG_Rn(ctx, n) ((ctx)->uc_mcontext.mc_gpr [(n)])
-+ #define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.mc_fpreg [(n)])
-+ #define UCONTEXT_REG_NIP(ctx) ((ctx)->uc_mcontext.mc_srr0)
-+ #define UCONTEXT_REG_LNK(ctx) ((ctx)->uc_mcontext.mc_lr)
- #else
- #error Unknown OS
- #endif
diff --git a/lang/mono/files/patch-mono_mini_mini-x86.h b/lang/mono/files/patch-mono_mini_mini-x86.h
deleted file mode 100644
index c907d59837b9..000000000000
--- a/lang/mono/files/patch-mono_mini_mini-x86.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- mono/mini/mini-x86.h.orig 2008-12-11 21:27:14.000000000 -0300
-+++ mono/mini/mini-x86.h 2008-12-11 21:27:35.000000000 -0300
-@@ -43,7 +43,7 @@
-
- #endif /* PLATFORM_WIN32 */
-
--#if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__)
-+#if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
- #define MONO_ARCH_USE_SIGACTION
- #endif
-
diff --git a/lang/mono/files/patch-mono_tests_libtest.c b/lang/mono/files/patch-mono_tests_libtest.c
deleted file mode 100644
index 24a29481d1cd..000000000000
--- a/lang/mono/files/patch-mono_tests_libtest.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- mono/tests/libtest.c.orig
-+++ mono/tests/libtest.c
-@@ -2978,7 +2978,7 @@
- * mono_method_get_unmanaged_thunk tests
- */
-
--#if defined(__GNUC__) && ((defined(__i386__) && (defined(__linux__) || defined (__APPLE__))) || (defined(__ppc__) && defined(__APPLE__)))
-+#if defined(__GNUC__) && ((defined(__i386__) && (defined(__linux__) || defined (__APPLE__)) || defined (__FreeBSD__)) || (defined(__ppc__) && defined(__APPLE__)))
- #define ALIGN(size) __attribute__ ((aligned(size)))
- #else
- #define ALIGN(size)
diff --git a/lang/mono/files/patch-mono_utils_mono-proclib.c b/lang/mono/files/patch-mono_utils_mono-proclib.c
deleted file mode 100644
index 5eb7d4864c0a..000000000000
--- a/lang/mono/files/patch-mono_utils_mono-proclib.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- mono/utils/mono-proclib.c.orig 2009-03-08 16:22:48.000000000 +0000
-+++ mono/utils/mono-proclib.c 2009-03-08 16:23:02.000000000 +0000
-@@ -13,6 +13,9 @@
- #endif
-
- /* FIXME: bsds untested */
-+#if defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
- #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
- #include <sys/types.h>
- #include <sys/sysctl.h>