Archive-name: ibm-rt-faq/aix-v2/porting/part1
Last-modified: Thu Jun  9 08:50:51 CDT 1994
Version: 1.2

Frequently Asked Questions for:  AIX V2.2.1 on IBM RT systems
                                 Part 1 of 1 parts.
                                 Porting notes for AIX/RT.

The AIX V2 FAQ currently consists of EIGHT parts in 5 topic areas:

     AIX V2 FAQ Index and acknowledgements
     AIX V2 hardware specific issues - in one part (currently).
     AIX V2 Software questions - in three parts.
     AIX V2 Problem Questions and answers - two parts.
     AIX V2 Porting software notes - in one part (currently). (This FAQ)

See the AIX V2 FAQ index posting for a complete index of the AIX FAQ postings.

================================================================================
 
4.0   Software porting questions

P.1   Are there any archive/FTP sites for AIX/RT software?

   NOTE: I welcome information regarding ANY sites with RT software
         for any OS on IBM RT processors.  I am going to add a similar
         section to each OS specific FAQ.  Please send E-mail with 
         information and/or corrections.

Site: ftp-rt.graf.polymtl.ca

     Anonymous ftp site for AIX-2.2.1 softwares: ftp-rt.graf.polymtl.ca
     Fsp site (port 21) for AIX-2.2.1 softwares: fsp-rt.graf.polymtl.ca
     Gopher site (port 70) for AIX-2.2.1 softwares: gopher.graf.polymtl.ca

     Anonymous ftp access is NOT allowed from 9am to 6pm EST Monday to Friday.
     Please respect these restrictions.
     Fsp access is allowed anytime.
     Gopher access is allowed anytime.

  Maintained by:
     Francois Normant (VE2NFC)             | Internet: fn@mathappl.polymtl.ca
     Ecole Polytechnique - Mathematiques   | Compu$erve: 75210,525
     C.P. 6079 - succursale centre ville   | Tel. (514) 340-5968
     Montreal - Quebec - Canada - H3C 3A7  | Fax. (514) 340-4463


------------------------------
P.2   General "How to I port product <foo>" to AIX V2 ?

      In general, I have not found a piece of PD software that I could not
      make run correctly on AIX/RT, short of code that makes specific
      dependencies on features either missing from the AIX kernel (such
      as job control), or code that attempts to directly manipulate hardware
      or assumes a particular hardware attachments or processor type.
      Some programs that attempt to deal with kernel information or variables
      can be difficult to impossible to port.

      The AIX V2 system is at heart, a system V release 2 base, with
      BSD 4.2 and some BSD 4.3 extensions mixed in, it also has some IBM
      extensions and facilities by Interactive Systems, mixed in as well. 
      The standard C compiler is mostly K&R compliant with additional compiler
      flags to support BSD portablity.  There is *SOME* ANSI compliance in the
      include libraries, but it is far from complete.  No ANSI prototyping
      is supported by the standard compiler.

      The compiler shipped with AIX has its own standard setup, with 
      flags to make the include files SYSV compliant, and BSD compliant.

      SYSV way:
 cc  -O -o <foo>  foo.c    <and other flags.>
    or

 cc -DSYSV and/or -DUSG  -O -o <foo> foo.c   <and other flags.>
     Note: The supplied header files for AIX/RT do not test for the
           SYSV or USG define, but a lot of public code does.
                  X11R5 has a -DUSGISH for a merged type system like AIX/RT.
 
      BSD compatibility flags.
 cc -DBSD -DBSD_INCLUDES -DBSD_REMAP_SIGNAL_TO_SIGVEC  \
  -O -o <foo>  foo.c -lbsd

 Note: There is another BSD flag: -DBSD_COMPILE_ONLY
       This flag will cause additional defines and includes
       that may produce a correct compile, but most likely will
       NOT execute correctly, due to possibly incorrect interface
       defines, or use AIX/RT unsupported system functions.

      In addition to compiler difficulties, there are several unique changes
      to AIX V2 for the IBM RT that can give problems. 

      The general most problem areas are:
         - Differences in signal handling.
           * AIX/RT uses SYSV style signal handling.  To use BSD style
             signals, add the -DBSD_REMAP_SIGNAL_TO_SIGVEC to your
             compile options.

         - Some missing library routines, most common are:
           * strerrno,  [ Others needed to be collected - MW ]
           
           GNU software has some replacement routines with their code.

         NOTE: If other routines are identified and coded, and you would
           like to contribute your work, I hope to add any
           contributions to the body of this part of the FAQ.

         - Macro/include headers that may be different or missing.
           * stdlib.h   is missing, and usually not needed.  If you have
             some problems, add the following: 
               #include <sys/types.h>

           * 'syslog.h' is located in <sys/syslog.h>
             #ifdef AIX
             #include <sys/syslog.h>
             #else
             #include <syslog.h>
             #endif

           * Programs needing file locking need to use fcntl.

           * File functions needing O_NDELAY, and O_RDWR flags will need
             to include <fcntl.h>

         - Macro heavy sources, like X11 will need to override the table
           sizes in the compiler.  See section S.12 on compiler flags that
           can be helpful in this area.

         - Missing commands, or commands with different flags.
           * The most common problem is with grep and awk.  This can
             be fixed by replacing them with the GNU versions of these
             tools.

      See section S.12 for additional information and some specific flags for
      the standard C compiler that can assist with compiling and porting
      software to AIX/RT.

      This list is incomplete... please feel free to send additions
      on porting difficulties, missing system calls, bugs, ect..

------------------------------
P.3   BIND 4.8.3 (domain name server, and resolv libraries)

      I have it ported and running, I will add it shortly to this FAQ. - MW

------------------------------
P.4   GDBM (Gnu DBM replacement)

      I have it ported and running, I will add it shortly to this FAQ. - MW

------------------------------
P.5   IDA Sendmail 5.67b+IDA-1.5

      I have it ported and running, I will add it shortly to this FAQ. - MW

------------------------------
P.6   ELM  2.3 PL11 or 2.4 PL20

      I have it running. No porting was really necessary, just answer 
      the config questions correctly.

------------------------------
P.7   X11 R4 or R5.

      Clients and libs are easy, mostly proper compile flags.  I am working
      on servers for R5, but it will take me a LONG while, sorry. - MW

------------------------------
P.8   GCC 
 
      I have the notes posted to the net, I just need to organize them
      and add them to this section. - MW

------------------------------
P.9   inn 1.4

      I have it ported and running, I will add it shortly to this FAQ. - MW

------------------------------
P.10  xv-2.1  (or xv-3.x)

      I have it ported and running, I will add it shortly to this FAQ. - MW

------------------------------
P.11  Kermit

   ==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==
   Submitter: Brian Watson <brian@tscc2.macarthur.uws.EDU.AU>
   Date: Thu, 19 May 1994 11:29:45 +1000

   I have Kermit 5A(188) which was the latest when I did it.  You
   just unpack it and say either 'make sys3' for AIX 2.1 or 'make
   rtaix' for AIX 2.2.1.  I have 2.2.1 so I can't say how the sys3
   option works.
   ==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==

------------------------------
P.12  Gopher 2.011

      I have it ported and running, I will add it shortly to this FAQ. - MW

------------------------------
P.13  GNU fileutil-3.9

      I have it ported and running, I will add it shortly to this FAQ. - MW

      [I assmume that the FTP archive server now has my updated fix
       that makes the 'df' command operate properly. - MW ]

------------------------------
P.14  others?

      Please feel free to contribute!

================================================================================
                         *** END of AIX/RT FAQ ***
================= end of ibm-rt-faq/aix-v2/porting/part1 =======================
-- 

Posted around the first of each month to comp.sys.ibm.pc.rt, and
to comp.unix.aix.

This FAQ is dedicated to use of the AIX Version 2 operating system, running
on the IBM RISC processor known as the RT.  The RT is known also as 
an IBM model 6150 or 6151 machine.

For AIX RT  submissions E-mail to:   aix-rt@antimatr.hou.tx.us
For AOS RT  submissions E-mail to:   aos-rt@antimatr.hou.tx.us
For MACH RT submissions E-mail to:   mach-rt@antimatr.hou.tx.us
For general Q&A submissions (hardware and other stuff) E-mail to:
   faq-rt@antimatr.hou.tx.us

Other comments and correctons should be sent to the author:
    Mark Whetzel
    DOMAIN addr: markw@antimatr.hou.tx.us
    BANG address:  ..!uhnix1!lobster!antimatr!markw
    Daytime work number  8AM-5PM M-F CST  VOICE: (713) 963-2544

--
AIX..... NOT just another UNIX. (tm)
Mark Whetzel                          | My own RT system.. My own thoughts..
DOMAIN: markw@antimatr.hou.tx.us      | IBM RT/135 running AIX 2.2.1 
UUCP ..!menudo!lobster!antimatr!markw | comp.sys.ibm.pc.rt FAQ maintainer.
-- 
AIX..... NOT just another UNIX. (tm)
Mark Whetzel                          | My own RT system.. My own thoughts..
DOMAIN: markw@antimatr.hou.tx.us      | IBM RT/135 running AIX 2.2.1 
UUCP ..!menudo!lobster!antimatr!markw | comp.sys.ibm.pc.rt FAQ maintainer.
