pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/doc/guide/files Fixed the wording in the "CPP defines"...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/62aa9f3b9c87
branches:  trunk
changeset: 503629:62aa9f3b9c87
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 24 10:03:37 2005 +0000

description:
Fixed the wording in the "CPP defines" section. Added more examples of
predefined CPP macros for some platforms.

diffstat:

 doc/guide/files/fixes.xml |  34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diffs (67 lines):

diff -r 910dbf3e7e8b -r 62aa9f3b9c87 doc/guide/files/fixes.xml
--- a/doc/guide/files/fixes.xml Thu Nov 24 08:46:34 2005 +0000
+++ b/doc/guide/files/fixes.xml Thu Nov 24 10:03:37 2005 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: fixes.xml,v 1.40 2005/11/21 09:33:39 rillig Exp $ -->
+<!-- $NetBSD: fixes.xml,v 1.41 2005/11/24 10:03:37 rillig Exp $ -->
 
 <chapter id="fixes"> <?dbhtml filename="fixes.html"?>
   <title>Making your package work</title>
@@ -816,18 +816,19 @@
       or <varname>#if defined(FOO)</varname>. Among these macros are
       usually ones that describe the target CPU and operating system.
       Depending of which of the macros are defined, you can write code
-      that uses features unique to a specific platform. The best way to
-      handle these differences is to use the GNU autotools (automake,
-      autoconf, etc.) to check for specific features (like the existence
-      of a header file, a function or a library).</para>
+      that uses features unique to a specific platform. Generally you
+      should rather use the GNU autotools (automake, autoconf, etc.) to
+      check for specific features (like the existence of a header file,
+      a function or a library), but sometimes this is not possible or
+      desired.</para>
 
-      <para>If that is not possible you can use the predefined macros
+      <para>In that case you can use the predefined macros
       below to configure your code to the platform it runs on. Almost
       every operating system, hardware architecture and compiler has its
       own macro. For example, if the macros <varname>__GNUC__</varname>,
       <varname>__i386__</varname> and <varname>__NetBSD__</varname> are
-      all defined, you know that you are using NetBSD on an Intel CPU,
-      and your compiler is GCC.</para>
+      all defined, you know that you are using NetBSD on an i386
+      compatible CPU, and your compiler is GCC.</para>
 
       <sect3 id="fixes-build-cpp-opsys">
         <title>CPP defines for operating systems</title>
@@ -889,15 +890,28 @@
       instead.</para>
 
       <variablelist>
-       <varlistentry><term>SunPro 5.7 + Solaris 8 + SPARC</term>
-        <listitem><para>__SVR4, __sparc, __sun, __unix, sparc, sun,
+       <varlistentry><term>GCC 3.3.3 + SuSE Linux 9.1 + i386</term>
+        <listitem><para>__ELF__, __gnu_linux__, __i386, _i386__,
+        __linux, __linux__, __unix, __unix__, i386, linux,
         unix.</para></listitem></varlistentry>
 
+       <varlistentry><term>GCC 2.95 + NetBSD 1.6.2 + i386</term>
+        <listitem><para>__ELF__, __NetBSD__, __i386, _i386__,
+        i386.</para></listitem></varlistentry>
+
+       <varlistentry><term>GCC 3.3.3 + NetBSD 2.0 + i386</term>
+        <listitem><para>__ELF__, __NetBSD__, __i386, _i386__,
+        i386.</para></listitem></varlistentry>
+
        <varlistentry><term>GCC 4 + Solaris 8 + SPARC</term>
         <listitem><para>__ELF__, __sparc, __sparc__, __sun, __sun__,
         __SVR4, __svr4__, __unix, __unix__, sparc, sun,
         unix.</para></listitem></varlistentry>
 
+       <varlistentry><term>SunPro 5.7 + Solaris 8 + SPARC</term>
+        <listitem><para>__SVR4, __sparc, __sun, __unix, sparc, sun,
+        unix.</para></listitem></varlistentry>
+
       </variablelist>
     </sect2>
 



Home | Main Index | Thread Index | Old Index