HP3000-L Archives

November 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Peter da Silva <[log in to unmask]>
Reply To:
Peter da Silva <[log in to unmask]>
Date:
Mon, 12 Nov 2001 08:00:55 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
In article <[log in to unmask]>,
Mark Wonsil  <[log in to unmask]> wrote:
> Peter da Silva declares:
> >But the important thing about UNIX is, you can run the same software on
> >any UNIX. ...

> This has not been my experience at all.  I worked for a software company
> that has a product that runs on the 3000, VMS, HP-UX, AIX, and at least two
> of DEC's Unix OS's.  In not one case could we just recompile on the new
> machine and have it run properly.  Different Unix implementations had
> different libraries (especially in memory management).  The code was filled
> with ifdefs for each OS.

Theres lots of unportable code out there. That doesn't mean portable code
is hard to write.

I've got software I've been using for 20 years, that started out on the
PDP-11 and VAX, went through Regulus (UNIX clone on the 68000), Xenix-68000,
Xenix-286, SunOS, Solaris, System V, and Alpha... as well as other systems
that I don't touch... and I haven't had to add an OS-related ifdef in five
years.

Anyone who writes code that has ifdefs for operating systems is not writing
portable code. Always base your conditionals on feature tests, and isolate
the version-specific code to "shell" routines. It's not hard to do, and it
pays off handsomely.

> You will find this in many Posix ports of well known U*ix applications too.

There's lots of examples of how not to write code out there.

You think wget is ugly, try kermit some time.

--
 `-_-'   In hoc signo hack, Peter da Silva.
  'U`    "A well-rounded geek should be able to geek about anything."
                                                       -- [log in to unmask]
         Disclaimer: WWFD?

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2