NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD macros



Greg A. Woods wrote:
> 
> These days even if you're writing X11 applications (i.e. rather than
> just plain POSIX command-line style programs) and hoping only to support
> the most widely used platforms there's no need to use either Autoconf or
> Imake.  Such code can be written in a portable way without even having
> to resort to very many #ifdef's at all.


Yes, if what you need is strictly served by the standard C library.  But
the nexus of threads and system calls is not so neat.  If you're trying to
write portable threadsafe networking code, you will likely become
intimately familiar with autoconf, however begrudgingly.  

http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/src/tds/threadsafe.c?revision=1.47&view=markup

I don't claim the above-linked code is beautiful, but afaict it's
irreducible.  I'd be happy to learn otherwise, though, if you have any
suggestions.  

--jkl


Home | Main Index | Thread Index | Old Index