[Asterisk-Dev] Solaris Port (was: asterisk-users: Re: Fedora Core 2 and Kernel 2.6)

Chris Albertson chrisalbertson90278 at yahoo.com
Thu May 20 14:54:05 MST 2004


I've got code which needs to run on Solaris (both i386 and SPARC)
and on Linux/i386. plus a few other platforms.  

I'll tell you, you'll go nuts if you start filling your code
with #ifdef SOLARIS or #ifdef BSD because then you find there
are differences between Solaris versions so you will have
#if inside #if and so on.  And worse you will have the same
code pasted in many places, once for each OS and version.
Making a fix will changes to each place.  And then a new
version of an OS comes out and breaks stuff.  You'll go nuts.

The way to handle this is NOT to do it.  Insted use things like
"#ifdef HAVE strlcat" and then you use  GNU Autoconf to figure out
at build time if the system has an "strlcat()" or if you need to
use "strncat()" or maybe just "strcat()", The code will remain
"clean" and there will be a very good chance things will
"just work" on a new platform and no "port" will be required.

I once used this method on a port that went from SunOS to Solaris
to BSD and then I tried that "new OS"  called "Linux" and
it "just worked" this was on abut 50K lines of C code mostly
X11 based.

In My Opinion, Solaris/SPARC is a very good platform for Asterisk.
for high-end systems.

While you can spend $1 million on a SUN server.  Sun will sell
you a complete Sun Fire V100 server for $995  I've seen these
and had one on my desk for a while. It's a 1U tall rackmount box. 
At under one grand they compete well with rackmount Pentiums 





--- John Todd <jtodd at loligo.com> wrote:
> 
> At 10:29 AM -0700 on 5/20/04, Bob Knight wrote:
> [snip]
> >If you hit a wall trying to get intel based boxes to do the job, let
> me know.
> >I am working on a SunOS port.  It would be fun to see this running 
> >on a Sun Fire server.
> >Should be able to scale it to 1000+ rooms.  Only problem, servers 
> >run from about 50k to a million.
> >That's like real money.  But it would still be fun.
> >
> >btw: this is not a very pretty port.  The current state of the * 
> >source tree does not lend itself
> >very well to other OS's.  Quite a bit of hacking involved. 
> >Something that I would never
> >want to see checked into cvs.
> >
> >--
> >Bob Knight
> >[-w] the work option
> >bk at minusw.com
> >925-449-9163
> 
> 
> Well, if it can be done with a series of reasonably-documented 
> #define's and whatnot, then I don't see why it wouldn't be committed 
> to CVS.  Having Solaris interoperability would be actually a very 
> nice feather in Asterisk's cap, since (for whatever reasons) Solaris 
> is a widely-used and supported telephony platform.
> 
> While I am extremely vague on the details, I recall that there are 
> some "special" instructions in the UltraSparc chipset that handle 
> FFT's and other nifty things, which might also lend themselves to 
> large-scale, fast transcoding.  Now, that might have been video-only 
> - I don't recall...  but I know a guy who used those routines to do 
> real-time encoding of 16 (!!!!) ~150kbps IP video streams for 
> motion-detection frame comparison, video storage, and other nifty 
> features, all in a single 440mhz Netra X1.  Perhaps someone with an 
> actual clue about Solaris and Sparc programming could comment on the 
> viability of this for Asterisk's purposes if a port were to be
> made...
> 
> JT
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev


=====
Chris Albertson
  Home:   310-376-1029  chrisalbertson90278 at yahoo.com
  Cell:   310-990-7550
  Office: 310-336-5189  Christopher.J.Albertson at aero.org
  KG6OMK


	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 



More information about the asterisk-dev mailing list