Add fix for bug #106971, and remove some unneeded '|| die' text.
authorPeter Johanson <latexer@gentoo.org>
Sat, 24 Sep 2005 21:00:07 +0000 (21:00 +0000)
committerPeter Johanson <latexer@gentoo.org>
Sat, 24 Sep 2005 21:00:07 +0000 (21:00 +0000)
Package-Manager: portage-2.0.51.22-r2

dev-lang/mono/ChangeLog
dev-lang/mono/Manifest
dev-lang/mono/files/mono-1.1.9.1-io-layer-fix.diff [new file with mode: 0644]
dev-lang/mono/mono-1.1.9.1.ebuild

index 00d17d568bb84f60978371b98c0d5eb91093f915..9f12ae4362a612e3cf105bb4832924ee3dfd6227 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-lang/mono
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mono/ChangeLog,v 1.59 2005/09/22 22:37:46 latexer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mono/ChangeLog,v 1.60 2005/09/24 21:00:06 latexer Exp $
+
+  24 Sep 2005; Peter Johanson <latexer@gentoo.org>
+  +files/mono-1.1.9.1-io-layer-fix.diff, mono-1.1.9.1.ebuild:
+  Add fix for bug #106971, and remove some unneeded '|| die' text.
 
 *mono-1.1.9.1 (22 Sep 2005)
 
index 509b61ce4779b9bcd71efc96d114dee8ce40e8d5..eccfdcbc7e27896a5dff0e4aa44b770d9b5587b0 100644 (file)
@@ -3,8 +3,8 @@ MD5 a26e3dfefdd6e8d9991627030f6c8e33 mono-1.1.8.2.ebuild 2264
 MD5 10c58186e6ce0ab643d16c883f2071ff mono-1.0.5-r5.ebuild 3718
 MD5 b9e80f65b4235c829ff1d67b5b1740f8 mono-1.0.6.ebuild 3693
 MD5 bee0ab0027a903bd17143fd0a35dff9f mono-1.1.8.1.ebuild 2264
-MD5 d02a5a84cf04f8cdb2d1683740d72161 mono-1.1.9.1.ebuild 2218
-MD5 f2af9618ffd2a37573c9e28a0badc57a ChangeLog 18587
+MD5 2a824cae047be7a6790d688b671521a1 mono-1.1.9.1.ebuild 2271
+MD5 89db5426fa76ebbc88026ae031d11182 ChangeLog 18768
 MD5 76b314cc7b7b79b298dd4889dff8c9cd metadata.xml 159
 MD5 11d665ed756230c132abd852c40da43e mono-1.1.8.3.ebuild 2488
 MD5 37e534333d18587029873b843d639840 mono-1.1.7-r1.ebuild 2546
@@ -27,3 +27,4 @@ MD5 85422af6a9f91917a9c9c3b8cceb5c33 files/mono-1.1.7-ppc-tls.diff 412
 MD5 2acaae80bdfac5c08af32cfd24b36c43 files/mono-1.1.8.3-array-getvalue.diff 1327
 MD5 f82809daef4d783797094233672feb3f files/mono-1.1.8.3-icall.diff 433
 MD5 e57f70fb8569f040ed1b4669c3e07652 files/digest-mono-1.1.8.3 66
+MD5 25426f960f7fc04c8932375f20885eda files/mono-1.1.9.1-io-layer-fix.diff 5552
diff --git a/dev-lang/mono/files/mono-1.1.9.1-io-layer-fix.diff b/dev-lang/mono/files/mono-1.1.9.1-io-layer-fix.diff
new file mode 100644 (file)
index 0000000..a42d748
--- /dev/null
@@ -0,0 +1,206 @@
+Index: mono/io-layer/handles.c
+===================================================================
+--- mono/io-layer/handles.c    (revision 50600)
++++ mono/io-layer/handles.c    (working copy)
+@@ -351,10 +351,6 @@
+               _wapi_private_handle_count += _WAPI_HANDLE_INITIAL_COUNT;
+       }
+               
+-      thr_ret = mono_mutex_unlock (&scan_mutex);
+-      g_assert (thr_ret == 0);
+-      pthread_cleanup_pop (0);
+-              
+       /* Make sure we left the space for fd mappings */
+       g_assert (handle_idx >= _wapi_fd_reserve);
+       
+@@ -375,7 +371,8 @@
+                                                         handle_specific);
+                       if (offset == 0) {
+                               /* FIXME: grow the arrays */
+-                              return (_WAPI_HANDLE_INVALID);
++                              handle = _WAPI_HANDLE_INVALID;
++                              goto done;
+                       }
+               }
+               
+@@ -386,7 +383,8 @@
+ 
+                       if (ref == 0) {
+                               /* FIXME: grow the arrays */
+-                              return (_WAPI_HANDLE_INVALID);
++                              handle = _WAPI_HANDLE_INVALID;
++                              goto done;
+                       }
+               }
+               
+@@ -396,6 +394,11 @@
+                          ref);
+ #endif
+       }
++              
++done:
++      thr_ret = mono_mutex_unlock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      pthread_cleanup_pop (0);
+       
+       return(handle);
+ }
+@@ -403,7 +406,7 @@
+ gpointer _wapi_handle_new_from_offset (WapiHandleType type, guint32 offset)
+ {
+       guint32 handle_idx = 0;
+-      gpointer handle;
++      gpointer handle = INVALID_HANDLE_VALUE;
+       int thr_ret, i, k;
+       
+       mono_once (&shared_init_once, shared_init);
+@@ -417,6 +420,11 @@
+       g_assert(_WAPI_SHARED_HANDLE(type));
+       g_assert(offset != 0);
+               
++      pthread_cleanup_push ((void(*)(void *))mono_mutex_unlock_in_cleanup,
++                            (void *)&scan_mutex);
++      thr_ret = mono_mutex_lock (&scan_mutex);
++      g_assert (thr_ret == 0);
++
+       for (i = SLOT_INDEX (0); _wapi_private_handles [i] != NULL; i++) {
+               for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
+                       struct _WapiHandleUnshared *handle_data = &_wapi_private_handles [i][k];
+@@ -424,14 +432,24 @@
+                       if (handle_data->type == type &&
+                           handle_data->u.shared.offset == offset) {
+                               handle = GUINT_TO_POINTER (i * _WAPI_HANDLE_INITIAL_COUNT + k);
+-                              _wapi_handle_ref (handle);
++                              goto first_pass_done;
++                      }
++              }
++      }
+ 
++first_pass_done:
++      thr_ret = mono_mutex_unlock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      pthread_cleanup_pop (0);
++
++      if (handle != INVALID_HANDLE_VALUE) {
++              _wapi_handle_ref (handle);
++
+ #ifdef DEBUG
+-                              g_message ("%s: Returning old handle %p referencing 0x%x", __func__, handle, offset);
++              g_message ("%s: Returning old handle %p referencing 0x%x",
++                         __func__, handle, offset);
+ #endif
+-                              return (handle);
+-                      }
+-              }
++              return (handle);
+       }
+ 
+       pthread_cleanup_push ((void(*)(void *))mono_mutex_unlock_in_cleanup,
+@@ -713,8 +731,13 @@
+       gpointer ret = NULL;
+       guint32 i, k;
+       gboolean found = FALSE;
++      int thr_ret;
+ 
+-
++      pthread_cleanup_push ((void(*)(void *))mono_mutex_unlock_in_cleanup,
++                            (void *)&scan_mutex);
++      thr_ret = mono_mutex_lock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      
+       for (i = SLOT_INDEX (0); !found && _wapi_private_handles [i] != NULL; i++) {
+               for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
+                       handle_data = &_wapi_private_handles [i][k];
+@@ -729,6 +752,10 @@
+               }
+       }
+ 
++      thr_ret = mono_mutex_unlock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      pthread_cleanup_pop (0);
++
+       if (!found && _WAPI_SHARED_HANDLE (type)) {
+               /* Not found yet, so search the shared memory too */
+ #ifdef DEBUG
+@@ -1564,7 +1591,13 @@
+ {
+       struct _WapiHandleUnshared *handle_data;
+       guint32 i, k;
+-
++      int thr_ret;
++      
++      pthread_cleanup_push ((void(*)(void *))mono_mutex_unlock_in_cleanup,
++                            (void *)&scan_mutex);
++      thr_ret = mono_mutex_lock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      
+       for(i = SLOT_INDEX (0); _wapi_private_handles [i] != NULL; i++) {
+               for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
+                       handle_data = &_wapi_private_handles [i][k];
+@@ -1582,6 +1615,10 @@
+                       g_print ("\n");
+               }
+       }
++
++      thr_ret = mono_mutex_unlock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      pthread_cleanup_pop (0);
+ }
+ 
+ static void _wapi_shared_details (gpointer handle_info)
+@@ -1602,6 +1639,10 @@
+       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_SHARE);
+       g_assert(thr_ret == 0);
+ 
++      pthread_cleanup_push ((void(*)(void *))mono_mutex_unlock_in_cleanup,
++                            (void *)&scan_mutex);
++      thr_ret = mono_mutex_lock (&scan_mutex);
++      
+       for(i = SLOT_INDEX (0); _wapi_private_handles [i] != NULL; i++) {
+               for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
+                       struct _WapiHandleUnshared *handle = &_wapi_private_handles [i][k];
+@@ -1644,6 +1685,10 @@
+                       }
+               }
+       }
++
++      thr_ret = mono_mutex_unlock (&scan_mutex);
++      g_assert (thr_ret == 0);
++      pthread_cleanup_pop (0);
+       
+       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_SHARE);
+ 
+Index: mono/io-layer/processes.c
+===================================================================
+--- mono/io-layer/processes.c  (revision 50600)
++++ mono/io-layer/processes.c  (working copy)
+@@ -97,6 +97,11 @@
+       int status;
+       pid_t ret;
+       
++      if (_wapi_handle_issignalled (test)) {
++              /* We've already done this one */
++              return (FALSE);
++      }
++      
+       ok = _wapi_lookup_handle (test, WAPI_HANDLE_PROCESS,
+                                 (gpointer *)&process);
+       if (ok == FALSE) {
+@@ -104,14 +109,14 @@
+       }
+       
+       do {
+-              ret == waitpid (process->id, &status, WNOHANG);
++              ret = waitpid (process->id, &status, WNOHANG);
+       } while (errno == EINTR);
+       
+       if (ret <= 0) {
+               /* Process not ready for wait */
+ #ifdef DEBUG
+-              g_message ("%s: Process %d not ready for waiting for",
+-                         __func__, ret);
++              g_message ("%s: Process %d not ready for waiting for: %s",
++                         __func__, process->id, g_strerror (errno));
+ #endif
+ 
+               return (FALSE);
index 1b210d96ffabac0d73b43ecb71b07fe2f38da2c9..357b275f721c219c01ab2037495ce50bcfe20b83 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mono/mono-1.1.9.1.ebuild,v 1.1 2005/09/22 22:37:46 latexer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mono/mono-1.1.9.1.ebuild,v 1.2 2005/09/24 21:00:06 latexer Exp $
 
 inherit eutils mono flag-o-matic
 
@@ -33,10 +33,13 @@ src_unpack() {
        cd ${S}
 
        # Fix munging of Unix paths
-       epatch ${FILESDIR}/${PN}-1.1.5-pathfix.diff || die
+       epatch ${FILESDIR}/${PN}-1.1.5-pathfix.diff
 
        # Fix for linking to ICU
-       epatch ${FILESDIR}/${PN}-1.1.5-icu-linking.diff || die
+       epatch ${FILESDIR}/${PN}-1.1.5-icu-linking.diff
+
+       # Fix for bug #106971
+       epatch ${FILESDIR}/${P}-io-layer-fix.diff
 
        # Install all our .dlls under $(libdir), not $(prefix)/lib
        sed -i -e 's:$(prefix)/lib:$(libdir):' \