summaryrefslogtreecommitdiff
path: root/audio/csound5/patches/patch-ai
blob: dfaf7b58bacdd2368622b041be7009be8fa72e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ai,v 1.3 2009/08/03 13:28:22 joerg Exp $

--- InOut/widgets.cpp.orig	2006-02-15 19:25:55.000000000 +0100
+++ InOut/widgets.cpp
@@ -29,7 +29,7 @@
 #  include <windows.h>
 #endif /* defined(WIN32) */
 
-#if defined(LINUX)
+#if defined(LINUX) || defined(__NetBSD__) || defined(__DragonFly__)
 #  include <pthread.h>
 #  include <sched.h>
 #  include <sys/time.h>
@@ -1722,7 +1722,7 @@ static uintptr_t fltkRun(void *userdata)
 
   p = (widgetsGlobals_t*) csound->QueryGlobalVariable(csound,
                                                       "_widgets_globals");
-#ifdef LINUX
+#if defined(LINUX) || defined(__NetBSD__) || defined(__DragonFly__)
   {
     struct sched_param  sp;
     // IV - Aug 27 2002: widget thread is always run with normal priority
@@ -2579,7 +2579,7 @@ extern "C" int fl_setTextType(CSOUND *cs
   return OK;
 }
 
-extern "C" int fl_box(CSOUND *csound, FL_BOX *p)
+extern "C" int my_fl_box(CSOUND *csound, FL_BOX *p)
 {
   char *text = GetString(csound, p->itext, p->XSTRCODE);
   Fl_Box *o =  new Fl_Box((int)*p->ix, (int)*p->iy,
@@ -3612,7 +3612,7 @@ static OENTRY localops[] = {
     { "FLsetAlign",     S(FL_TALIGN),           1,  "",     "ii",
         (SUBR) fl_align,                (SUBR) NULL,              (SUBR) NULL },
     { "FLbox",          S(FL_BOX),              1,  "i",    "Tiiiiiii",
-        (SUBR) fl_box,                  (SUBR) NULL,              (SUBR) NULL },
+        (SUBR) my_fl_box, 		(SUBR) NULL,              (SUBR) NULL },
     { "FLvalue",        S(FLVALUE),             1,  "i",    "Tjjjj",
         (SUBR) fl_value,                (SUBR) NULL,              (SUBR) NULL },
     { "FLpanel",        S(FLPANEL),             1,  "",     "Tjjooo",