80 likes | 235 Views
“Portability is for people who cannot write new programs” Linus Torvalds Madhu M Kurup technical yahoo! Yahoo! Inc. mmk at yahoo dash inc dot com. Writing Code for Portability. Why Portability?. Re-use == Success Predict the future? OS / Free Software? Source isnt enough
E N D
“Portability is for people who cannot write new programs” Linus Torvalds Madhu M Kurup technical yahoo! Yahoo! Inc. mmk at yahoo dash inc dot com Writing Code for Portability
Why Portability? • Re-use == Success • Predict the future? • OS / Free Software? • Source isnt enough • Project Life/cycle • Design Benefits • Example • Gcc • Egcs
Versions • Track Stable/Current • Dual development • Migration plan • Kernel level changes • Low level == more pain • Always prefer APIs • System interfaces • POSIX • Libraries • Example • X11
Distributions • Glibc • Libc vs glibc ? • Standard Installs • Test, test test! • Packaging formats • Support rpm and deb • Library Hell • libcrypto.so.2 • Example • Opera
Exploit runtime FreeBSD,NetBSD, OpenBSD Java POSIX Test, test test! Threads Ugly mess; stick to process (!) Interface Layer ACE Example Apache Operating Systems
Tools of the trade • Gcc : GNU Compiler Collection • GNU tool chain • Autoconf • Automake • gmake • I18n / L10n • Challenge assumptions • Example • Perl
GUI toolkits • Xlib library • GTK / KDE • Freedesktop.org • Cocoa • XUL • Motif, Qt • Commercial • Example • WxWindows
End of Transmission Thanks; Questions? Useful References The Practice of Programming by Brian W. Kernighan and Rob Pike. LSB http://www.linuxbase.org FHS http://www.pathname.com/fhs/ ACE Based http://www.cs.wustl.edu/~schmidt/ACE.html Mozilla XUL http://books.mozdev.org/chapters/index.html Wxwindows http://www.wxwindows.org/whychoos.htm Posix FAQ http://www.opengroup.org/austin/papers/posix_faq.html http://ooextras.sourceforge.net/