ADC Home > Reference Library > Technical Notes > Legacy Documents > Mac OS 9 & Earlier >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
A/UX 2.0 and 2.0.1 significantly improves support for Macintosh applications from version 1.1. The major components of the 2.0 Toolbox environment include:
Most MultiFinder-compatible Macintosh applications and utilities should work unmodified under A/UX 2.0. Complete details concerning the A/UX Toolbox may be found in the A/UX Toolbox: Macintosh ROM Interface manual which is part of the A/UX documentation set; however, there are some additional subtle aspects of the A/UX environment of which developers should be aware.
General Compatibility Issues
The following items do not form a definitive list. Rather, they are indicative of common problems Apple encountered with applications while testing them under A/UX 2.0.
Do Not Access Hardware Directly
UNIX is a protected environment where the kernel arbitrates all hardware access. Applications should use the appropriate Macintosh Toolbox manager when it is available. Hardware developers may need to write a custom A/UX device driver to provide access to special hardware. Details on A/UX device drivers, including sample driver source code, is contained in the A/UX Device Driver Kit available from APDA.
Do Not Depend Upon How Things Work
Some applications rely on internal operating system details. This reliance has always been a bad idea, but applications are particularly likely to be bitten under A/UX because the internals are different. Following are some specific cases of which to be aware:
Some applications depend upon being able to access the event queue directly and
patch into the
Some applications work because the Macintosh OS uses a roving allocation scheme. Such applications free memory then use that memory in subsequent traps. A/UX is much more likely to reuse that memory immediately after it is freed (i.e., before the application can use it) than the Macintosh OS.
A/UX-Specific System Files
Some system files are A/UX specific and cannot be interchanged with the Macintosh environment. These files include the System file, Finder, MultiFinder, AppleShare, MacTCP and Patch files.
Since privileged microprocessor instructions must be emulated in software, they
execute much slower under A/UX than the Macintosh OS; therefore, using
privileged instructions degrades application performance. Avoid a privileged
instruction where a non-privileged instruction does just as well. For example,
the non-privileged instruction
Personal System Folders
Under A/UX, a user has the option to use a public System Folder
If an application has an installer utility, it should not place required files in the active System Folder; rather, it should use the System Folder only for configuration data. Required files should be kept with the application.
The A/UX File Manager provides access to: UNIX reg. volumes, HFS volumes, MFS volumes, and AppleShare volumes. UNIX volumes may be a Berkeley 4.2 File System (UFS), a System V File System (SVFS) or a Network File System (NFS(TM)) volume. In addition, since HFS is used as the foundation of the 2.0 File Manager, other external file systems following the Macintosh compatibility guidelines should work correctly under the A/UX environment. In fact, access to UNIX file systems is provided through a Macintosh external file system.
A/UX 2.0 allows only one HFS partition per volume; volumes with more than one such partition are not usable. In addition, HFS SCSI devices are only accessible to A/UX if they were accessible to the Macintosh OS when the system booted, and they have a valid partition map. Note that in the case of HFS CD-ROM discs, only the drive needs to be accessible, no volume needs to be in the drive.
UNIX Volumes (/)
Different physical UNIX volumes (including NFS volumes) appear to Macintosh
applications as a single Macintosh volume named
UNIX file systems, unlike Macintosh file systems, are case sensitive.
Applications should be consistent in the use of case to avoid confusion. For
example, the filenames "
Not all UNIX file systems support 31-character filenames. The UFS file system
on which A/UX 2.0 is based, supports 255-character filenames, but the older
System V file systems used on A/UX 1.x systems only support 14-character
filenames. Since these older systems are supported under A/UX 2.0, users may
mount them as part of
UNIX Volume Pathnames
The slash (/) character is used by UNIX as a pathname separator. Its use is
similar, but not identical, to that of the colon (:) in Macintosh file systems.
This similarity can lead to ambiguity; for example, "
If you must generate a full or relative pathname, it is best to use a colon as a pathname delimiter because this reduces the chance of ambiguity.
UNIX and Macintosh use different end-of-line characters (newline and carriage
return, respectively). To allow both UNIX and Macintosh tools to manipulate
files of type "TEXT," the A/UX File Manager transparently translates these
characters when dealing with files residing on the
Unlike AppleShare, UNIX file systems associate access permissions with files as
well as directories. Directory permissions are mapped onto corresponding
AppleShare file permission values and returned by
HFS-Specific File Information for UNIX Volumes
UNIX file systems lack certain HFS file attributes such as directory IDs and Finder information, which means files created outside of the Toolbox environment do not intrinsically have such attributes. When necessary, such information is provided by the File Manager through the use of a database in the blessed folder. When building its database, the File Manager synthesizes type and creator information for these UNIX files from the file's contents.
Directory IDs may, under some circumstances, change. For instance, if a
particular UNIX volume is sometimes mounted in different areas of the
The File Manager tries to keep all files of type "
Miscellaneous UNIX Volume Details
The following caveats apply only to file accesses to the
Do not directly access VCBs and FCBs. The UNIX external file system does not
use these structures internally. Applications can use the File Manager calls
UNIX activity outside of the Toolbox environment may modify the
Almost all File Manager traps intended for
Inside Macintosh, Volume V-380, The File Manager, states that an
The A/UX 2.0 Toolbox is a virtual memory environment and is currently limited
to 16 MB. The size of the environment defaults to the size of physical memory,
but can be set at login time using the
A/UX 2.0 provides a 24-bit, single application environment which may allow some applications which are not 32-bit clean to run under A/UX. Applications are still subject to limitations regarding direct hardware access and use of privileged instructions, but this environment may allow users to continue using older versions of software. Developers must not depend upon this environment for future development. In this 24-bit environment, virtual memory is limited to 8 MB.
When A/UX 2.0 boots it checks each NuBus card. If the card contains a
If the PrimaryInit and the SecondaryInit are not present, A/UX assumes that the
card initializes itself or does not require initialization. Test for A/UX using
A/UX 2.0 only supports well-behaved video driver control codes. The supported
calls are documented in
The only Apple MacOS video driver control code not supported by the A/UX video
driver is the
Developers interested to apply for control calls that are accepted under A/UX should contact MACDTS. The request should provide information about what csCode number the developer would like to have assigned, what functionality the control code contains, and what possible side effects this video control code has on the system.
MacOS 6.0.7 supports the new
A/UX 2.0(.1) does not support the SCSI Manager. Thus the
Starting with A/UX 2.0.1 all the Script Manager functionality and traps are supported.
Vertical Retrace Manager
A/UX Startup process and MacOS Systems
A/UX is booted from a special A/UX Startup application from MacOS. Some may have problems to actually boot A/UX from the Macintosh environment. The problem has to do with the A/UX Startup program and the Startup tools. These tools (launch, fsck, etc.) consist of position dependent code because they are compiled with the A/UX C compiler and moved to the A/UX Startup environment.
Because the base address of these tools are
A/UX Toolbox: Macintosh ROM Interface
Inside Macintosh, Volume V, Compatibility Guidelines
Inside Macintosh, Volume V, The File Manager
d e v e l o p, January 1990, "Compatibility: Rules for the Road"
UNIX Review, June 1990, "UNIX as a Platform for Macintosh Applications"
A/UX Device Driver Kit (APDA)
Designing Cards and Drivers for Macintosh II and Macintosh SE , Second Edition
NFS is a trademark of Sun Microsystems, Inc.
UNIX is a registered trademark of AT&T