amiga_imgv
diff src/endian.h @ 7:4c36d0f44aa6
lbm loading
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 29 Oct 2017 13:21:11 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/endian.h Sun Oct 29 13:21:11 2017 +0200 1.3 @@ -0,0 +1,20 @@ 1.4 +#ifndef ENDIAN_H_ 1.5 +#define ENDIAN_H_ 1.6 + 1.7 +#if defined(__unix__) || defined(__APPLE__) 1.8 +#include <arpa/inet.h> 1.9 +#elif defined(WIN32) 1.10 +#include <winsock2.h> 1.11 +#else 1.12 +#define NO_INET 1.13 +#include "inttypes.h" 1.14 + 1.15 +extern uint16_t (*ntohs)(uint16_t); 1.16 +extern uint16_t (*htons)(uint16_t); 1.17 +extern uint32_t (*ntohl)(uint32_t); 1.18 +extern uint32_t (*htonl)(uint32_t); 1.19 +#endif 1.20 + 1.21 +int bigendian(void); 1.22 + 1.23 +#endif /* ENDIAN_H_ */