142 lines
4.5 KiB
TeX
142 lines
4.5 KiB
TeX
%% This LaTeX-file was created by <root> Sat Dec 5 17:56:02 1998
|
|
%% LyX 0.12 (C) 1995-1998 by Matthias Ettrich and the LyX Team
|
|
|
|
%% Do not edit this file unless you know what you are doing.
|
|
\documentclass{article}
|
|
\usepackage[T1]{fontenc}
|
|
|
|
\makeatletter
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
|
|
\newcommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\spacefactor1000}
|
|
|
|
\makeatother
|
|
|
|
\begin{document}
|
|
|
|
|
|
\vfill{}
|
|
\title{\emph{FlightGear} Flight Simulator\\
|
|
Portability Guide}
|
|
\vfill{}
|
|
|
|
|
|
\author{Bernie Bright (bbright@c031.aone.net.au)}
|
|
|
|
|
|
\date{28 November 1998}
|
|
|
|
\maketitle
|
|
FlightGear is a multi-platform general aviation flight simulator\@. It is an
|
|
open development project in which anyone with network access and a C++ compiler
|
|
can contribute patches or new features.\\
|
|
|
|
|
|
|
|
\section{Introduction}
|
|
|
|
The file \emph{Include/compiler.h} attempts to capture the differences between
|
|
C++ compiler and STL implementations through the use of ``feature test macros''\@.
|
|
The file is divided into two parts. The first part contains a section for each
|
|
compiler, consisting of manifest constants specifying the features supported
|
|
or absent from the particular compiler/STL combination\@. The second part uses
|
|
the feature test macros to supply any missing features\@.
|
|
|
|
|
|
\subsection{Supported compilers (more to come)}
|
|
|
|
gcc 2.7.x\\
|
|
gcc 2.8.x\\
|
|
egcs 1.x\\
|
|
Inprise (Borland) C++ 5.02\\
|
|
Inprise (Borland) C++Builder 1 (5.20)
|
|
|
|
|
|
\subsection{Features Tests}
|
|
|
|
|
|
\subsubsection{STL}
|
|
|
|
\begin{description}
|
|
\item [FG\_NEED\_AUTO\_PTR]Some STL implementations don't supply an \texttt{auto\_ptr<>}
|
|
class template. Define this to provide one.
|
|
\item [FG\_NO\_DEFAULT\_TEMPLATE\_ARGS]Define this if the compiler doesn't support
|
|
default arguments in template declarations. \emph{(example)}
|
|
\item [FG\_INCOMPLETE\_FUNCTIONAL]Some STL implementations don't have \texttt{mem\_fun\_ref()}.
|
|
Define this to provide one.
|
|
\item [FG\_NO\_ARROW\_OPERATOR]Define this if iterators don't support \texttt{operator->()}.
|
|
\emph{(example)}
|
|
\item [FG\_EXPLICIT\_FUNCTION\_TMPL\_ARGS]~
|
|
\item [FG\_MEMBER\_TEMPLATES]~
|
|
\end{description}
|
|
|
|
\subsubsection{Compiler}
|
|
|
|
\begin{description}
|
|
\item [FG\_NAMESPACES]Define if compiler supports namespaces.
|
|
\item [FG\_HAVE\_STD]Define if std:: namespace supported.
|
|
\item [FG\_HAVE\_STD\_INCLUDES]Define if headers should be included as \texttt{<iostream>}
|
|
instead of \texttt{<iostream}.h>. Also implies that all ISO C++ standard include
|
|
files are present.
|
|
\item [FG\_HAVE\_STREAMBUF]Define if \texttt{<streambuf>} or \texttt{<streambuf}.h>
|
|
are present.
|
|
\item [FG\_CLASS\_PARTIAL\_SPECIALIZATION]~
|
|
\item [FG\_NEED\_EXPLICIT]Define if the compiler doesn't support the \texttt{\textbf{explicit}}
|
|
keyword.
|
|
\item [FG\_NEED\_TYPENAME]Define if the compiler doesn't support the \texttt{\textbf{typename}}
|
|
keyword.
|
|
\item [FG\_NEED\_MUTABLE]Define if the compiler doesn't support the \texttt{\textbf{mutable}}
|
|
keyword.
|
|
\item [FG\_NEED\_BOOL]Define if the compiler doesn't have the \texttt{\textbf{bool}}
|
|
type.
|
|
\end{description}
|
|
|
|
\subsubsection{Include Files}
|
|
|
|
This section deals with header file naming conventions. Some systems truncate
|
|
filenames, 8.3 being common, other systems use old or non-standard names for
|
|
some header files. We deal with the simple cases by defining macros that expand
|
|
to the appropriate filename.
|
|
|
|
\begin{description}
|
|
\item [STD\_ALGORITHM]=> <algorithm>, ``algorithm''
|
|
\item [STD\_FUNCTIONAL]=> <functional>, ``functional''
|
|
\item [STD\_IOMANIP]=> <iomanip>, <iomanip.h>
|
|
\item [STD\_IOSTREAM]=> <iostream>, <iostream.h>, <iostreams.h>
|
|
\item [STD\_STDEXCEPT]=> <stdexcept> (ignore this, FlightGear doesn't use exceptions)
|
|
\item [STD\_STRING]=> <string>
|
|
\item [STD\_STRSTREAM]=> <strstream>, <strstream.h>
|
|
\end{description}
|
|
In use, instead of writing \#include <iostream> you write \#include STD\_IOSTREAM.\\
|
|
\\
|
|
The situation becomes complicated with missing header files. <streambuf> is
|
|
a good example. In this case we must rely on FG\_HAVE\_STD\_INCLUDES and FG\_HAVE\_STREAMBUF.\\
|
|
\emph{}\\
|
|
\emph{TODO}
|
|
|
|
|
|
\subsection{and the rest}
|
|
|
|
|
|
\subsubsection{Namespace Issues}
|
|
|
|
\begin{description}
|
|
\item [FG\_USING\_STD(X)]~
|
|
\item [FG\_NAMESPACE(X)]~
|
|
\item [FG\_NAMESPACE\_END]~
|
|
\item [FG\_USING\_NAMESPACE(X)]~
|
|
\end{description}
|
|
|
|
\subsubsection{Templates}
|
|
|
|
\begin{description}
|
|
\item [FG\_NULL\_TMPL\_ARGS]~
|
|
\item [FG\_TEMPLATE\_NULL]~
|
|
\end{description}
|
|
\begin{thebibliography}{}
|
|
\bibitem{1}Stroustrup, Bjarne, \emph{The C++ Programming Programming Language}, 3rd edition,
|
|
June 1997, ISBN 0-201-88954-4
|
|
\bibitem{2}SGI Standard Template Library (STL) release 3.11
|
|
\end{thebibliography}
|
|
\end{document}
|