About | ACP | Buy | Forum | Industry Watch | Learning Curve | Search | Twitter | Xnews
Home » Learning Curve

The 'Mac' in 'Mac OS X'

Oh it's there all right.

Buy It

Try It

Try this as an experiment.

Navigate to Carl Lindberg's ManOpen page. Download the OPENSTEP/Mach binary and source code. Open it up. Don't try to run it - just look what you've got.

Note you've got only one immediate subdirectory to ManOpen.app: 'Resources'. And already in the ManOpen.app directory you've got the binary.

There's no 'Contents' subdirectory; there's no 'MacOS' subdirectory to 'Contents'. Your binary is right there. And it just works.

So what operating system is it written for? OPENSTEP is a platform independent standard - it's not an operating system per se.

Time to peek inside the binary.

$ file ManOpen
ManOpen: Mach-O universal binary with 3 architectures
ManOpen (for architecture m68k):	Mach-O executable for m68k architecture
ManOpen (for architecture i386):	Mach-O executable i386
ManOpen (for architecture sparc):	Mach-O executable sparc

Whoa! Three architectures? Motorola (the NeXTSTEP original) and Intel and Sun - all at once?

Yep. Now try the Mac OS X Server 1.2 binary and do the same thing.

$ file ManOpen
ManOpen: Mach-O executable ppc

And the architecture's the same too: no 'Contents', no 'MacOS'. Seemingly those directories don't do anything but waste disk space. Why have them?

OK now navigate into /System/Library/Frameworks/Cocoa.framework. What have you got there?

$ ls -ailo
total 32
  6114 drwxr-xr-x   7 root   238 Dec  9 10:15 .
   147 drwxr-xr-x  84 root  2856 Dec  9 09:56 ..
  6484 lrwxr-xr-x   1 root    22 Dec  9 09:37 Cocoa -> Versions/Current/Cocoa
  6485 lrwxr-xr-x   1 root    24 Dec  9 09:37 CodeResources -> Versions/A/CodeResources
298920 lrwxr-xr-x   1 root    24 Dec  9 10:15 Headers -> Versions/Current/Headers
  6486 lrwxr-xr-x   1 root    26 Dec  9 09:37 Resources -> Versions/Current/Resources
  6115 drwxr-xr-x   4 root   136 Dec  9 09:38 Versions

The symlinks are there for interfaces that are expecting both the binary, the headers, and 'Resources' already at that level - and not where they really are.

The subdirectory 'Current' is a symlink too.

$ ls -ailo Current
6491 lrwxr-xr-x  1 root  1 Dec  9 09:37 Current -> A

It resolves to the real directory 'A'. That's lots of symlinks.

And the iPhone has a similar architecture. And back at the Macworld when the iPhone was first announced a bunch of giggly Mac pundits spent long minutes speculating why that operating system was called 'OS X' and there was no 'Mac' in it.

Yet reflecting on the portent of this bit of research it all becomes a bit clearer. The OPENSTEP come over from Redwood City already ran on NeXT machines, on SunOS, on HP-UX, on Windows NT; NeXT used fat binaries to make this possible; yet forces were at play that wanted a reversion to 'MacOS' - which essentially was long dead by then.

The directories 'Contents' and 'MacOS' don't seem needed at all: 'Contents' normally doesn't contain anything more than an 'Info.plist' which could fit just as easily in the parent directory; and 'MacOS' means nothing. At least not in a technical sense.

Yet they've both been there for ten years now. [Eleven years ago yesterday the ink dried on the 'merger' agreement between Apple and NeXT.]

The 'MacOS' directory does nothing: OPENSTEP bundles are ready to run on a variety of platforms using a variety of CPUs and the OPENSTEP platform is 'open' as its name implies. It's not bound to Windows NT or FreeBSD or Sun or HP-UX. And it's ready to run on Motorola or PowerPC or Intel CPUs.

Pretty fantastic. So what happened?

You don't know?

About | ACP | Buy | Forum | Industry Watch | Learning Curve | Search | Twitter | Xnews
Copyright © Rixstep. All rights reserved.