Remove workarounds now that _SC_NPROCESSORS_ONLN/_SC_NPROCESSORS_CONF

have been added to libc. Needs new libc before building. From Brad; ok jasper
This commit is contained in:
sthen 2010-01-15 09:07:27 +00:00
parent 56012ebb09
commit 52500bb238
4 changed files with 4 additions and 63 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.1.1.1 2009/07/18 08:53:08 sthen Exp $
# $OpenBSD: Makefile,v 1.2 2010/01/15 09:07:27 sthen Exp $
COMMENT= high-speed Dirac codec
DISTNAME= schroedinger-1.0.7
PKGNAME= ${DISTNAME}p0
CATEGORIES= multimedia
MASTER_SITES= ${HOMEPAGE}download/schroedinger/

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-schroedinger_schroasync-pthread_c,v 1.1.1.1 2009/07/18 08:53:08 sthen Exp $
--- schroedinger/schroasync-pthread.c.orig Thu Jul 2 15:32:36 2009
+++ schroedinger/schroasync-pthread.c Thu Jul 2 15:35:33 2009
@@ -20,6 +20,12 @@
#include <sys/sysctl.h>
#endif
+#if defined(__OpenBSD__)
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <machine/cpu.h>
+#endif
+
struct _SchroAsync {
int n_threads;
int n_threads_running;
@@ -95,7 +101,7 @@ schro_async_new(int n_threads,
if (s) {
n_threads = atoi(s);
}
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__OpenBSD__)
{
int mib[] = {CTL_HW, HW_NCPU};
size_t dataSize = sizeof(int);

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.9 2009/07/18 10:56:29 sthen Exp $
# $OpenBSD: Makefile,v 1.10 2010/01/15 09:07:27 sthen Exp $
COMMENT= ISO MPEG-4 compliant video codec
DISTNAME= xvidcore-1.2.2
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= multimedia
MASTER_SITES= http://downloads.xvid.org/downloads/

View File

@ -1,35 +0,0 @@
$OpenBSD: patch-src_xvid_c,v 1.1 2009/05/10 20:16:10 sthen Exp $
--- src/xvid.c.orig Thu Apr 9 04:03:26 2009
+++ src/xvid.c Thu Apr 9 04:17:31 2009
@@ -32,6 +32,12 @@
#include <unistd.h>
#endif
+#if defined(__OpenBSD__)
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
+ #include <machine/cpu.h>
+#endif
+
#include "xvid.h"
#include "decoder.h"
#include "encoder.h"
@@ -675,6 +681,18 @@ xvid_gbl_info(xvid_gbl_info_t * info)
SYSTEM_INFO siSysInfo;
GetSystemInfo(&siSysInfo);
info->num_threads = siSysInfo.dwNumberOfProcessors; /* number of _logical_ cores */
+ }
+
+#elif defined(__OpenBSD__)
+
+ {
+ int ncpu, mib[2] = { CTL_HW, HW_NCPU };
+ size_t length = sizeof (ncpu);
+
+ if (sysctl(mib, 2, &ncpu, &length, NULL, 0))
+ ncpu = 1;
+
+ info->num_threads = ncpu;
}
#else