2
0
mirror of https://frontier.innolan.net/github/amigaos-cross-toolchain6.git synced 2024-10-19 10:29:55 +00:00

Add endian aware getters and setters.

This commit is contained in:
Krystian Bacławski
2012-02-16 21:28:24 -08:00
parent 2ecdeddb95
commit 7518813d49

View File

@ -7,13 +7,15 @@
#ifndef _DEFS_H_
#define _DEFS_H_
#include <arpa/inet.h>
#include <endian.h>
#include <dos/doshunks.h>
#include "a.out.h"
#define GETWORD(x) ntohs(x)
#define GETLONG(x) ntohl(x)
#define GETWORD(x) be16toh(x)
#define GETLONG(x) be32toh(x)
#define PUTWORD(x) htobe16(x)
#define PUTLONG(x) htobe32(x)
/* Converts an SLINE value to an offset in the text section.
This definition is OK for ld 1.8, currently used on the Amiga AFAIK,