Re: Writing a network daemon for both Mac OS X and Linux
Re: Writing a network daemon for both Mac OS X and Linux
- Subject: Re: Writing a network daemon for both Mac OS X and Linux
- From: Cameron Kerr <email@hidden>
- Date: Sun, 19 Dec 2004 12:34:46 +1300
On 19/12/2004, at 10:16 AM, Igor Garnov wrote:
Hello,
this is another question regarding a server application, which is
supposed to serve many clients simultaneously.
In XCode, I can start a project of type 'Standard Tool' or 'C++ Tool'.
Not sure about the latter, but as to the first - it's in my opinion
the same as a usual program for Linux or Free BSD.
Just make sure you don't include any CF or NS libraries. I don't know
if "Standard Tool" uses Makefiles (I don't think it does). Actually, I
don't know how XCode integrates with autoconf etc, so it would be good
if anyone can post a link to such a document.
I am curious to know, is it really possible to write a daemon, which
will compile and run on Mac OS X, Linux and Free BSD.
Certainly, Mac OS X is, after all, a POSIX platform, so as long you
avoid any platform or architecture specifics, it should run fine on any
Unix platform. Just be sure to use autoconf if you want it to be
portable.
If this is possible, what should I avoid? Say, some APIs that are
supported on Linux and unsupported on Mac OS X?
Simple litmus test, if it has a man-page and doesn't say its platform
specific, it should be okay to use, but it'll pay to have a couple of
machines handy with say Linux and FreeBSD on them, as well as your Mac.
The biggest difference between Mac OS X and other Unices, are it terms
of dynamic and shared libraries. That's where most porting efforts are
concentrated for otherwise portable POSIX software.
--
Cameron Kerr
email@hidden; http://humbledown.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden