Interactive Unix 付属の標準ヘッダファイルを少し修正しなければなりませ ん。また、gcc-lib/include ディレクトリのヘッダファイルも少し修正する必 要があります。
次のディレクトリを gcc 関連ファイルのディレクトリとし、これを
"gcc-lib" と呼ぶことにします:
/usr/local/lib/gcc-lib/i[345]86-isc[34].[0-9]/2.6.x
/usr/include/sys/limits.h
および gcc-lib/include/sys/limits.h
#ifndef OPEN_MAX
#ifdef ISC
#define OPEN_MAX 256
#else
#define OPEN_MAX 20
#endif
#endif
Xlib でエラー(クライアント数が最大値になってしまう)が起こら
ないようにするため OPEN_MAX を
/usr/include/sys/ioctl.h
多重インクルードを避けるため、ファイルの中身全体を次の #ifdef で囲みま す。
#ifndef _IOCTL_H
#define _IOCTL_H
...
#endif
/usr/include/errno.h
(および、 gcc の対応するインクルードファイル)
#include <net/errno.h>
を追加します。これは、lbx 関係で数ヶ所
EWOULDBLOCK が未定義になるためです。
/usr/include/net/errno.h を
#ifndef _NET_ERRNO_H
#define _NET_ERRNO_H
...
#endif
で囲みます。これは、<net/errno.h> がソースから明示的に
インクルードされると多重インクルードが起こるのを避けるためです。
/usr/include/rpc/types.h
このファイルを gcc-lib/include/rpc/types.h にコピーし、
malloc() の定義を
#if !defined(__cplusplus)
extern char *malloc();
#endif
のように変更します。
この作業は Fresco を構築する場合だけに必要な点に注意してください。
/usr/include/sys/un.h
このファイルは Interactive Unix には存在しません。depend からのウォー ニングが嫌ならば、このファイルを作っても構いません。これはソースを正常 にコンパイルするためには必要ありません。
un.h を作るには以下の内容が使えるでしょう:
#ifndef X_NO_SYS_UN
struct sockaddr_un {
short sun_family; /* AF_UNIX */
char sun_path[108]; /* path name (gag) */
};
#endif
/usr/include/math.h
inline-math パッケージを使うには、既存の math.h を変更しなければなりま せん。筆者がヘッダファイルを組み込んだ方法は、inline-math パッケージの README に書かれている方法と異なる点に注意してください。
以下の内容を、 math.h の終わりの部分の最後の #endif の前に追加してくだ さい:
#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