Plan 9のAPEで整数型やサイズに関するファイル
Plan 9のAPEで、整数型やエンディアンをどこで定義するか。
$cputype/include/ape/_apetypes.h
Section titled “$cputype/include/ape/_apetypes.h”以下2つを定義する。
- __BYTE_ORDER
- BYTE_ORDER
また、64bitの場合は次の定数も定義する。
- _BITS64
ここで参照する LITTEL_ENDIAN 等は sys/include/ape/machine/endian.h にある。
$cputype/include/ape/inttypes.h
Section titled “$cputype/include/ape/inttypes.h”各int型やprintフォーマットのverbを定義する。
sys/include/ape/machine/endian.h
Section titled “sys/include/ape/machine/endian.h”エンディアンに関連する定数を定義する。
- LITTEL_ENDIAN
- BIG_ENDIAN
- PDP_ENDIAN