mirror of
https://github.com/bebbo/amigaos-cross-toolchain.git
synced 2025-12-08 22:38:24 +00:00
Add endian aware getters and setters.
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user