<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Changes to the System Header Files</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="isc.html"><EM> Information for ISC Users</EM></A>
 <b>:</b> <EM>Changes to the System Header Files</EM><BR>
<b>Previous:</b> <A HREF="isc2.html"><EM>Things needed for compiling the sources</EM></A><BR>
<b>Next:</b> <A HREF="isc4.html"><EM>make World </EM></A>


<HR NOSHADE>
  <H2><A NAME="3"></A>3. Changes to the System Header Files</H2>

<p>You have to change some of the standard header files supplied with
your version of Interactive. You also need to change some of the include
files in the gcc-lib/include directory.</p>
<p>Let us say the gcc-files are in directory </p>
<p><code>/usr/local/lib/gcc-lib/i[345]86-isc[34].[0-9]/2.6.x</code></p>
<p>referred to as <code>"gcc-lib"</code></p>

<H3><A NAME="4"></A>3.1. <code>/usr/include/sys/limits.h</code></H3>
<p>and <code>gcc-lib/include/sys/limits.h</code> </p>
<p>
<pre>
          #ifndef OPEN_MAX
          #ifdef ISC
          #define OPEN_MAX        256
          #else
          #define OPEN_MAX        20
          #endif
          #endif
          
</pre>

<code>OPEN_MAX</code> had to be increased to prevent
Xlib Errors (max no. of clients reached).</p>

<H3><A NAME="5"></A>3.2. <code>/usr/include/sys/ioctl.h</code></H3>
<p>surrounded by 
<pre>
        #ifndef _IOCTL_H 
        #define _IOCTL_H
        ...
        #endif
        
</pre>

to prevent multiple includes.</p>

<H3><A NAME="6"></A>3.3. <code>/usr/include/errno.h</code></H3>
<p>(and the corresponding gcc-include-file)
add 
<pre>
        #include &lt;net/errno.h&gt;
        
</pre>

because of <b>EWOULDBLOCK</b> undefined in several places 
regarding lbx.
Surround <code>/usr/include/net/errno.h</code> with</p>
<p>
<pre>
        #ifndef _NET_ERRNO_H
        #define _NET_ERRNO_H
        ...
        #endif
        
</pre>
</p>
<p>to prevent multiple includes were <code>&lt;net/errno.h&gt;</code>
is explicit included from the sources.</p>

<H3><A NAME="7"></A>3.4. <code>/usr/include/rpc/types.h</code></H3>
<p>copy this file to <code>gcc-lib/include/rpc/types.h</code>
and change the declaration of <b>malloc()</b> to</p>
<p>
<pre>
         #if !defined(__cplusplus)
         extern char *malloc();
         #endif
         
</pre>
</p>
<p>Note that this is only necessary if you want to build Fresco</p>

<H3><A NAME="8"></A>3.5. <code>/usr/include/sys/un.h</code></H3>
<p>such a file does not exist on Interactive. You may like to generate
it, if you don't like a warning from depend. It isn't needed to compile
the sources successfully.</p>
<p>You could use the following to produce it:
<pre>
         #ifndef X_NO_SYS_UN
         struct  sockaddr_un {
                 short   sun_family;             /* AF_UNIX */
                 char    sun_path[108];          /* path name (gag) */
         };
         #endif
         
</pre>
</p>

<H3><A NAME="9"></A>3.6. <code>/usr/include/math.h</code></H3>
<p>To use the Inline Math package you have to change your existing
math.h. Please note, the way I include the new Header file, is
different than suggested in inline-math's README.</p>
<p>Please add the following at the bottom of math.h, before the last 
#endif
<pre>
#if defined(UseInlineMath)

/* Needed on ISC __CONCAT, PI */
#ifndef __CONCAT
/*
 * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
 * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
 * in between its arguments.  __CONCAT can also concatenate double-quoted
 * strings produced by the __STRING macro, but this only works with ANSI C.
 */
#if defined(__STDC__) || defined(__cplusplus)
#define __CONCAT(x,y)   x ## y
#define __STRING(x)     #x
#else   /* !(__STDC__ || __cplusplus) */
#define __CONCAT(x,y)   x/**/y
#define __STRING(x)     "x"
#endif  /* !(__STDC__ || __cplusplus) */
#endif

#ifndef PI
#define PI M_PI
#endif

#include "/usr/local/include/i386/__math.h"
#endif
         
</pre>
</p>



 <HR NOSHADE>
<A HREF="isc.html"><EM> Information for ISC Users</EM></A>
 <b>:</b> <EM>Changes to the System Header Files</EM><BR>
<b>Previous:</b> <A HREF="isc2.html"><EM>Things needed for compiling the sources</EM></A><BR>
<b>Next:</b> <A HREF="isc4.html"><EM>make World </EM></A>



</BODY>
</HTML>
