head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2001.06.28.04.17.56;	author dan;	state Exp;
branches;
next	;


desc
@porting notes.
@


1.1
log
@Initial revision
@
text
@PORTING notes
$Id$

To tell what platform defines there are for gcc, use:
 echo 'main(){;}'|gcc -E -v -

Solaris SPARC (WorkShop cc) =================================================
According to "C User's Guide" for "C Compiler 4.2", http://docs.sun.com
Sun Workshop cc recognizes __sun, __unix, __SUNPRO_C=0x400,
 __`uname -s`_`uname -r_ (e.g., __SunOS_5_4
__sparc or __i386, __BUILTIN_VA_ARG_INCR, __SVR4,
__LITTLE_ENDIAN (*PowerPC) _ppc (PowerPC)

Solaris SPARC gcc ========================================================
 echo 'main(){;}'|gcc -E -v -
Reading specs from /pkg/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 /pkg/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) -
GNU CPP version 2.95.3 20010315 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /pkg/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/../../../../sparc-sun-solaris2.6/include
 /pkg/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /pkg/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/../../../../include/g++-3
 /usr/local/include
End of omitted list.
# 1 ""
main(){;}

Solaris x86 gcc ========================================================
Reading specs from /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__
GNUC_MINOR__=95 -Dunix -D__svr4__ -D__SVR4 -Dsun -D__unix__ -D__svr4__ -D__SVR4
-D__sun__ -D__unix -D__sun -Asystem(svr4) -Acpu(i386) -Amachine(i386) -Di386 -D_
_i386 -D__i386__ -
GNU CPP version 2.95.2 19991024 (release) (i386 System V Release 4)
#include "..." search starts here:
#include <...> search starts here:
 /opt/sfw/include
 /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/../../../../i386-pc-solaris2.8/i
nclude
 /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/../../../../include/g++-3
End of omitted list.
# 1 ""
main(){;}

RedHat Linux x86 ========================================================
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_M
INOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__
-D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di38
6 -D__i386 -D__i386__ -D__tune_i386__ -
GNU CPP version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) (cpplib) (i386 Linux/E
LF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include
 /usr/include
End of search list.
# 1 ""
main(){;}

HP-UX C =================================================
http://docs.hp.com/ "HP C/HP-UX Programmer's Guide"
Programming for Portability:
General Portability Considerations: Predefined Symbols 

The symbol __hp9000s300 is predefined on Series 300/400;
the symbols __hp9000s800 and __hppa are predefined on Series 700/800; and
__hp9000s700 is predefined on Series 700 only.
The symbols __hpux and __unix are predefined on all HP-UX implementations.
Also, the symbol _PA_RISC2_0 is defined in 32-bit mode and
__LP64__ is defined in 64-bit mode.
@
