A/UX: Porting C Code from SUN (9/94)


I have a question about Berkeley UNIX type compilers that run on a SUN/3 and similar machines. Would code compiled on a typical C compiler on a SUN run relatively unaltered (assuming recompilation) under A/UX?

Because we don't implement full Berkeley, would a program for a SUN system have to be radically re-written to run on a Macintosh running A/UX?

A/UX is based on AT&T System 5.2.2. All C codes written on any System V.2.2 based system (use of standard System V.2 C compiler) should compile and run under A/UX without any change.

Since SUN/3 is based on BSD 4.[23] UNIX, there are differences between AT&T System V.2.2 and BSD UNIX 4.[23]. The area of difference includes ioctl() system call, signal handling, directory structure, and so on. Therefore, if the C code involves these differences, it needs to be modified to run on A/UX.

A/UX also supports UNIX 4.2BSD-style signals (software interrupts) and Berkeley UNIX 4.2-style network systems. For example, A/UX includes set42sig() so you can use the 4.2BSD signals. The Berkeley TCP/IP networking facilities like socket(), bind(), connect(), and so on are supported.

Now that the A/UX 2.0 and 3.0 kernel implements Berkeley file system (UFS), the system calls for UFS file system structure are available and supported.

Be aware that if the C code contains SUN specific (non-Berkeley or non-standard UNIX calls), it has to be re-written for A/UX. In short, porting C code to A/UX should not be a difficult task, although there are differences between System V.2.2 and BSD UNIX.


Article Change History:
19 Sep 1994 - Reviewed for technical accuracy.
31 Aug 1992 - Reviewed for technical accuracy.

Support Information Services
Published Date: Feb 18, 2012