Finn Thain a écrit :

When I posted that patch I had not actually tried to link any other solaris apps with the pulseaudio client libraries. But Csound piqued my curiosity. So I ported it to solaris. If you want the patch and build scripts let me know.
I commited the attached patch (SConstruct and source files) in the Csound forum : not very complete, but sufficient to work with CS (some extra opcodes, FLTK widgets, etc.)


The realtime scheduling works (both csound and pulseaudio).

Here a little synthesis of my issue with Pulseaudio-09.6/Csound

https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-December/002705.html


But now the best is probably that i build Pulseaudio-09.14 with the patch you posted some days ago.

Cheers,

Sergio

Sous-répertoire : Csound5.10.1/CsoundLib.framework et Csound5.10.1_including_Solaris/CsoundLib.framework
Sous-répertoire : Csound5.10.1/Engine et Csound5.10.1_including_Solaris/Engine
Sous-répertoire : Csound5.10.1/H et Csound5.10.1_including_Solaris/H
Sous-répertoire : Csound5.10.1/InOut et Csound5.10.1_including_Solaris/InOut
Sous-répertoire : Csound5.10.1/OOps et Csound5.10.1_including_Solaris/OOps
Sous-répertoire : Csound5.10.1/Opcodes et Csound5.10.1_including_Solaris/Opcodes
diff -r -u Csound5.10.1/SConstruct Csound5.10.1_including_Solaris/SConstruct
--- Csound5.10.1/SConstruct	jeu. déc. 18 19:26:46 2008
+++ Csound5.10.1_including_Solaris/SConstruct	dim. janv.  4 21:30:40 2009
@@ -55,6 +55,8 @@
         return 'win32'
     elif sys.platform[:6] == 'darwin':
         return 'darwin'
+    elif sys.platform[:5] == 'sunos':
+        return 'sunos'    
     else:
         return 'unsupported'
 
@@ -221,6 +223,9 @@
 commandOptions.Add('withMSVC',
     'On Windows, set to 1 to build with Microsoft Visual C++, or set to 0 to build with MinGW',
     '0')
+commandOptions.Add('withSunStudio',
+    'On Solaris, set to 1 to build with Sun Studio, or set to 0 to build with gcc',
+    '1')    
 commandOptions.Add('buildNewParser',
     'Enable building new parser (requires Flex/Bison)',
     '0')
@@ -263,9 +268,15 @@
         return True
     else:
         return False
+        
+def compilerSun():
+    if getPlatform() == 'sunos' and commonEnvironment['withSunStudio'] == '1':
+        return True
+    else:
+        return False        
 
 def compilerGNU():
-    if not compilerIntel() and not compilerMicrosoft():
+    if not compilerIntel() and not compilerMicrosoft() and not compilerSun():
         return True
     else:
         return False
@@ -376,8 +387,13 @@
     buildOLPC = False
 
 # Define options for different platforms.
-if getPlatform() != 'win32':
+if getPlatform() != 'win32' and getPlatform() != 'sunos':
     print "Build platform is '" + getPlatform() + "'."
+elif getPlatform() == 'sunos':
+    if compilerSun():
+        print "Build platform is Sun Studio."
+    elif compilerGNU():
+        print "Build platform is '" + getPlatform() + "'."        
 else:
     if compilerMicrosoft():
         print "Build platform is Microsoft Visual C++ (MSVC)."
@@ -398,6 +414,8 @@
         commonEnvironment.Append(LIBS=['intl'])
     if getPlatform() == "darwin":
         commonEnvironment.Append(LIBS=['intl'])
+    if getPlatform() == "sunos":
+        commonEnvironment.Append(LIBS=['intl'])    
 else:
     print "Using Istvan localisation"
     commonEnvironment.Prepend(CCFLAGS = ['-DNOGETTEXT'])
@@ -432,8 +450,9 @@
     commonEnvironment.Append(SHLINKFLAGS = ['-pg'])
 elif commonEnvironment['gcc3opt'] != 0 or commonEnvironment['gcc4opt'] != '0':
    if not buildOLPC:
-    commonEnvironment.Append(CCFLAGS = ['-fomit-frame-pointer'])
-    commonEnvironment.Append(CCFLAGS = ['-freorder-blocks'])
+    if not compilerSun():
+        commonEnvironment.Append(CCFLAGS = ['-fomit-frame-pointer'])
+        commonEnvironment.Append(CCFLAGS = ['-freorder-blocks'])
 
 if compilerGNU():
     commonEnvironment.Prepend(CXXFLAGS = ['-fexceptions'])
@@ -444,12 +463,18 @@
     commonEnvironment.Prepend(CPPFLAGS = ['-DBETA'])
 
 if commonEnvironment['Lib64'] == '1':
-    commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib64'])
+    if getPlatform() == 'sunos':
+        commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/lib/64', '/usr/lib/64'])
+    else:    
+        commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib64'])
 else:
     commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib'])
 
 if commonEnvironment['Word64'] == '1':
-    commonEnvironment.Append(CCFLAGS = ['-fPIC'])
+    if compilerSun():
+        commonEnvironment.Append(CCFLAGS = ['-xcode=pic32'])
+    else:    
+        commonEnvironment.Append(CCFLAGS = ['-fPIC'])
 
 if commonEnvironment['useDouble'] == '0':
     print 'CONFIGURATION DECISION: Using single-precision floating point for audio samples.'
@@ -468,6 +493,14 @@
     commonEnvironment.Append(CPPPATH = '/usr/X11R6/include')
     commonEnvironment.Append(CCFLAGS = "-DPIPES")
     commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
+elif getPlatform() == 'sunos':
+    commonEnvironment.Append(CCFLAGS = "-D_SOLARIS")
+    commonEnvironment.Append(CPPPATH = '/usr/local/include')
+    commonEnvironment.Append(CPPPATH = '/usr/include')
+    commonEnvironment.Append(CPPPATH = '/usr/jdk/instances/jdk1.5.0/include')
+    if compilerGNU():
+        commonEnvironment.Append(CCFLAGS = "-DPIPES")
+        commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])  
 elif getPlatform() == 'darwin':
     commonEnvironment.Append(CCFLAGS = "-DMACOSX")
     commonEnvironment.Append(CPPPATH = '/usr/local/include')
@@ -532,6 +565,17 @@
         tmp = '/usr/lib/python%s/config' % commonEnvironment['pythonVersion']
         pythonLibraryPath = ['/usr/local/lib', '/usr/lib', tmp]
     pythonLibs = ['python%s' % commonEnvironment['pythonVersion']]
+elif getPlatform() == 'sunos':
+    path1 = '/usr/include/python%s' % commonEnvironment['pythonVersion']
+    path2 = '/usr/local/include/python%s' % commonEnvironment['pythonVersion']
+    pythonIncludePath = [path1, path2]
+    pythonLinkFlags = []
+    if commonEnvironment['Lib64'] == '1':
+        pythonLibraryPath = ['/usr/local/lib/64', '/usr/lib/64']
+    else:
+        pythonLibraryPath = ['/usr/local/lib', '/usr/lib']
+    pythonLibs = ['python%s' % commonEnvironment['pythonVersion']]
+    tclIncludePath = []
 elif getPlatform() == 'darwin':
     # find Mac OS X major version
     fout = os.popen("uname -r")
@@ -774,7 +818,10 @@
     csoundLibraryName += '32'
 # flags for linking with the Csound library
 libCsoundLinkFlags = []
-libCsoundLibs = ['sndfile']
+if getPlatform() == 'sunos':
+    libCsoundLibs = ['sndfile', 'socket', 'rt', 'nsl']
+else:
+    libCsoundLibs = ['sndfile']
 
 buildOSXFramework = 0
 if getPlatform() == 'darwin':
@@ -880,7 +927,7 @@
     csoundDynamicLibraryEnvironment.Append(LIBS = csoundWindowsLibraries)
     if compilerGNU():
         csoundDynamicLibraryEnvironment.Append(SHLINKFLAGS = ['-module'])
-elif getPlatform() == 'linux':
+elif getPlatform() == 'linux' or getPlatform() == 'sunos':
     csoundDynamicLibraryEnvironment.Append(LIBS = ['dl', 'm', 'pthread'])
 csoundInterfacesEnvironment = csoundDynamicLibraryEnvironment.Clone()
 
@@ -1106,13 +1153,16 @@
 csoundLibraryEnvironment.Append(CCFLAGS='-fPIC')
 if commonEnvironment['dynamicCsoundLibrary'] == '1':
     print 'CONFIGURATION DECISION: Building dynamic Csound library'
-    if getPlatform() == 'linux':
+    if getPlatform() == 'linux' or getPlatform() == 'sunos':
         libName = 'lib' + csoundLibraryName + '.so'
         libName2 = libName + '.' + csoundLibraryVersion
         os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', libName])
         os.symlink(libName2, libName)
         tmp = csoundDynamicLibraryEnvironment['SHLINKFLAGS']
-        tmp += ['-Wl,-soname=%s' % libName2]
+        if compilerSun():
+            tmp += ['-soname=%s' % libName2]
+        else:
+            tmp += ['-Wl,-soname=%s' % libName2]        
         cflags = csoundDynamicLibraryEnvironment['CCFLAGS']
         if configure.CheckGcc4():
             cflags   += ['-fvisibility=hidden']
@@ -1158,7 +1208,7 @@
     csoundLibraryEnvironment.Append(CCFLAGS='-fPIC')
     csoundLibrary = csoundLibraryEnvironment.Library(
         csoundLibraryName, libCsoundSources)
-if getPlatform() == 'linux':
+if getPlatform() == 'linux' or getPlatform() == 'sunos':
  libCsoundLibs.append(csoundLibrary)
 elif getPlatform() == 'win32' or (getPlatform() == 'darwin' and commonEnvironment['dynamicCsoundLibrary']=='0'):
  libCsoundLibs.append(csoundLibraryName)
@@ -1215,7 +1265,7 @@
         env.Prepend(LINKFLAGS = ['-bundle'])
         pyModule_ = env.Program('_%s.so' % targetName, srcs)
     else:
-        if getPlatform() == 'linux':
+        if getPlatform() == 'linux' or getPlatform() == 'sunos':
             pyModule_ = env.SharedLibrary('%s' % targetName, srcs, SHLIBPREFIX="_", SHLIBSUFFIX = '.so')
         else:
             pyModule_ = env.SharedLibrary('_%s' % targetName, srcs, SHLIBSUFFIX = '.pyd')
@@ -1592,10 +1642,13 @@
         widgetsEnvironment.Append(CCFLAGS = ['-DCS_VSTHOST'])
     if (commonEnvironment['noFLTKThreads'] == '1'):
         widgetsEnvironment.Append(CCFLAGS = ['-DNO_FLTK_THREADS'])
-    if getPlatform() == 'linux':
+    if getPlatform() == 'linux' or (getPlatform() == 'sunos' and compilerGNU()):
         ## dont do this  widgetsEnvironment.Append(CCFLAGS = ['-DCS_VSTHOST'])
         widgetsEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
         widgetsEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
+    elif compilerSun():
+        widgetsEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
+        widgetsEnvironment.Append(LIBS = ['pthread', 'm'])         
     elif getPlatform() == 'win32':
         if compilerGNU():
             widgetsEnvironment.Append(LIBS = ['stdc++', 'supc++'])
@@ -1648,7 +1701,7 @@
     alsaEnvironment.Append(LIBS = ['asound', 'pthread'])
     makePlugin(alsaEnvironment, 'rtalsa', ['InOut/rtalsa.c'])
 
-if pulseaudioFound and getPlatform() == 'linux':
+if pulseaudioFound and (getPlatform() == 'linux' or getPlatform() == 'sunos'):
    print "CONFIGURATION DECISION: Building PulseAudio plugin"
    pulseaudioEnv = pluginEnvironment.Clone()
    pulseaudioEnv.Append(LIBS = ['pulse-simple'])
@@ -1917,7 +1970,7 @@
         stkEnvironment.Append(LIBS = ['stdc++'])
     if getPlatform() == 'win32':
         stkEnvironment.Append(LIBS = csoundWindowsLibraries)
-    elif getPlatform() == 'linux' or getPlatform() == 'darwin':
+    elif getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform() == 'sunos':
         stkEnvironment.Append(LIBS = ['pthread'])
     # This is the one that actually defines the opcodes.
     # They are straight wrappers, as simple as possible.
@@ -1941,7 +1994,7 @@
     pyEnvironment.Append(LIBS = pythonLibs)
     if getPlatform() == 'linux':
         pyEnvironment.Append(LIBS = ['util', 'dl', 'm'])
-    elif getPlatform() == 'darwin':
+    elif getPlatform() == 'darwin' or getPlatform() == 'sunos':
         pyEnvironment.Append(LIBS = ['dl', 'm'])
     elif getPlatform() == 'win32':
         pyEnvironment['ENV']['PATH'] = os.environ['PATH']
@@ -2067,9 +2120,12 @@
     if jackFound:
         csound5GUIEnvironment.Append(LIBS = ['jack'])
         csound5GUIEnvironment.Prepend(CPPFLAGS = ['-DHAVE_JACK'])
-    if getPlatform() == 'linux':
+    if getPlatform() == 'linux' or (getPlatform() == 'sunos' and compilerGNU()):
         csound5GUIEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
         csound5GUIEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
+    elif compilerSun():
+        csound5GUIEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
+        csound5GUIEnvironment.Append(LIBS = ['pthread', 'm'])    
     elif getPlatform() == 'win32':
         if compilerGNU():
             csound5GUIEnvironment.Append(LIBS = ['stdc++', 'supc++'])
Sous-répertoire : Csound5.10.1/SDIF et Csound5.10.1_including_Solaris/SDIF
Sous-répertoire : Csound5.10.1/Top et Csound5.10.1_including_Solaris/Top
Sous-répertoire : Csound5.10.1/debian et Csound5.10.1_including_Solaris/debian
Sous-répertoire : Csound5.10.1/doc et Csound5.10.1_including_Solaris/doc
Sous-répertoire : Csound5.10.1/etc et Csound5.10.1_including_Solaris/etc
Sous-répertoire : Csound5.10.1/examples et Csound5.10.1_including_Solaris/examples
Sous-répertoire : Csound5.10.1/frontends et Csound5.10.1_including_Solaris/frontends
Sous-répertoire : Csound5.10.1/installer et Csound5.10.1_including_Solaris/installer
Sous-répertoire : Csound5.10.1/interfaces et Csound5.10.1_including_Solaris/interfaces
Sous-répertoire : Csound5.10.1/pluginSDK et Csound5.10.1_including_Solaris/pluginSDK
Sous-répertoire : Csound5.10.1/po et Csound5.10.1_including_Solaris/po
Sous-répertoire : Csound5.10.1/samples et Csound5.10.1_including_Solaris/samples
Sous-répertoire : Csound5.10.1/tests et Csound5.10.1_including_Solaris/tests
Sous-répertoire : Csound5.10.1/util et Csound5.10.1_including_Solaris/util
Sous-répertoire : Csound5.10.1/util1 et Csound5.10.1_including_Solaris/util1
diff -r -u Csound5.10.1/H/entry1.h Csound5.10.1_including_Solaris/H/entry1.h
--- Csound5.10.1/H/entry1.h	mer. nov. 12 00:09:18 2008
+++ Csound5.10.1_including_Solaris/H/entry1.h	jeu. déc. 25 20:02:17 2008
@@ -151,7 +151,7 @@
 int     knvlpx(CSOUND *, void *), envlpx(CSOUND *, void *);
 int     evrset(CSOUND *, void *), knvlpxr(CSOUND *, void *);
 int     envlpxr(CSOUND *, void *), phsset(CSOUND *, void *);
-int     ephsset(CSOUND *, void *), ephsor(CSOUND *, void *);;
+int     ephsset(CSOUND *, void *), ephsor(CSOUND *, void *);
 int     kphsor(CSOUND *, void *), phsor(CSOUND *, void *);
 int     itablew1(CSOUND *, void *), itablegpw1(CSOUND *, void *);
 int     itablemix1(CSOUND *, void *), itablecopy1(CSOUND *, void *);
Sous-répertoire : Csound5.10.1/InOut/virtual_keyboard et Csound5.10.1_including_Solaris/InOut/virtual_keyboard
diff -r -u Csound5.10.1/InOut/widgets.cpp Csound5.10.1_including_Solaris/InOut/widgets.cpp
--- Csound5.10.1/InOut/widgets.cpp	lun. déc. 15 22:18:39 2008
+++ Csound5.10.1_including_Solaris/InOut/widgets.cpp	jeu. janv.  1 22:06:24 2009
@@ -1281,7 +1281,11 @@
           break;
         case EXP_:
           range  = fld->max - fld->min;
-          base = ::pow(fld->max / fld->min, 1.0/(double)range);
+          #if defined(sun)
+            base = ::pow(fld->max / (double)fld->min, 1.0/(double)range);
+          #else
+            base = ::pow(fld->max / fld->min, 1.0/(double)range);
+          #endif  
           ((Fl_Positioner*) o)->xvalue(log(val/fld->min) / log(base)) ;
           break;
         default:
@@ -1297,7 +1301,11 @@
           break;
         case EXP_:
           range  = fld->max2 - fld->min2;
-          base = ::pow(fld->max2 / fld->min2, 1.0/(double)range);
+          #if defined(sun)
+            base = ::pow(fld->max2 / (double)fld->min2, 1.0/(double)range);
+          #else 
+            base = ::pow(fld->max2 / fld->min2, 1.0/(double)range);
+          #endif
           ((Fl_Positioner*) o)->yvalue(log(val/fld->min2) / log(base)) ;
           break;
         default:
@@ -1353,8 +1361,13 @@
             break;
           case EXP_:
             range  = p->slider_data[j].max - p->slider_data[j].min;
-            base = ::pow(p->slider_data[j].max / p->slider_data[j].min,
-                         1.0/(double)range);
+            #if defined(sun)
+              base = ::pow(p->slider_data[j].max / (double)p->slider_data[j].min,
+                           1.0/(double)range);
+            #else                       
+              base = ::pow(p->slider_data[j].max / p->slider_data[j].min,
+                           1.0/(double)range);
+            #endif             
             ((Fl_Valuator*) grup->child(j))->
               value(log(val/p->slider_data[j].min) / log(base)) ;
             break;
@@ -1402,7 +1415,11 @@
           break;
         case EXP_:
           range  = fld->max - fld->min;
-          base = ::pow(fld->max / fld->min, 1.0/(double)range);
+          #if defined(sun)
+            base = ::pow(fld->max / (double)fld->min, 1.0/(double)range);
+          #else  
+            base = ::pow(fld->max / fld->min, 1.0/(double)range);
+          #endif  
           ((Fl_Valuator*) o)->value(log(val/fld->min) / log(base)) ;
           break;
         default: // TABLE the value must be in the 0 to 1 range...
@@ -2158,8 +2175,13 @@
 static void fl_callbackExponentialSlider(Fl_Valuator* w, void *a)
 {
     FLSLIDER *p = ((FLSLIDER*) a);
-    displ(*p->kout = p->min * ::pow (p->base, w->value()),
-          *p->idisp, p->h.insdshead->csound);
+    #if defined(sun)
+      displ(*p->kout = p->min * ::pow ((double)p->base, w->value()),
+            *p->idisp, p->h.insdshead->csound);
+    #else        
+      displ(*p->kout = p->min * ::pow (p->base, w->value()),
+            *p->idisp, p->h.insdshead->csound);
+    #endif        
 }
 
 static void fl_callbackInterpTableSlider(Fl_Valuator* w, void *a)
@@ -2190,7 +2212,11 @@
 static void fl_callbackExponentialSliderBank(Fl_Valuator* w, void *a)
 {
     SLDBK_ELEMENT* p = (SLDBK_ELEMENT*) a;
-    *p->out = p->min * ::pow (p->base, w->value());
+    #if defined(sun)
+      *p->out = p->min * ::pow ((double)p->base, w->value());
+    #else
+      *p->out = p->min * ::pow (p->base, w->value());
+    #endif  
 }
 
 static void fl_callbackInterpTableSliderBank(Fl_Valuator* w, void *a)
@@ -2222,7 +2248,11 @@
       val = j->xvalue();
       break;
     case EXP_:
-      val = *p->iminx * ::pow (p->basex, j->xvalue());
+      #if defined(sun)
+        val = *p->iminx * ::pow ((double)p->basex, j->xvalue());
+      #else  
+        val = *p->iminx * ::pow (p->basex, j->xvalue());
+      #endif  
       break;
     default:
       if (iexpx > 0) { //interpolated
@@ -2242,7 +2272,11 @@
       val = j->yvalue();
       break;
     case EXP_:
-      val = *p->iminy * ::pow (p->basey, j->yvalue());
+      #if defined(sun)
+        val = *p->iminy * ::pow ((double)p->basey, j->yvalue());
+      #else  
+        val = *p->iminy * ::pow (p->basey, j->yvalue());
+      #endif  
       break;
     default:
       if (iexpy > 0) { //interpolated
@@ -2270,8 +2304,13 @@
 static void fl_callbackExponentialRoller(Fl_Valuator* w, void *a)
 {
     FLROLLER *p = ((FLROLLER*) a);
-    displ(*p->kout = ((FLROLLER*) a)->min * ::pow (p->base, w->value()),
-          *p->idisp, p->h.insdshead->csound);
+    #if defined(sun)
+      displ(*p->kout = ((FLROLLER*) a)->min * ::pow ((double)p->base, w->value()),
+            *p->idisp, p->h.insdshead->csound);
+    #else        
+      displ(*p->kout = ((FLROLLER*) a)->min * ::pow (p->base, w->value()),
+            *p->idisp, p->h.insdshead->csound);
+    #endif         
 }
 
 static void fl_callbackInterpTableRoller(Fl_Valuator* w, void *a)
@@ -2300,8 +2339,13 @@
 static void fl_callbackExponentialKnob(Fl_Valuator* w, void *a)
 {
     FLKNOB *p = ((FLKNOB*) a);
-    displ(*p->kout = ((FLKNOB*) a)->min * ::pow (p->base, w->value()),
-          *p->idisp, p->h.insdshead->csound);
+    #if defined(sun)
+      displ(*p->kout = ((FLKNOB*) a)->min * ::pow ((double)p->base, w->value()),
+            *p->idisp, p->h.insdshead->csound);
+    #else        
+      displ(*p->kout = ((FLKNOB*) a)->min * ::pow (p->base, w->value()),
+            *p->idisp, p->h.insdshead->csound);
+    #endif        
 }
 
 static void fl_callbackInterpTableKnob(Fl_Valuator* w, void *a)
@@ -2797,7 +2841,11 @@
         case LIN_:        // linear
           break;
         case EXP_:        // exponential
-          log_base = (MYFLT) log(::pow(v.max / v.min, 1.0 / (v.max - v.min)));
+          #if defined(sun)
+            log_base = (MYFLT) log(::pow(v.max / (double)v.min, 1.0 / (v.max - v.min)));
+          #else  
+            log_base = (MYFLT) log(::pow(v.max / v.min, 1.0 / (v.max - v.min)));
+          #endif  
           break;
         default:
           csound->Warning(csound, Str("(fl_setWidgetValuei): "
@@ -2829,7 +2877,11 @@
         case LIN_:        // linear
           break;
         case EXP_:        // exponential
-          log_base = (MYFLT) log(::pow(v.max / v.min, 1.0 / (v.max - v.min)));
+          #if defined(sun)
+            log_base = (MYFLT) log(::pow(v.max / (double)v.min, 1.0 / (v.max - v.min)));
+          #else  
+            log_base = (MYFLT) log(::pow(v.max / v.min, 1.0 / (v.max - v.min)));
+          #endif  
           break;
         default:
           csound->Warning(csound, Str("(fl_setWidgetValue_set): "
@@ -3219,7 +3271,11 @@
                                                "in exponential operations"));
         range = max - min;
         o->range(0,range);
-        p->base = ::pow((max / min), 1.0/(double)range);
+        #if defined(sun)
+          p->base = ::pow((max / (double)min), 1.0/(double)range);
+        #else  
+          p->base = ::pow((max / min), 1.0/(double)range);
+        #endif  
         o->callback((Fl_Callback*)fl_callbackExponentialSlider,(void *) p);
         break;
       default:
@@ -3390,13 +3446,21 @@
                                             "in exponential operations"));
           range = max - min;
           o->range(0,range);
-          p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #if defined(sun)
+            p->slider_data[j].base = ::pow((max / (double)min), 1.0/(double)range);
+          #else  
+            p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #endif  
           o->callback((Fl_Callback*)fl_callbackExponentialSliderBank,
                       (void *) &(p->slider_data[j]));
           {
             val = outable[j];
             MYFLT range = max-min;
-            MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #if defined(sun)
+              MYFLT base = ::pow(max / (double)min, 1.0/(double)range);
+            #else  
+              MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #endif  
             val = (log(val/min) / log(base)) ;
           }
           break;
@@ -3479,7 +3543,11 @@
                                                  "in exponential operations"));
           MYFLT range = *p->imaxx - *p->iminx;
           o->xbounds(0,range);
-          p->basex = ::pow((*p->imaxx / *p->iminx), 1.0/(double)range);
+          #if defined(sun)
+            p->basex = ::pow((*p->imaxx / (double)*p->iminx), 1.0/(double)range);
+          #else  
+            p->basex = ::pow((*p->imaxx / *p->iminx), 1.0/(double)range);
+          #endif  
         } break;
       default:
         {
@@ -3508,7 +3576,11 @@
                                                  "in exponential operations"));
           MYFLT range = *p->imaxy - *p->iminy;
           o->ybounds(range,0);
-          p->basey = ::pow((*p->imaxy / *p->iminy), 1.0/(double)range);
+          #if defined(sun)
+            p->basey = ::pow((*p->imaxy / (double)*p->iminy), 1.0/(double)range);
+          #else  
+            p->basey = ::pow((*p->imaxy / *p->iminy), 1.0/(double)range);
+          #endif  
         } break;
       default:
         {
@@ -3613,7 +3685,11 @@
                                                  "in exponential operations"));
           MYFLT range = max - min;
           o->range(0,range);
-          p->base = ::pow((max / min), 1.0/(double)range);
+          #if defined(sun)
+            p->base = ::pow((max / (double)min), 1.0/(double)range);
+          #else  
+            p->base = ::pow((max / min), 1.0/(double)range);
+          #endif  
           o->callback((Fl_Callback*)fl_callbackExponentialKnob,(void *) p);
         } break;
       default:
@@ -3991,7 +4067,11 @@
                                                  "in exponential operations"));
           MYFLT range = max - min;
           o->range(0,range);
-          p->base = ::pow((max / min), 1.0/(double)range);
+          #if defined(sun)
+            p->base = ::pow((max / (double)min), 1.0/(double)range);
+          #else  
+            p->base = ::pow((max / min), 1.0/(double)range);
+          #endif  
           o->callback((Fl_Callback*)fl_callbackExponentialRoller,(void *) p);
         }
         break;
@@ -4437,13 +4517,21 @@
                                             "in exponential operations"));
           range = max - min;
           o->range(range,0);
-          p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #if defined(sun)
+            p->slider_data[j].base = ::pow((max / (double)min), 1.0/(double)range);
+          #else  
+            p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #endif  
           o->callback((Fl_Callback*)fl_callbackExponentialSliderBank,
                       (void *) &(p->slider_data[j]));
           {
             val = outable[j];
             MYFLT range = max-min;
-            MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #if defined(sun)
+              MYFLT base = ::pow(max / (double)min, 1.0/(double)range);
+            #else  
+              MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #endif  
             val = (log(val/min) / log(base)) ;
           }
           break;
@@ -4605,13 +4693,21 @@
                                             "in exponential operations"));
           range = max - min;
           o->range(0,range);
-          p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #if defined(sun)
+            p->slider_data[j].base = ::pow((max / (double)min), 1.0/(double)range);
+          #else  
+            p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #endif  
           o->callback((Fl_Callback*)fl_callbackExponentialSliderBank,
                       (void *) &(p->slider_data[j]));
           {
             val = outable[j];
             MYFLT range = max-min;
-            MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #if defined(sun)
+              MYFLT base = ::pow(max / (double)min, 1.0/(double)range);
+            #else  
+              MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #endif  
             val = (log(val/min) / log(base)) ;
           }
           break;
@@ -4774,13 +4870,21 @@
                                             "in exponential operations"));
           range = max - min;
           o->range(range,0);
-          p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #if defined(sun)
+            p->slider_data[j].base = ::pow((max / (double)min), 1.0/(double)range);
+          #else  
+            p->slider_data[j].base = ::pow((max / min), 1.0/(double)range);
+          #endif  
           o->callback((Fl_Callback*)fl_callbackExponentialSliderBank,
                       (void *) &(p->slider_data[j]));
           {
             val = outable[j];
             MYFLT range = max-min;
-            MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #if defined(sun)
+              MYFLT base = ::pow(max / (double)min, 1.0/(double)range);
+            #else  
+              MYFLT base = ::pow(max / min, 1.0/(double)range);
+            #endif  
             val = (log(val/min) / log(base)) ;
           }
           break;
diff -r -u Csound5.10.1/InOut/widglobals.h Csound5.10.1_including_Solaris/InOut/widglobals.h
--- Csound5.10.1/InOut/widglobals.h	sam. janv. 19 22:08:25 2008
+++ Csound5.10.1_including_Solaris/InOut/widglobals.h	jeu. janv.  1 18:19:05 2009
@@ -6,7 +6,7 @@
 #  include <windows.h>
 #endif /* defined(WIN32) */
 
-#if defined(LINUX)
+#if defined(LINUX) || defined(sun)
 #  include <pthread.h>
 #  include <sched.h>
 #  include <sys/time.h>
diff -r -u Csound5.10.1/OOps/remote.c Csound5.10.1_including_Solaris/OOps/remote.c
--- Csound5.10.1/OOps/remote.c	jeu. déc.  4 15:55:04 2008
+++ Csound5.10.1_including_Solaris/OOps/remote.c	jeu. déc. 25 21:01:48 2008
@@ -32,7 +32,10 @@
 #include <arpa/inet.h>
 #endif
 #include <net/if.h>
+#ifdef sun
+#include <sys/sockio.h>
 #endif
+#endif
 #endif /* HAVE_SOCKETS */
 
 #define MAXREMOTES 10
diff -r -u Csound5.10.1/OOps/str_ops.c Csound5.10.1_including_Solaris/OOps/str_ops.c
--- Csound5.10.1/OOps/str_ops.c	jeu. déc.  4 15:55:04 2008
+++ Csound5.10.1_including_Solaris/OOps/str_ops.c	mer. déc. 31 20:22:28 2008
@@ -711,6 +711,8 @@
       s = "MacOSX";
 #elif defined(mac_classic)
       s = "MacOS";
+#elif defined(sun)
+      s = "Solaris";      
 #else
       s = "unknown";
 #endif
Sous-répertoire : Csound5.10.1/Opcodes/Loris et Csound5.10.1_including_Solaris/Opcodes/Loris
Sous-répertoire : Csound5.10.1/Opcodes/chua et Csound5.10.1_including_Solaris/Opcodes/chua
Sous-répertoire : Csound5.10.1/Opcodes/dssi4cs et Csound5.10.1_including_Solaris/Opcodes/dssi4cs
Sous-répertoire : Csound5.10.1/Opcodes/fluidOpcodes et Csound5.10.1_including_Solaris/Opcodes/fluidOpcodes
Sous-répertoire : Csound5.10.1/Opcodes/gab et Csound5.10.1_including_Solaris/Opcodes/gab
Sous-répertoire : Csound5.10.1/Opcodes/py et Csound5.10.1_including_Solaris/Opcodes/py
diff -r -u Csound5.10.1/Opcodes/sftype.h Csound5.10.1_including_Solaris/Opcodes/sftype.h
--- Csound5.10.1/Opcodes/sftype.h	ven. janv. 26 12:21:41 2007
+++ Csound5.10.1_including_Solaris/Opcodes/sftype.h	jeu. déc. 25 22:10:07 2008
@@ -32,6 +32,10 @@
 #elif defined(mac_classic)
 #  pragma               pack(1)
 #  define     PACKED
+#elif defined(sun)
+#  ifndef       PACKED
+#    define     PACKED  __attribute__((packed))
+#  endif        /* PACKED */
 #elif defined(__WATCOMC__)
 #  include <pshpack1.h>
 #  define     PACKED
Sous-répertoire : Csound5.10.1/Opcodes/stk et Csound5.10.1_including_Solaris/Opcodes/stk
Sous-répertoire : Csound5.10.1/Opcodes/vst4cs et Csound5.10.1_including_Solaris/Opcodes/vst4cs
diff -r -u Csound5.10.1/Opcodes/wavegde.h Csound5.10.1_including_Solaris/Opcodes/wavegde.h
--- Csound5.10.1/Opcodes/wavegde.h	lun. sept.  5 19:27:44 2005
+++ Csound5.10.1_including_Solaris/Opcodes/wavegde.h	jeu. déc. 25 21:27:46 2008
@@ -43,7 +43,9 @@
 #endif
 
 /* TYPEDEFS */
+#if !defined(sun)
 typedef long    len_t;    /* length type */
+#endif
 
 /* CLASS DEFINITIONS */
 
Sous-répertoire : Csound5.10.1/Opcodes/dssi4cs/src et Csound5.10.1_including_Solaris/Opcodes/dssi4cs/src
Sous-répertoire : Csound5.10.1/Opcodes/gab/examples et Csound5.10.1_including_Solaris/Opcodes/gab/examples
Sous-répertoire : Csound5.10.1/Opcodes/py/examples et Csound5.10.1_including_Solaris/Opcodes/py/examples
Sous-répertoire : Csound5.10.1/Opcodes/vst4cs/doc et Csound5.10.1_including_Solaris/Opcodes/vst4cs/doc
Sous-répertoire : Csound5.10.1/Opcodes/vst4cs/src et Csound5.10.1_including_Solaris/Opcodes/vst4cs/src
diff -r -u Csound5.10.1/Top/csmodule.c Csound5.10.1_including_Solaris/Top/csmodule.c
--- Csound5.10.1/Top/csmodule.c	jeu. déc. 18 18:37:02 2008
+++ Csound5.10.1_including_Solaris/Top/csmodule.c	ven. déc. 26 19:25:48 2008
@@ -78,7 +78,7 @@
 #include "csoundCore.h"
 #include "csmodule.h"
 
-#if defined(LINUX)
+#if defined(LINUX) || defined(sun)
 #include <dlfcn.h>
 #elif defined(WIN32)
 #include <windows.h>
@@ -901,7 +901,7 @@
     return (void*) GetProcAddress((HMODULE) library, procedureName);
 }
 
-#elif defined(LINUX)
+#elif defined(LINUX) || defined(sun)
 
 PUBLIC int csoundOpenLibrary(void **library, const char *libraryPath)
 {
diff -r -u Csound5.10.1/Top/csound.c Csound5.10.1_including_Solaris/Top/csound.c
--- Csound5.10.1/Top/csound.c	lun. déc. 15 22:18:40 2008
+++ Csound5.10.1_including_Solaris/Top/csound.c	ven. déc. 26 20:02:50 2008
@@ -40,6 +40,9 @@
 #include "csGblMtx.h"
 #include <stdarg.h>
 #include <signal.h>
+#ifdef sun
+#include <siginfo.h>
+#endif
 #ifndef mac_classic
 #include <pthread.h>
 #endif
@@ -682,7 +685,7 @@
     }
   }
 
-#if !defined(LINUX) && !defined(SGI) && !defined(__BEOS__) && !defined(__MACH__)
+#if !defined(LINUX) && !defined(SGI) && !defined(__BEOS__) && !defined(__MACH__) && !defined(sun)
   static char *signal_to_string(int sig)
   {
     switch(sig) {
@@ -800,7 +803,7 @@
   }
 
   static const int sigs[] = {
-#if defined(LINUX) || defined(SGI) || defined(sol) || defined(__MACH__)
+#if defined(LINUX) || defined(SGI) || defined(sun) || defined(__MACH__)
     SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGIOT, SIGBUS,
     SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, SIGXCPU, SIGXFSZ,
 #elif defined(WIN32)
diff -r -u Csound5.10.1/Top/one_file.c Csound5.10.1_including_Solaris/Top/one_file.c
--- Csound5.10.1/Top/one_file.c	mar. mars 18 09:04:25 2008
+++ Csound5.10.1_including_Solaris/Top/one_file.c	mer. déc. 31 20:47:30 2008
@@ -24,7 +24,7 @@
 #include "csoundCore.h"
 #include <ctype.h>
 #include <errno.h>
-#if defined(LINUX) || defined(__MACH__) || defined(WIN32)
+#if defined(LINUX) || defined(__MACH__) || defined(WIN32) || defined(sun)
 #  include <sys/types.h>
 #  include <sys/stat.h>
 #endif
@@ -80,7 +80,7 @@
       buf = csound->Malloc(csound, nBytes);
     }
     {
-#if defined(LINUX) || defined(__MACH__)
+#if defined(LINUX) || defined(__MACH__) || defined(sun)
       struct stat tmp;
       do {
 #elif defined(WIN32)
@@ -103,7 +103,7 @@
         }
 #endif
         if (ext != NULL && ext[0] != (char) 0) {
-#if !defined(LINUX) && !defined(__MACH__) && !defined(WIN32)
+#if !defined(LINUX) && !defined(__MACH__) && !defined(WIN32) && !defined(sun)
           char  *p;
           /* remove original extension (does not work on OS X */
           /* and may be a bad idea) */
@@ -123,7 +123,7 @@
           } while (buf[i] != (char) 0);
         }
 #endif
-#if defined(LINUX) || defined(__MACH__)
+#if defined(LINUX) || defined(__MACH__) || defined(sun)
         /* if the file already exists, try again */
       } while (stat(buf, &tmp) == 0);
 #elif defined(WIN32)
diff -r -u Csound5.10.1/Top/threads.c Csound5.10.1_including_Solaris/Top/threads.c
--- Csound5.10.1/Top/threads.c	mar. sept.  9 01:55:22 2008
+++ Csound5.10.1_including_Solaris/Top/threads.c	dim. janv.  4 00:56:31 2009
@@ -167,7 +167,7 @@
 
 
 
-#if defined(LINUX) || defined(__MACH__) || defined(WIN32)
+#if defined(LINUX) || defined(__MACH__) || defined(WIN32) || defined(sun)
 
 #include <errno.h>
 #include <pthread.h>
@@ -223,7 +223,7 @@
     }
 }
 
-#if defined(LINUX) || defined(WIN32)
+#if defined(LINUX) || defined(WIN32) || defined(sun)
 
 PUBLIC void *csoundCreateThreadLock(void)
 {
Sous-répertoire : Csound5.10.1/doc/latex et Csound5.10.1_including_Solaris/doc/latex
Sous-répertoire : Csound5.10.1/examples/chuas_oscillator et Csound5.10.1_including_Solaris/examples/chuas_oscillator
Sous-répertoire : Csound5.10.1/examples/cscore et Csound5.10.1_including_Solaris/examples/cscore
Sous-répertoire : Csound5.10.1/examples/csoundapi_tilde et Csound5.10.1_including_Solaris/examples/csoundapi_tilde
Sous-répertoire : Csound5.10.1/examples/fl_controller et Csound5.10.1_including_Solaris/examples/fl_controller
Sous-répertoire : Csound5.10.1/examples/java et Csound5.10.1_including_Solaris/examples/java
Sous-répertoire : Csound5.10.1/examples/tclcsound et Csound5.10.1_including_Solaris/examples/tclcsound
Sous-répertoire : Csound5.10.1/examples/cscore/manual et Csound5.10.1_including_Solaris/examples/cscore/manual
Sous-répertoire : Csound5.10.1/examples/cscore/more et Csound5.10.1_including_Solaris/examples/cscore/more
Sous-répertoire : Csound5.10.1/frontends/CsoundAC et Csound5.10.1_including_Solaris/frontends/CsoundAC
Sous-répertoire : Csound5.10.1/frontends/CsoundVST et Csound5.10.1_including_Solaris/frontends/CsoundVST
Sous-répertoire : Csound5.10.1/frontends/CsoundX et Csound5.10.1_including_Solaris/frontends/CsoundX
Sous-répertoire : Csound5.10.1/frontends/OSX et Csound5.10.1_including_Solaris/frontends/OSX
Sous-répertoire : Csound5.10.1/frontends/cscore et Csound5.10.1_including_Solaris/frontends/cscore
Sous-répertoire : Csound5.10.1/frontends/cseditor et Csound5.10.1_including_Solaris/frontends/cseditor
Sous-répertoire : Csound5.10.1/frontends/csladspa et Csound5.10.1_including_Solaris/frontends/csladspa
Sous-répertoire : Csound5.10.1/frontends/csound et Csound5.10.1_including_Solaris/frontends/csound
Sous-répertoire : Csound5.10.1/frontends/csoundapi_tilde et Csound5.10.1_including_Solaris/frontends/csoundapi_tilde
Sous-répertoire : Csound5.10.1/frontends/flcsound et Csound5.10.1_including_Solaris/frontends/flcsound
Sous-répertoire : Csound5.10.1/frontends/fltk_gui et Csound5.10.1_including_Solaris/frontends/fltk_gui
Sous-répertoire : Csound5.10.1/frontends/tclcsound et Csound5.10.1_including_Solaris/frontends/tclcsound
Sous-répertoire : Csound5.10.1/frontends/winsound et Csound5.10.1_including_Solaris/frontends/winsound
Sous-répertoire : Csound5.10.1/frontends/CsoundX/AudioCode et Csound5.10.1_including_Solaris/frontends/CsoundX/AudioCode
Sous-répertoire : Csound5.10.1/frontends/CsoundX/CsoundX.xcode et Csound5.10.1_including_Solaris/frontends/CsoundX/CsoundX.xcode
Sous-répertoire : Csound5.10.1/frontends/CsoundX/English.lproj et Csound5.10.1_including_Solaris/frontends/CsoundX/English.lproj
Sous-répertoire : Csound5.10.1/frontends/CsoundX/English.lproj/MainMenu.nib et Csound5.10.1_including_Solaris/frontends/CsoundX/English.lproj/MainMenu.nib
Sous-répertoire : Csound5.10.1/frontends/CsoundX/English.lproj/MyDocument.nib et Csound5.10.1_including_Solaris/frontends/CsoundX/English.lproj/MyDocument.nib
Sous-répertoire : Csound5.10.1/frontends/OSX/CsoundHelp et Csound5.10.1_including_Solaris/frontends/OSX/CsoundHelp
Sous-répertoire : Csound5.10.1/frontends/OSX/Csound_5.xcode et Csound5.10.1_including_Solaris/frontends/OSX/Csound_5.xcode
Sous-répertoire : Csound5.10.1/frontends/OSX/English.lproj et Csound5.10.1_including_Solaris/frontends/OSX/English.lproj
Sous-répertoire : Csound5.10.1/frontends/OSX/English.lproj/main.nib et Csound5.10.1_including_Solaris/frontends/OSX/English.lproj/main.nib
Sous-répertoire : Csound5.10.1/frontends/fltk_gui/Csound5GUI.app et Csound5.10.1_including_Solaris/frontends/fltk_gui/Csound5GUI.app
Sous-répertoire : Csound5.10.1/frontends/fltk_gui/Csound5GUI.app/Contents et Csound5.10.1_including_Solaris/frontends/fltk_gui/Csound5GUI.app/Contents
Sous-répertoire : Csound5.10.1/frontends/fltk_gui/Csound5GUI.app/Contents/MacOS et Csound5.10.1_including_Solaris/frontends/fltk_gui/Csound5GUI.app/Contents/MacOS
Sous-répertoire : Csound5.10.1/frontends/fltk_gui/Csound5GUI.app/Contents/Resources et Csound5.10.1_including_Solaris/frontends/fltk_gui/Csound5GUI.app/Contents/Resources
Sous-répertoire : Csound5.10.1/frontends/winsound/Winsound.app et Csound5.10.1_including_Solaris/frontends/winsound/Winsound.app
Sous-répertoire : Csound5.10.1/frontends/winsound/Winsound.app/Contents et Csound5.10.1_including_Solaris/frontends/winsound/Winsound.app/Contents
Sous-répertoire : Csound5.10.1/frontends/winsound/Winsound.app/Contents/MacOS et Csound5.10.1_including_Solaris/frontends/winsound/Winsound.app/Contents/MacOS
Sous-répertoire : Csound5.10.1/frontends/winsound/Winsound.app/Contents/Resources et Csound5.10.1_including_Solaris/frontends/winsound/Winsound.app/Contents/Resources
Sous-répertoire : Csound5.10.1/installer/linux et Csound5.10.1_including_Solaris/installer/linux
Sous-répertoire : Csound5.10.1/installer/macosx et Csound5.10.1_including_Solaris/installer/macosx
Sous-répertoire : Csound5.10.1/installer/misc et Csound5.10.1_including_Solaris/installer/misc
Sous-répertoire : Csound5.10.1/installer/windows et Csound5.10.1_including_Solaris/installer/windows
Sous-répertoire : Csound5.10.1/installer/misc/vim et Csound5.10.1_including_Solaris/installer/misc/vim
diff -r -u Csound5.10.1/util/atsa.c Csound5.10.1_including_Solaris/util/atsa.c
--- Csound5.10.1/util/atsa.c	dim. sept.  7 16:39:20 2008
+++ Csound5.10.1_including_Solaris/util/atsa.c	mar. déc. 30 21:31:07 2008
@@ -95,7 +95,7 @@
  */
 #define ATSA_TYPE 4
 /* default residual file */
-#if defined(LINUX) || defined(MACOSX)
+#if defined(LINUX) || defined(MACOSX) || defined(sun)
 #  define ATSA_RES_FILE "/tmp/atsa_res.wav"
 #else
 #  define ATSA_RES_FILE "atsa_res.wav"
Sous-répertoire : Csound5.10.1/util1/cscore et Csound5.10.1_including_Solaris/util1/cscore
Sous-répertoire : Csound5.10.1/util1/csd_util et Csound5.10.1_including_Solaris/util1/csd_util
Sous-répertoire : Csound5.10.1/util1/scot et Csound5.10.1_including_Solaris/util1/scot
Sous-répertoire : Csound5.10.1/util1/sortex et Csound5.10.1_including_Solaris/util1/sortex
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to