head 1.2; access; symbols pkgsrc-2019Q4:1.1.0.58 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.54 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.52 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.50 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.48 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.46 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.44 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.42 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.40 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.38 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.34 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.32 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.30 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.28 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.26 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.24 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.22 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.20 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.18 pkgsrc-2015Q2-base:1.1 pkgsrc-2015Q1:1.1.0.16 pkgsrc-2015Q1-base:1.1 pkgsrc-2014Q4:1.1.0.14 pkgsrc-2014Q4-base:1.1 pkgsrc-2014Q3:1.1.0.12 pkgsrc-2014Q3-base:1.1 pkgsrc-2014Q2:1.1.0.10 pkgsrc-2014Q2-base:1.1 pkgsrc-2014Q1:1.1.0.8 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.6 pkgsrc-2013Q4-base:1.1 pkgsrc-2013Q3:1.1.0.4 pkgsrc-2013Q3-base:1.1 pkgsrc-2013Q2:1.1.0.2 pkgsrc-2013Q2-base:1.1; locks; strict; comment @# @; 1.2 date 2020.02.11.15.52.18; author nia; state dead; branches; next 1.1; commitid nTJRuCEsQvWSVgWB; 1.1 date 2013.06.17.12.43.28; author wiz; state Exp; branches; next ; commitid pCJW2RO3HwjB0YTw; desc @@ 1.2 log @lang: Remove mono2. This version is long obsolete and nothing in pkgsrc needs it any more. Use lang/mono6 or lang/mono depending on your platform. @ text @$NetBSD: patch-ah,v 1.1 2013/06/17 12:43:28 wiz Exp $ --- mono/utils/mono-semaphore.c.orig 2011-01-04 19:39:55.000000000 +0200 +++ mono/utils/mono-semaphore.c 2011-01-08 18:52:28.000000000 +0200 @@@@ -22,7 +22,7 @@@@ # ifdef USE_MACH_SEMA # define TIMESPEC mach_timespec_t # define WAIT_BLOCK(a,b) semaphore_timedwait (*(a), *(b)) -# elif defined(__OpenBSD__) +# elif (defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)) # define TIMESPEC struct timespec # define WAIT_BLOCK(a) sem_trywait(a) # else @@@@ -34,12 +34,13 @@@@ int mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable) { +#if (defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) + uint32_t timeout = timeout_ms; +#else TIMESPEC ts, copy; struct timeval t; - int res = 0; -#if defined(__OpenBSD__) - int timeout; #endif + int res = 0; #ifndef USE_MACH_SEMA if (timeout_ms == 0) @@@@ -48,6 +49,19 @@@@ if (timeout_ms == (guint32) 0xFFFFFFFF) return mono_sem_wait (sem, alertable); +#if (defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) + if (timeout < 50) + timeout += 50; + do { + if ((res = WAIT_BLOCK(sem)) == 0) + break; + usleep(50000); + timeout -= 50; + if (alertable) /* XXX: Not on EINTR */ + return -1; + } while (timeout > 50); +#else + #ifdef USE_MACH_SEMA memset (&t, 0, sizeof (TIMESPEC)); #else @@@@ -59,19 +73,6 @@@@ ts.tv_nsec -= NSEC_PER_SEC; ts.tv_sec++; } -#if defined(__OpenBSD__) - timeout = ts.tv_sec; - while (timeout) { - if ((res = WAIT_BLOCK (sem)) == 0) - return res; - - if (alertable) - return -1; - - usleep (ts.tv_nsec / 1000); - timeout--; - } -#else copy = ts; while ((res = WAIT_BLOCK (sem, &ts)) == -1 && errno == EINTR) { struct timeval current; @ 1.1 log @Import mono-2.10.9nb3 as lang/mono2. The Mono Project is an open development initiative sponsored by Ximian that is working to develop an open source, Unix version of the Microsoft .NET development platform. Its objective is to enable Unix developers to build and deploy cross-platform .NET Applications. The project will implement various technologies developed by Microsoft that have now been submitted to the ECMA for standardization. This package contains the major version 2 of mono. @ text @d1 1 a1 1 $NetBSD: patch-ah,v 1.13 2011/01/08 18:06:00 kefren Exp $ @